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

Commit 7c00527f authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Allow recents to add TYPE_NAVIGATION_BAR window for task bar

The context is that we have task bar of TYPE_NAVIGATION_BAR_PANEL currently.

We are adding it as a TYPE_NAVIGATION_BAR instead, particularly for the work of task bar / nav bar unification. For more context, see ag/25093509

Bug: 304426019
Test: manual
Change-Id: I72e99940c0cbcbd3bee1e2ad44140e6fd1d9e512
parent 705e7fa0
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -4647,7 +4647,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
@@ -4711,7 +4711,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: