Loading core/java/android/content/Intent.java +1 −1 Original line number Diff line number Diff line Loading @@ -11488,7 +11488,7 @@ public class Intent implements Parcelable, Cloneable { private void toUriInner(StringBuilder uri, String scheme, String defAction, String defPackage, int flags) { if (scheme != null) { uri.append("scheme=").append(scheme).append(';'); uri.append("scheme=").append(Uri.encode(scheme)).append(';'); } if (mAction != null && !mAction.equals(defAction)) { uri.append("action=").append(Uri.encode(mAction)).append(';'); Loading core/java/android/content/IntentSender.java +39 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.content; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManager.PendingIntentInfo; import android.app.ActivityOptions; import android.compat.annotation.UnsupportedAppUsage; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -158,7 +159,7 @@ public class IntentSender implements Parcelable { */ public void sendIntent(Context context, int code, Intent intent, OnFinished onFinished, Handler handler) throws SendIntentException { sendIntent(context, code, intent, onFinished, handler, null); sendIntent(context, code, intent, onFinished, handler, null, null /* options */); } /** Loading Loading @@ -190,6 +191,42 @@ public class IntentSender implements Parcelable { public void sendIntent(Context context, int code, Intent intent, OnFinished onFinished, Handler handler, String requiredPermission) throws SendIntentException { sendIntent(context, code, intent, onFinished, handler, requiredPermission, null /* options */); } /** * Perform the operation associated with this IntentSender, allowing the * caller to specify information about the Intent to use and be notified * when the send has completed. * * @param context The Context of the caller. This may be null if * <var>intent</var> is also null. * @param code Result code to supply back to the IntentSender's target. * @param intent Additional Intent data. See {@link Intent#fillIn * Intent.fillIn()} for information on how this is applied to the * original Intent. Use null to not modify the original Intent. * @param onFinished The object to call back on when the send has * completed, or null for no callback. * @param handler Handler identifying the thread on which the callback * should happen. If null, the callback will happen from the thread * pool of the process. * @param requiredPermission Name of permission that a recipient of the PendingIntent * is required to hold. This is only valid for broadcast intents, and * corresponds to the permission argument in * {@link Context#sendBroadcast(Intent, String) Context.sendOrderedBroadcast(Intent, String)}. * If null, no permission is required. * @param options Additional options the caller would like to provide to modify the sending * behavior. May be built from an {@link ActivityOptions} to apply to an activity start. * * @throws SendIntentException Throws CanceledIntentException if the IntentSender * is no longer allowing more intents to be sent through it. * @hide */ public void sendIntent(Context context, int code, Intent intent, OnFinished onFinished, Handler handler, String requiredPermission, @Nullable Bundle options) throws SendIntentException { try { String resolvedType = intent != null ? intent.resolveTypeIfNeeded(context.getContentResolver()) Loading @@ -199,7 +236,7 @@ public class IntentSender implements Parcelable { onFinished != null ? new FinishedDispatcher(this, onFinished, handler) : null, requiredPermission, null); requiredPermission, options); if (res < 0) { throw new SendIntentException(); } Loading packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt +10 −4 Original line number Diff line number Diff line Loading @@ -298,10 +298,16 @@ constructor( ) { val view = openedDialogs.firstOrNull { it.dialog == animateFrom }?.dialogContentWithBackground ?: throw IllegalStateException( "The animateFrom dialog was not animated using " + "DialogLaunchAnimator.showFrom(View|Dialog)" if (view == null) { Log.w( TAG, "Showing dialog $dialog normally as the dialog it is shown from was not shown " + "using DialogLaunchAnimator" ) dialog.show() return } showFromView( dialog, view, Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +2 −1 Original line number Diff line number Diff line Loading @@ -2735,7 +2735,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab boolean shouldListen = shouldListenKeyguardState && shouldListenUserState && shouldListenBouncerState && shouldListenUdfpsState && shouldListenSideFpsState; && shouldListenSideFpsState && !isFingerprintLockedOut(); logListenerModelData( new KeyguardFingerprintListenModel( System.currentTimeMillis(), Loading packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +5 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOM import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN; import static com.android.keyguard.FaceAuthApiRequestReason.NOTIFICATION_PANEL_CLICKED; import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_STATE_CANCELLING; import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_STATE_CANCELLING_RESTARTING; import static com.android.keyguard.KeyguardUpdateMonitor.DEFAULT_CANCEL_SIGNAL_TIMEOUT; import static com.android.keyguard.KeyguardUpdateMonitor.HAL_POWER_PRESS_TIMEOUT; Loading Loading @@ -1040,10 +1041,11 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { assertThat(mKeyguardUpdateMonitor.isFingerprintLockedOut()).isEqualTo(fpLocked); assertThat(mKeyguardUpdateMonitor.isFaceLockedOut()).isEqualTo(faceLocked); // Fingerprint should be restarted once its cancelled bc on lockout, the device // can still detectFingerprint (and if it's not locked out, fingerprint can listen) // Fingerprint should be cancelled on lockout if going to lockout state, else // restarted if it's not assertThat(mKeyguardUpdateMonitor.mFingerprintRunningState) .isEqualTo(BIOMETRIC_STATE_CANCELLING_RESTARTING); .isEqualTo(fpLocked ? BIOMETRIC_STATE_CANCELLING : BIOMETRIC_STATE_CANCELLING_RESTARTING); } @Test Loading Loading
core/java/android/content/Intent.java +1 −1 Original line number Diff line number Diff line Loading @@ -11488,7 +11488,7 @@ public class Intent implements Parcelable, Cloneable { private void toUriInner(StringBuilder uri, String scheme, String defAction, String defPackage, int flags) { if (scheme != null) { uri.append("scheme=").append(scheme).append(';'); uri.append("scheme=").append(Uri.encode(scheme)).append(';'); } if (mAction != null && !mAction.equals(defAction)) { uri.append("action=").append(Uri.encode(mAction)).append(';'); Loading
core/java/android/content/IntentSender.java +39 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.content; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManager.PendingIntentInfo; import android.app.ActivityOptions; import android.compat.annotation.UnsupportedAppUsage; import android.os.Bundle; import android.os.Handler; Loading Loading @@ -158,7 +159,7 @@ public class IntentSender implements Parcelable { */ public void sendIntent(Context context, int code, Intent intent, OnFinished onFinished, Handler handler) throws SendIntentException { sendIntent(context, code, intent, onFinished, handler, null); sendIntent(context, code, intent, onFinished, handler, null, null /* options */); } /** Loading Loading @@ -190,6 +191,42 @@ public class IntentSender implements Parcelable { public void sendIntent(Context context, int code, Intent intent, OnFinished onFinished, Handler handler, String requiredPermission) throws SendIntentException { sendIntent(context, code, intent, onFinished, handler, requiredPermission, null /* options */); } /** * Perform the operation associated with this IntentSender, allowing the * caller to specify information about the Intent to use and be notified * when the send has completed. * * @param context The Context of the caller. This may be null if * <var>intent</var> is also null. * @param code Result code to supply back to the IntentSender's target. * @param intent Additional Intent data. See {@link Intent#fillIn * Intent.fillIn()} for information on how this is applied to the * original Intent. Use null to not modify the original Intent. * @param onFinished The object to call back on when the send has * completed, or null for no callback. * @param handler Handler identifying the thread on which the callback * should happen. If null, the callback will happen from the thread * pool of the process. * @param requiredPermission Name of permission that a recipient of the PendingIntent * is required to hold. This is only valid for broadcast intents, and * corresponds to the permission argument in * {@link Context#sendBroadcast(Intent, String) Context.sendOrderedBroadcast(Intent, String)}. * If null, no permission is required. * @param options Additional options the caller would like to provide to modify the sending * behavior. May be built from an {@link ActivityOptions} to apply to an activity start. * * @throws SendIntentException Throws CanceledIntentException if the IntentSender * is no longer allowing more intents to be sent through it. * @hide */ public void sendIntent(Context context, int code, Intent intent, OnFinished onFinished, Handler handler, String requiredPermission, @Nullable Bundle options) throws SendIntentException { try { String resolvedType = intent != null ? intent.resolveTypeIfNeeded(context.getContentResolver()) Loading @@ -199,7 +236,7 @@ public class IntentSender implements Parcelable { onFinished != null ? new FinishedDispatcher(this, onFinished, handler) : null, requiredPermission, null); requiredPermission, options); if (res < 0) { throw new SendIntentException(); } Loading
packages/SystemUI/animation/src/com/android/systemui/animation/DialogLaunchAnimator.kt +10 −4 Original line number Diff line number Diff line Loading @@ -298,10 +298,16 @@ constructor( ) { val view = openedDialogs.firstOrNull { it.dialog == animateFrom }?.dialogContentWithBackground ?: throw IllegalStateException( "The animateFrom dialog was not animated using " + "DialogLaunchAnimator.showFrom(View|Dialog)" if (view == null) { Log.w( TAG, "Showing dialog $dialog normally as the dialog it is shown from was not shown " + "using DialogLaunchAnimator" ) dialog.show() return } showFromView( dialog, view, Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +2 −1 Original line number Diff line number Diff line Loading @@ -2735,7 +2735,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab boolean shouldListen = shouldListenKeyguardState && shouldListenUserState && shouldListenBouncerState && shouldListenUdfpsState && shouldListenSideFpsState; && shouldListenSideFpsState && !isFingerprintLockedOut(); logListenerModelData( new KeyguardFingerprintListenModel( System.currentTimeMillis(), Loading
packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +5 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOM import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN; import static com.android.keyguard.FaceAuthApiRequestReason.NOTIFICATION_PANEL_CLICKED; import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_STATE_CANCELLING; import static com.android.keyguard.KeyguardUpdateMonitor.BIOMETRIC_STATE_CANCELLING_RESTARTING; import static com.android.keyguard.KeyguardUpdateMonitor.DEFAULT_CANCEL_SIGNAL_TIMEOUT; import static com.android.keyguard.KeyguardUpdateMonitor.HAL_POWER_PRESS_TIMEOUT; Loading Loading @@ -1040,10 +1041,11 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { assertThat(mKeyguardUpdateMonitor.isFingerprintLockedOut()).isEqualTo(fpLocked); assertThat(mKeyguardUpdateMonitor.isFaceLockedOut()).isEqualTo(faceLocked); // Fingerprint should be restarted once its cancelled bc on lockout, the device // can still detectFingerprint (and if it's not locked out, fingerprint can listen) // Fingerprint should be cancelled on lockout if going to lockout state, else // restarted if it's not assertThat(mKeyguardUpdateMonitor.mFingerprintRunningState) .isEqualTo(BIOMETRIC_STATE_CANCELLING_RESTARTING); .isEqualTo(fpLocked ? BIOMETRIC_STATE_CANCELLING : BIOMETRIC_STATE_CANCELLING_RESTARTING); } @Test Loading