use of org.chromium.chrome.browser.snackbar.DataUseSnackbarController in project AndroidChromium by JackyAndroid.
the class ChromeActivity method postInflationStartup.
@SuppressLint("NewApi")
@Override
public void postInflationStartup() {
super.postInflationStartup();
mSnackbarManager = new SnackbarManager(this);
mDataUseSnackbarController = new DataUseSnackbarController(this, getSnackbarManager());
mAssistStatusHandler = createAssistStatusHandler();
if (mAssistStatusHandler != null) {
if (mTabModelSelector != null) {
mAssistStatusHandler.setTabModelSelector(mTabModelSelector);
}
mAssistStatusHandler.updateAssistState();
}
// is only the case for grandfathered-in svelte users. We no longer do so for newer users.
if (!ChromePreferenceManager.getInstance(this).getAllowLowEndDeviceUi()) {
CommandLine.getInstance().appendSwitch(BaseSwitches.DISABLE_LOW_END_DEVICE_MODE);
}
AccessibilityManager manager = (AccessibilityManager) getBaseContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
manager.addAccessibilityStateChangeListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
mTouchExplorationStateChangeListener = new TouchExplorationStateChangeListener() {
@Override
public void onTouchExplorationStateChanged(boolean enabled) {
checkAccessibility();
}
};
manager.addTouchExplorationStateChangeListener(mTouchExplorationStateChangeListener);
}
// Make the activity listen to policy change events
CombinedPolicyProvider.get().addPolicyChangeListener(this);
// Set up the animation placeholder to be the SurfaceView. This disables the
// SurfaceView's 'hole' clipping during animations that are notified to the window.
mWindowAndroid.setAnimationPlaceholderView(mCompositorViewHolder.getSurfaceView());
// Inform the WindowAndroid of the keyboard accessory view.
mWindowAndroid.setKeyboardAccessoryView((ViewGroup) findViewById(R.id.keyboard_accessory));
initializeToolbar();
}
Aggregations