Merge "PowerManager: Adds isSustainedPerformanceModeSupported()" into nyc-dev

am: a68fe1e

* commit 'a68fe1e4d3a34667e5948912c53290298388427b':
  PowerManager: Adds isSustainedPerformanceModeSupported()

Change-Id: Ief02f71f1230fda43386628d1d263800e5bab6d6
This commit is contained in:
Ruchi Kandoi
2016-04-04 20:48:16 +00:00
committed by android-build-merger
6 changed files with 18 additions and 0 deletions

View File

@@ -29074,6 +29074,7 @@ package android.os {
method public boolean isInteractive();
method public boolean isPowerSaveMode();
method public deprecated boolean isScreenOn();
method public boolean isSustainedPerformanceModeSupported();
method public boolean isWakeLockLevelSupported(int);
method public android.os.PowerManager.WakeLock newWakeLock(int, java.lang.String);
method public void reboot(java.lang.String);

View File

@@ -31307,6 +31307,7 @@ package android.os {
method public boolean isPowerSaveMode();
method public boolean isScreenBrightnessBoosted();
method public deprecated boolean isScreenOn();
method public boolean isSustainedPerformanceModeSupported();
method public boolean isWakeLockLevelSupported(int);
method public android.os.PowerManager.WakeLock newWakeLock(int, java.lang.String);
method public void reboot(java.lang.String);

View File

@@ -29139,6 +29139,7 @@ package android.os {
method public boolean isInteractive();
method public boolean isPowerSaveMode();
method public deprecated boolean isScreenOn();
method public boolean isSustainedPerformanceModeSupported();
method public boolean isWakeLockLevelSupported(int);
method public android.os.PowerManager.WakeLock newWakeLock(int, java.lang.String);
method public void reboot(java.lang.String);

View File

@@ -1030,6 +1030,16 @@ public final class PowerManager {
}
}
/**
* Returns True if the device supports Sustained Performance Mode.
* Applications Should check if the device supports this mode, before
* using {@link #SUSTAINED_PERFORMANCE_WAKE_LOCK}.
*/
public boolean isSustainedPerformanceModeSupported() {
return mContext.getResources().getBoolean(
com.android.internal.R.bool.config_sustainedPerformanceModeSupported);
}
/**
* Intent that is broadcast when the state of {@link #isPowerSaveMode()} changes.
* This broadcast is only sent to registered receivers.

View File

@@ -2507,4 +2507,7 @@
<!-- True if the device requires AppWidgetService even if it does not have
the PackageManager.FEATURE_APP_WIDGETS feature -->
<bool name="config_enableAppWidgetService">false</bool>
<!-- True if the device supports Sustained Performance Mode-->
<bool name="config_sustainedPerformanceModeSupported">false</bool>
</resources>

View File

@@ -2542,4 +2542,6 @@
<java-symbol type="id" name="textSpacerNoTitle" />
<java-symbol type="id" name="titleDividerNoCustom" />
<java-symbol type="bool" name="config_sustainedPerformanceModeSupported" />
</resources>