Search in sources :

Example 6 with NightDisplayController

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);
}
Also used : NightDisplayController(com.android.internal.app.NightDisplayController)

Example 7 with NightDisplayController

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);
}
Also used : NightDisplayController(com.android.internal.app.NightDisplayController)

Example 8 with NightDisplayController

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);
}
Also used : NightDisplayController(com.android.internal.app.NightDisplayController)

Example 9 with NightDisplayController

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());
    }
}
Also used : NightDisplayController(com.android.internal.app.NightDisplayController)

Example 10 with NightDisplayController

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);
}
Also used : NightDisplayController(com.android.internal.app.NightDisplayController)

Aggregations

NightDisplayController (com.android.internal.app.NightDisplayController)11 Context (android.content.Context)1