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

Commit a1668764 authored by Sunny Goyal's avatar Sunny Goyal Committed by android-build-merger
Browse files

Merge "Exposing setRecentsVisibility method and associated callbacks to the...

Merge "Exposing setRecentsVisibility method and associated callbacks to the Recents components" into pi-dev am: 9d5eb345
am: 97abef6d

Change-Id: Ib42036805eebbc2f6981a931e4ae7eebb4bb5711
parents 2de33751 97abef6d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -123,4 +123,12 @@ public class WindowManagerWrapper {
            Log.w(TAG, "Failed to set shelf height");
        }
    }

    public void setRecentsVisibility(boolean visible) {
        try {
            WindowManagerGlobal.getWindowManagerService().setRecentsVisibility(visible);
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to set recents visibility");
        }
    }
}
+2 −6
Original line number Diff line number Diff line
@@ -5943,12 +5943,8 @@ public class WindowManagerService extends IWindowManager.Stub

    @Override
    public void setRecentsVisibility(boolean visible) {
        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
                != PackageManager.PERMISSION_GRANTED) {
            throw new SecurityException("Caller does not hold permission "
                    + android.Manifest.permission.STATUS_BAR);
        }

        mAmInternal.enforceCallerIsRecentsOrHasPermission(android.Manifest.permission.STATUS_BAR,
                "setRecentsVisibility()");
        synchronized (mWindowMap) {
            mPolicy.setRecentsVisibilityLw(visible);
        }