add OverlayManager.setEnabled to system-current.txt

Test: builds and tested in local theme picker

Bug: 121328713

Change-Id: I61ca5189b35005ee13dab797ec2187cd4a88b785
This commit is contained in:
Hyunyoung Song
2019-01-22 10:21:23 -08:00
parent 9c79041cc6
commit 4b95d69eef
2 changed files with 22 additions and 0 deletions

View File

@@ -1322,6 +1322,7 @@ package android.content.om {
public class OverlayManager {
method public java.util.List<android.content.om.OverlayInfo> getOverlayInfosForTarget(@Nullable String, int);
method public boolean setEnabled(@Nullable String, boolean, int);
method public boolean setEnabledExclusiveInCategory(@Nullable String, int);
}

View File

@@ -54,6 +54,7 @@ public class OverlayManager {
this(context, IOverlayManager.Stub.asInterface(
ServiceManager.getService(Context.OVERLAY_SERVICE)));
}
/**
* Request that an overlay package is enabled and any other overlay packages with the same
* target package and category are disabled.
@@ -74,6 +75,26 @@ public class OverlayManager {
}
}
/**
* Request that an overlay package is enabled.
*
* @param packageName the name of the overlay package to enable.
* @param enable {@code false} if the overlay should be turned off.
* @param userId The user for which to change the overlay.
* @return true if the system successfully registered the request, false otherwise.
*
* @hide
*/
@SystemApi
public boolean setEnabled(@Nullable final String packageName, final boolean enable,
int userId) {
try {
return mService.setEnabled(packageName, enable, userId);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
/**
* Returns information about all overlays for the given target package for
* the specified user. The returned list is ordered according to the