Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading core/java/android/content/om/OverlayManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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 Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading
core/java/android/content/om/OverlayManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -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. Loading @@ -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 Loading