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

Commit 75057b15 authored by Joe Onorato's avatar Joe Onorato Committed by Android Git Automerger
Browse files

am 4de68bae: Merge "Check for the STATUS_BAR permission for the system UI...

am 4de68bae: Merge "Check for the STATUS_BAR permission for the system UI properties." into honeycomb

* commit '4de68bae':
  Check for the STATUS_BAR permission for the system UI properties.
parents 80a3083f 4de68bae
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1869,6 +1869,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
     * This view's request for the visibility of the status bar.
     * @hide
     */
    @ViewDebug.ExportedProperty()
    int mSystemUiVisibility;

    /**
+10 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import com.android.server.am.BatteryStatsService;
import android.Manifest;
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
import android.app.StatusBarManager;
import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.ClipData;
@@ -2758,6 +2759,15 @@ public class WindowManagerService extends IWindowManager.Stub
        boolean displayed = false;
        boolean inTouchMode;
        boolean configChanged;

        // if they don't have this permission, mask out the status bar bits
        if (attrs != null) {
            if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
                    != PackageManager.PERMISSION_GRANTED) {
                attrs.systemUiVisibility &= ~StatusBarManager.DISABLE_MASK;
                attrs.subtreeSystemUiVisibility &= ~StatusBarManager.DISABLE_MASK;
            }
        }
        long origId = Binder.clearCallingIdentity();

        synchronized(mWindowMap) {