blob: 08a15eb7dfa1066f7b37a508ea19730817ab6997 [file] [log] [blame]
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.os;
/**
* Power manager local system service interface.
*
* @hide Only for use within the system server.
*/
public abstract class PowerManagerInternal {
/**
* Used by the window manager to override the screen brightness based on the
* current foreground activity.
*
* This method must only be called by the window manager.
*
* @param brightness The overridden brightness, or -1 to disable the override.
*/
public abstract void setScreenBrightnessOverrideFromWindowManager(int brightness);
/**
* Used by the window manager to override the button brightness based on the
* current foreground activity.
*
* This method must only be called by the window manager.
*
* @param brightness The overridden brightness, or -1 to disable the override.
*/
public abstract void setButtonBrightnessOverrideFromWindowManager(int brightness);
/**
* Used by the window manager to override the user activity timeout based on the
* current foreground activity. It can only be used to make the timeout shorter
* than usual, not longer.
*
* This method must only be called by the window manager.
*
* @param timeoutMillis The overridden timeout, or -1 to disable the override.
*/
public abstract void setUserActivityTimeoutOverrideFromWindowManager(long timeoutMillis);
public abstract boolean getLowPowerModeEnabled();
public abstract void registerLowPowerModeObserver(LowPowerModeListener listener);
public interface LowPowerModeListener {
public void onLowPowerModeChanged(boolean enabled);
}
}