perf: Add PerformanceManager.getProfileHasAppProfiles API
Add an API to query PerformanceManager if a perf profile supports app-profiles. Change-Id: I51d958343624ab085de0352ac182cb05308e0da4
This commit is contained in:
committed by
Scott Mertz
parent
37b590928f
commit
4a964c508e
@@ -26,4 +26,6 @@ interface IPerformanceManager {
|
||||
int getPowerProfile();
|
||||
|
||||
int getNumberOfProfiles();
|
||||
|
||||
boolean getProfileHasAppProfiles(int profile);
|
||||
}
|
||||
|
||||
@@ -178,4 +178,23 @@ public class PerformanceManager {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if profile has app-specific profiles
|
||||
*
|
||||
* Returns true if profile has app-specific profiles.
|
||||
*/
|
||||
public boolean getProfileHasAppProfiles(int profile) {
|
||||
boolean ret = false;
|
||||
if (mNumberOfProfiles > 0) {
|
||||
try {
|
||||
if (checkService()) {
|
||||
ret = sService.getProfileHasAppProfiles(profile);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user