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

Commit fb68b0ad authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #21895842: Add is_assist_blocked to assist.ViewNode.NodeProperties" into mnc-dev

parents ffbdb8ad afb308d6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1106,7 +1106,7 @@ public class AssistStructure implements Parcelable {
        @Override
        public void setAssistBlocked(boolean state) {
            mNode.mFlags = (mNode.mFlags&~ViewNode.FLAGS_ASSIST_BLOCKED)
                    | (state ? 0 : ViewNode.FLAGS_ASSIST_BLOCKED);
                    | (state ? ViewNode.FLAGS_ASSIST_BLOCKED : 0);
        }

        @Override
@@ -1412,6 +1412,9 @@ public class AssistStructure implements Parcelable {
        if (extras != null) {
            Log.i(TAG, prefix + "  Extras: " + extras);
        }
        if (node.isAssistBlocked()) {
            Log.i(TAG, prefix + "  BLOCKED");
        }
        final int NCHILDREN = node.getChildCount();
        if (NCHILDREN > 0) {
            Log.i(TAG, prefix + "  Children:");
+13 −0
Original line number Diff line number Diff line
@@ -2658,6 +2658,16 @@ public class WindowManagerService extends IWindowManager.Stub
        return disabled;
    }

    boolean isSecureLocked(WindowState w) {
        if ((w.mAttrs.flags&WindowManager.LayoutParams.FLAG_SECURE) != 0) {
            return true;
        }
        if (isScreenCaptureDisabledLocked(UserHandle.getUserId(w.mOwnerUid))) {
            return true;
        }
        return false;
    }

    /**
     * Set mScreenCaptureDisabled for specific user
     */
@@ -3169,6 +3179,9 @@ public class WindowManagerService extends IWindowManager.Stub
            boolean wallpaperMayMove = win.mViewVisibility != viewVisibility
                    && (win.mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0;
            wallpaperMayMove |= (flagChanges & FLAG_SHOW_WALLPAPER) != 0;
            if ((flagChanges & FLAG_SECURE) != 0 && winAnimator.mSurfaceControl != null) {
                winAnimator.mSurfaceControl.setSecure(isSecureLocked(win));
            }

            win.mRelayoutCalled = true;
            final int oldVisibility = win.mViewVisibility;
+1 −5
Original line number Diff line number Diff line
@@ -788,11 +788,7 @@ class WindowStateAnimator {
            int flags = SurfaceControl.HIDDEN;
            final WindowManager.LayoutParams attrs = w.mAttrs;

            if ((attrs.flags&WindowManager.LayoutParams.FLAG_SECURE) != 0) {
                flags |= SurfaceControl.SECURE;
            }

            if (mService.isScreenCaptureDisabledLocked(UserHandle.getUserId(mWin.mOwnerUid))) {
            if (mService.isSecureLocked(w)) {
                flags |= SurfaceControl.SECURE;
            }

+6 −0
Original line number Diff line number Diff line
@@ -26,6 +26,12 @@
        android:text="@string/start"
        />

    <CheckBox android:id="@+id/secure"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/secure"
        />

    <com.android.test.voiceinteraction.AsyncStructure
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
<resources>

    <string name="start">Start</string>
    <string name="secure">Secure</string>
    <string name="tree">Tree</string>
    <string name="text">Text</string>
    <string name="asyncStructure">(Async structure goes here)</string>
Loading