public class

PerformanceManager

extends Object
java.lang.Object
   ↳ cyanogenmod.power.PerformanceManager

Class Overview

Summary

Constants
String POWER_PROFILE_CHANGED Broadcast sent when profile is changed
int PROFILE_BALANCED Balanced power profile The default mode for balanced power savings and performance
int PROFILE_BIAS_PERFORMANCE Performance bias profile This mode improves performance at the cost of some power.
int PROFILE_BIAS_POWER_SAVE Power save bias profile This mode decreases performance slightly to improve power savings.
int PROFILE_HIGH_PERFORMANCE High-performance profile This mode sacrifices power for maximum performance
int PROFILE_POWER_SAVE Power save profile This mode sacrifices performance for maximum power saving.
String TAG
Public Methods
static PerformanceManager getInstance(Context context)
int getNumberOfProfiles()
Returns the number of supported profiles, -1 if unsupported This is queried via the PowerHAL.
int getPowerProfile()
Gets the current power profile Returns null if power profiles are not enabled
boolean getProfileHasAppProfiles(int profile)
Check if profile has app-specific profiles Returns true if profile has app-specific profiles.
boolean setPowerProfile(int profile)
Set the system power profile
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String POWER_PROFILE_CHANGED

Added in API level 4

Broadcast sent when profile is changed

Constant Value: "cyanogenmod.power.PROFILE_CHANGED"

public static final int PROFILE_BALANCED

Added in API level 4

Balanced power profile The default mode for balanced power savings and performance

Constant Value: 1 (0x00000001)

public static final int PROFILE_BIAS_PERFORMANCE

Added in API level 4

Performance bias profile This mode improves performance at the cost of some power.

Constant Value: 4 (0x00000004)

public static final int PROFILE_BIAS_POWER_SAVE

Added in API level 4

Power save bias profile This mode decreases performance slightly to improve power savings.

Constant Value: 3 (0x00000003)

public static final int PROFILE_HIGH_PERFORMANCE

Added in API level 4

High-performance profile This mode sacrifices power for maximum performance

Constant Value: 2 (0x00000002)

public static final int PROFILE_POWER_SAVE

Added in API level 4

Power save profile This mode sacrifices performance for maximum power saving.

Constant Value: 0 (0x00000000)

public static final String TAG

Added in API level 4

Constant Value: "PerformanceManager"

Public Methods

public static PerformanceManager getInstance (Context context)

Added in API level 4

public int getNumberOfProfiles ()

Added in API level 4

Returns the number of supported profiles, -1 if unsupported This is queried via the PowerHAL.

public int getPowerProfile ()

Added in API level 4

Gets the current power profile Returns null if power profiles are not enabled

public boolean getProfileHasAppProfiles (int profile)

Added in API level 4

Check if profile has app-specific profiles Returns true if profile has app-specific profiles.

public boolean setPowerProfile (int profile)

Added in API level 4

Set the system power profile

Throws
IllegalArgumentException if invalid