Merge "Remove EXTRA_KEY_TYPE intent data"

This commit is contained in:
Eric Biggers
2022-03-22 17:37:33 +00:00
committed by Gerrit Code Review
3 changed files with 1 additions and 11 deletions

View File

@@ -44,7 +44,6 @@ public final class ChooseLockSettingsHelper {
private static final String TAG = "ChooseLockSettingsHelper"; private static final String TAG = "ChooseLockSettingsHelper";
public static final String EXTRA_KEY_TYPE = "type";
public static final String EXTRA_KEY_PASSWORD = "password"; public static final String EXTRA_KEY_PASSWORD = "password";
public static final String EXTRA_KEY_RETURN_CREDENTIALS = "return_credentials"; public static final String EXTRA_KEY_RETURN_CREDENTIALS = "return_credentials";
// Force the verifyCredential path instead of checkCredential path. This will be removed // Force the verifyCredential path instead of checkCredential path. This will be removed
@@ -191,7 +190,7 @@ public final class ChooseLockSettingsHelper {
/** /**
* @param returnCredentials if true, puts the following credentials into intent for * @param returnCredentials if true, puts the following credentials into intent for
* onActivityResult with the following keys: * onActivityResult with the following keys:
* {@link #EXTRA_KEY_TYPE}, {@link #EXTRA_KEY_PASSWORD}, * {@link #EXTRA_KEY_PASSWORD},
* {@link #EXTRA_KEY_CHALLENGE_TOKEN}, * {@link #EXTRA_KEY_CHALLENGE_TOKEN},
* {@link #EXTRA_KEY_GK_PW_HANDLE} * {@link #EXTRA_KEY_GK_PW_HANDLE}
* Note that if this is true, this can only be called internally. * Note that if this is true, this can only be called internally.

View File

@@ -29,7 +29,6 @@ import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.UserManager; import android.os.UserManager;
import android.os.storage.StorageManager;
import android.text.Editable; import android.text.Editable;
import android.text.InputType; import android.text.InputType;
import android.text.TextUtils; import android.text.TextUtils;
@@ -445,11 +444,6 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
public void onChecked(boolean matched, int timeoutMs) { public void onChecked(boolean matched, int timeoutMs) {
mPendingLockCheck = null; mPendingLockCheck = null;
if (matched && isInternalActivity() && mReturnCredentials) { if (matched && isInternalActivity() && mReturnCredentials) {
// TODO: get rid of EXTRA_KEY_TYPE, since EXTRA_KEY_PASSWORD already
// distinguishes beteween PIN and password.
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_TYPE,
mIsAlpha ? StorageManager.CRYPT_TYPE_PASSWORD
: StorageManager.CRYPT_TYPE_PIN);
intent.putExtra( intent.putExtra(
ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, credential); ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, credential);
} }

View File

@@ -26,7 +26,6 @@ import android.os.Bundle;
import android.os.CountDownTimer; import android.os.CountDownTimer;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.UserManager; import android.os.UserManager;
import android.os.storage.StorageManager;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent; import android.view.MotionEvent;
@@ -506,8 +505,6 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
public void onChecked(boolean matched, int timeoutMs) { public void onChecked(boolean matched, int timeoutMs) {
mPendingLockCheck = null; mPendingLockCheck = null;
if (matched && isInternalActivity() && mReturnCredentials) { if (matched && isInternalActivity() && mReturnCredentials) {
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_TYPE,
StorageManager.CRYPT_TYPE_PATTERN);
intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD,
pattern); pattern);
} }