Restrict calls to addPowerSaveTempWhitelistApp.

Limit unsupported app calls to R SDK and point them to the SystemApi.

Bug: 142420609
Test: Android builds
Change-Id: I0619d7210457c6cf4c202f12feb91d8d82e20561
This commit is contained in:
Kweku Adams
2021-01-12 09:48:30 -08:00
parent dae30affe7
commit 1aa89de1cf

View File

@@ -41,7 +41,8 @@ interface IDeviceIdleController {
int[] getAppIdTempWhitelist();
boolean isPowerSaveWhitelistExceptIdleApp(String name);
boolean isPowerSaveWhitelistApp(String name);
@UnsupportedAppUsage
@UnsupportedAppUsage(maxTargetSdk = 30,
publicAlternatives = "Use SystemApi {@code PowerWhitelistManager#whitelistAppTemporarily(String, int, String)}.")
void addPowerSaveTempWhitelistApp(String name, long duration, int userId, String reason);
long addPowerSaveTempWhitelistAppForMms(String name, int userId, String reason);
long addPowerSaveTempWhitelistAppForSms(String name, int userId, String reason);