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

Commit 66e69871 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 92324644 from 053dd71d to tm-qpr2-release

Change-Id: I94a47c12686a69604217ff800fb7c61540c9054f
parents 036c2d86 053dd71d
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -139,21 +139,29 @@ public class ClipDescription implements Parcelable {
     * password or credit card number.
     * <p>
     * Type: boolean
     * </p>
     * <p>
     * This extra can be used to indicate that a ClipData contains sensitive information that
     * should be redacted or hidden from view until a user takes explicit action to reveal it
     * (e.g., by pasting).
     * </p>
     * <p>
     * Adding this extra does not change clipboard behavior or add additional security to
     * the ClipData. Its purpose is essentially a rendering hint from the source application,
     * asking that the data within be obfuscated or redacted, unless the user has taken action
     * to make it visible.
     * </p>
     */
    public static final String EXTRA_IS_SENSITIVE = "android.content.extra.IS_SENSITIVE";

    /** Indicates that a ClipData's source is a remote device.
     * <p>
     *     Type: boolean
     * <p>
     *     This extra can be used to indicate that a ClipData comes from a separate device rather
     *     than being local. It is a rendering hint that can be used to take different behavior
     *     based on the source device of copied data.
     * @hide
     */
    public static final String EXTRA_IS_REMOTE_DEVICE = "android.content.extra.IS_REMOTE_DEVICE";

    /** @hide */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(value =
+20 −3
Original line number Diff line number Diff line
@@ -3344,9 +3344,26 @@ public final class Settings {
                    }
                }
                Bundle b;
                // b/252663068: if we're in system server and the caller did not call
                // clearCallingIdentity, the read would fail due to mismatched AttributionSources.
                // TODO(b/256013480): remove this bypass after fixing the callers in system server.
                if (namespace.equals(DeviceConfig.NAMESPACE_DEVICE_POLICY_MANAGER)
                        && Settings.isInSystemServer()
                        && Binder.getCallingUid() != Process.myUid()) {
                    final long token = Binder.clearCallingIdentity();
                    try {
                        // Fetch all flags for the namespace at once for caching purposes
                        b = cp.call(cr.getAttributionSource(),
                                mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args);
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                } else {
                    // Fetch all flags for the namespace at once for caching purposes
                Bundle b = cp.call(cr.getAttributionSource(),
                    b = cp.call(cr.getAttributionSource(),
                            mProviderHolder.mUri.getAuthority(), mCallListCommand, null, args);
                }
                if (b == null) {
                    // Invalid response, return an empty map
                    return keyValues;
+1 −1
Original line number Diff line number Diff line
@@ -40,5 +40,5 @@ oneway interface IVoiceInteractionSession {
    void closeSystemDialogs();
    void onLockscreenShown();
    void destroy();
    void updateVisibleActivityInfo(in VisibleActivityInfo visibleActivityInfo, int type);
    void notifyVisibleActivityInfoChanged(in VisibleActivityInfo visibleActivityInfo, int type);
}
+14 −11
Original line number Diff line number Diff line
@@ -358,9 +358,10 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
        }

        @Override
        public void updateVisibleActivityInfo(VisibleActivityInfo visibleActivityInfo, int type) {
        public void notifyVisibleActivityInfoChanged(VisibleActivityInfo visibleActivityInfo,
                int type) {
            mHandlerCaller.sendMessage(
                    mHandlerCaller.obtainMessageIO(MSG_UPDATE_VISIBLE_ACTIVITY_INFO, type,
                    mHandlerCaller.obtainMessageIO(MSG_NOTIFY_VISIBLE_ACTIVITY_INFO_CHANGED, type,
                            visibleActivityInfo));
        }
    };
@@ -854,7 +855,7 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
    static final int MSG_SHOW = 106;
    static final int MSG_HIDE = 107;
    static final int MSG_ON_LOCKSCREEN_SHOWN = 108;
    static final int MSG_UPDATE_VISIBLE_ACTIVITY_INFO = 109;
    static final int MSG_NOTIFY_VISIBLE_ACTIVITY_INFO_CHANGED = 109;
    static final int MSG_REGISTER_VISIBLE_ACTIVITY_CALLBACK = 110;
    static final int MSG_UNREGISTER_VISIBLE_ACTIVITY_CALLBACK = 111;

@@ -942,12 +943,13 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
                    if (DEBUG) Log.d(TAG, "onLockscreenShown");
                    onLockscreenShown();
                    break;
                case MSG_UPDATE_VISIBLE_ACTIVITY_INFO:
                case MSG_NOTIFY_VISIBLE_ACTIVITY_INFO_CHANGED:
                    if (DEBUG) {
                        Log.d(TAG, "doUpdateVisibleActivityInfo: visibleActivityInfo=" + msg.obj
                        Log.d(TAG,
                                "doNotifyVisibleActivityInfoChanged: visibleActivityInfo=" + msg.obj
                                        + " type=" + msg.arg1);
                    }
                    doUpdateVisibleActivityInfo((VisibleActivityInfo) msg.obj, msg.arg1);
                    doNotifyVisibleActivityInfoChanged((VisibleActivityInfo) msg.obj, msg.arg1);
                    break;
                case MSG_REGISTER_VISIBLE_ACTIVITY_CALLBACK:
                    if (DEBUG) {
@@ -1157,7 +1159,8 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
        }
    }

    private void doUpdateVisibleActivityInfo(VisibleActivityInfo visibleActivityInfo, int type) {
    private void doNotifyVisibleActivityInfoChanged(VisibleActivityInfo visibleActivityInfo,
            int type) {

        if (mVisibleActivityCallbacks.isEmpty()) {
            return;
@@ -1165,11 +1168,11 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall

        switch (type) {
            case VisibleActivityInfo.TYPE_ACTIVITY_ADDED:
                informVisibleActivityChanged(visibleActivityInfo, type);
                notifyVisibleActivityChanged(visibleActivityInfo, type);
                mVisibleActivityInfos.add(visibleActivityInfo);
                break;
            case VisibleActivityInfo.TYPE_ACTIVITY_REMOVED:
                informVisibleActivityChanged(visibleActivityInfo, type);
                notifyVisibleActivityChanged(visibleActivityInfo, type);
                mVisibleActivityInfos.remove(visibleActivityInfo);
                break;
        }
@@ -1214,7 +1217,7 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
        }
    }

    private void informVisibleActivityChanged(VisibleActivityInfo visibleActivityInfo, int type) {
    private void notifyVisibleActivityChanged(VisibleActivityInfo visibleActivityInfo, int type) {
        for (Map.Entry<VisibleActivityCallback, Executor> e :
                mVisibleActivityCallbacks.entrySet()) {
            final Executor executor = e.getValue();
+1 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
        @Override
        public void onSwipeUp() {
            if (!mUpdateMonitor.isFaceDetectionRunning()) {
                boolean didFaceAuthRun = mUpdateMonitor.requestFaceAuth(true,
                boolean didFaceAuthRun = mUpdateMonitor.requestFaceAuth(
                        FaceAuthApiRequestReason.SWIPE_UP_ON_BOUNCER);
                mKeyguardSecurityCallback.userActivity();
                if (didFaceAuthRun) {
Loading