Drop PendingIntent extras from external packages during enrollment.
Bug: 388528350 Flag: EXEMPT bugfix Test: atest FingerprintEnrollIntroductionTest FaceEnrollIntroductionTest (cherry picked from commit 4ccdeee849d5fef78498ba33cadc525523efcbd7) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9dd5ed1cea0449812775fb76a46f8be2e6862425) Merged-In: I61281dcf95e53100a96d6a218f3f00fd1b4ea3f9 Change-Id: I61281dcf95e53100a96d6a218f3f00fd1b4ea3f9
This commit is contained in:
committed by
Android Build Coastguard Worker
parent
dc41d27f1b
commit
d50de07930
@@ -50,6 +50,8 @@ import com.google.android.setupdesign.span.LinkSpan;
|
||||
import com.google.android.setupdesign.template.RequireScrollMixin;
|
||||
import com.google.android.setupdesign.util.DynamicColorPalette;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Abstract base class for the intro onboarding activity for biometric enrollment.
|
||||
*/
|
||||
@@ -249,6 +251,19 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
!isScrollNeeded && !enrollmentCompleted ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
if (!getPackageName().equals(getCallingPackage())) {
|
||||
for (String key : List.of(MultiBiometricEnrollHelper.EXTRA_SKIP_PENDING_ENROLL,
|
||||
MultiBiometricEnrollHelper.EXTRA_ENROLL_AFTER_FACE,
|
||||
MultiBiometricEnrollHelper.EXTRA_ENROLL_AFTER_FINGERPRINT)) {
|
||||
getIntent().removeExtra(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
@@ -497,14 +512,15 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
getIntent().removeExtra(MultiBiometricEnrollHelper.EXTRA_ENROLL_AFTER_FINGERPRINT);
|
||||
}
|
||||
|
||||
protected void removeEnrollNextBiometricIfSkipEnroll(@Nullable Intent data) {
|
||||
private void removeEnrollNextBiometricIfSkipEnroll(@Nullable Intent data) {
|
||||
if (data != null
|
||||
&& data.getBooleanExtra(
|
||||
MultiBiometricEnrollHelper.EXTRA_SKIP_PENDING_ENROLL, false)) {
|
||||
removeEnrollNextBiometric();
|
||||
}
|
||||
}
|
||||
protected void handleBiometricResultSkipOrFinished(int resultCode, @Nullable Intent data) {
|
||||
|
||||
private void handleBiometricResultSkipOrFinished(int resultCode, @Nullable Intent data) {
|
||||
removeEnrollNextBiometricIfSkipEnroll(data);
|
||||
if (resultCode == RESULT_SKIP) {
|
||||
onEnrollmentSkipped(data);
|
||||
|
||||
Reference in New Issue
Block a user