Search in sources :

Example 11 with NightDisplayController

use of com.android.internal.app.NightDisplayController in project android_frameworks_base by crdroidandroid.

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)

Aggregations

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