Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b95d69e authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

add OverlayManager.setEnabled to system-current.txt

Test: builds and tested in local theme picker

Bug: 121328713

Change-Id: I61ca5189b35005ee13dab797ec2187cd4a88b785
parent 9c79041c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
  }
+21 −0
Original line number Diff line number Diff line
@@ -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