use of com.android.internal.app.NightDisplayController in project android_frameworks_base by AOSPA.
the class NightDisplayTile method handleUserSwitch.
@Override
protected void handleUserSwitch(int newUserId) {
mSetting.setUserId(newUserId);
// Stop listening to the old controller.
if (mIsListening) {
mController.setListener(null);
}
// Make a new controller for the new user.
mController = new NightDisplayController(mContext, newUserId);
if (mIsListening) {
mController.setListener(this);
}
super.handleUserSwitch(newUserId);
}
use of com.android.internal.app.NightDisplayController in project android_frameworks_base by ResurrectionRemix.
the class NightDisplayTile method handleUserSwitch.
@Override
protected void handleUserSwitch(int newUserId) {
// Stop listening to the old controller.
if (mIsListening) {
mController.setListener(null);
}
// Make a new controller for the new user.
mController = new NightDisplayController(mContext, newUserId);
if (mIsListening) {
mController.setListener(this);
}
super.handleUserSwitch(newUserId);
}
use of com.android.internal.app.NightDisplayController in project platform_frameworks_base by android.
the class NightDisplayTile method handleUserSwitch.
@Override
protected void handleUserSwitch(int newUserId) {
// Stop listening to the old controller.
if (mIsListening) {
mController.setListener(null);
}
// Make a new controller for the new user.
mController = new NightDisplayController(mContext, newUserId);
if (mIsListening) {
mController.setListener(this);
}
super.handleUserSwitch(newUserId);
}
use of com.android.internal.app.NightDisplayController in project android_frameworks_base by AOSPA.
the class NightDisplayService method setUp.
private void setUp() {
Slog.d(TAG, "setUp: currentUser=" + mCurrentUser);
// Create a new controller for the current user and start listening for changes.
mController = new NightDisplayController(getContext(), mCurrentUser);
mController.setListener(this);
// Initialize the current auto mode.
onAutoModeChanged(mController.getAutoMode());
// Force the initialization current activated state.
if (mIsActivated == null) {
onActivated(mController.isActivated());
}
}
use of com.android.internal.app.NightDisplayController in project android_frameworks_base by DirtyUnicorns.
the class NightDisplayTile method handleUserSwitch.
@Override
protected void handleUserSwitch(int newUserId) {
// Stop listening to the old controller.
if (mIsListening) {
mController.setListener(null);
}
// Make a new controller for the new user.
mController = new NightDisplayController(mContext, newUserId);
if (mIsListening) {
mController.setListener(this);
}
super.handleUserSwitch(newUserId);
}
Aggregations