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

Commit 4bec55f2 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Allow recents to add TYPE_NAVIGATION_BAR window for task bar" into main

parents ffdc8374 7c00527f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -4653,7 +4653,7 @@
        @hide
        @hide
        @SystemApi -->
        @SystemApi -->
    <permission android:name="android.permission.STATUS_BAR_SERVICE"
    <permission android:name="android.permission.STATUS_BAR_SERVICE"
        android:protectionLevel="signature" />
        android:protectionLevel="signature|recents" />


    <!-- Allows an application to bind to third party quick settings tiles.
    <!-- Allows an application to bind to third party quick settings tiles.
         <p>Should only be requested by the System, should be required by
         <p>Should only be requested by the System, should be required by
@@ -4717,7 +4717,7 @@
         @hide
         @hide
    -->
    -->
    <permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"
    <permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"
        android:protectionLevel="signature|module" />
        android:protectionLevel="signature|module|recents" />


    <!-- Allows an application to avoid all toast rate limiting restrictions.
    <!-- Allows an application to avoid all toast rate limiting restrictions.
         <p>Not for use by third-party applications.
         <p>Not for use by third-party applications.
+4 −9
Original line number Original line Diff line number Diff line
@@ -1034,20 +1034,15 @@ public class DisplayPolicy {
                }
                }
                break;
                break;
            case TYPE_NAVIGATION_BAR:
            case TYPE_NAVIGATION_BAR:
                mContext.enforcePermission(
                mContext.enforcePermission(android.Manifest.permission.STATUS_BAR_SERVICE,
                        android.Manifest.permission.STATUS_BAR_SERVICE, callingPid, callingUid,
                        callingPid, callingUid, "DisplayPolicy");
                        "DisplayPolicy");
                if (mNavigationBar != null && mNavigationBar.isAlive()) {
                if (mNavigationBar != null && mNavigationBar.isAlive()) {
                    return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
                    return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
                }
                }
                break;
                break;
            case TYPE_NAVIGATION_BAR_PANEL:
            case TYPE_NAVIGATION_BAR_PANEL:
                // Check for permission if the caller is not the recents component.
                mContext.enforcePermission(android.Manifest.permission.STATUS_BAR_SERVICE,
                if (!mService.mAtmService.isCallerRecents(callingUid)) {
                        callingPid, callingUid, "DisplayPolicy");
                    mContext.enforcePermission(
                            android.Manifest.permission.STATUS_BAR_SERVICE, callingPid, callingUid,
                            "DisplayPolicy");
                }
                break;
                break;
            case TYPE_STATUS_BAR_ADDITIONAL:
            case TYPE_STATUS_BAR_ADDITIONAL:
            case TYPE_STATUS_BAR_SUB_PANEL:
            case TYPE_STATUS_BAR_SUB_PANEL: