Loading core/java/android/appwidget/AppWidgetHostView.java +0 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.Activity; import android.app.ActivityOptions; import android.app.LoadedApk; import android.compat.annotation.UnsupportedAppUsage; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -749,9 +748,6 @@ public class AppWidgetHostView extends FrameLayout implements AppWidgetHost.AppW */ protected Context getRemoteContextEnsuringCorrectCachedApkPath() { try { ApplicationInfo expectedAppInfo = mInfo.providerInfo.applicationInfo; LoadedApk.checkAndUpdateApkPaths(expectedAppInfo); // Return if cloned successfully, otherwise default Context newContext = mContext.createApplicationContext( mInfo.providerInfo.applicationInfo, Context.CONTEXT_RESTRICTED); Loading core/java/android/hardware/biometrics/BiometricPrompt.java +14 −0 Original line number Diff line number Diff line Loading @@ -591,6 +591,20 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan return this; } /** * Set the class name of ConfirmDeviceCredentialActivity. * * @return This builder. * @hide */ @NonNull @RequiresPermission(anyOf = {TEST_BIOMETRIC, USE_BIOMETRIC_INTERNAL}) public Builder setClassNameIfItIsConfirmDeviceCredentialActivity() { mPromptInfo.setClassNameIfItIsConfirmDeviceCredentialActivity( mContext.getClass().getName()); return this; } /** * Creates a {@link BiometricPrompt}. * Loading core/java/android/hardware/biometrics/PromptInfo.java +20 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public class PromptInfo implements Parcelable { private boolean mIsForLegacyFingerprintManager = false; private boolean mShowEmergencyCallButton = false; private boolean mUseParentProfileForDeviceCredential = false; private String mClassNameIfItIsConfirmDeviceCredentialActivity = null; public PromptInfo() { Loading Loading @@ -87,6 +88,7 @@ public class PromptInfo implements Parcelable { mIsForLegacyFingerprintManager = in.readBoolean(); mShowEmergencyCallButton = in.readBoolean(); mUseParentProfileForDeviceCredential = in.readBoolean(); mClassNameIfItIsConfirmDeviceCredentialActivity = in.readString(); } public static final Creator<PromptInfo> CREATOR = new Creator<PromptInfo>() { Loading Loading @@ -132,6 +134,7 @@ public class PromptInfo implements Parcelable { dest.writeBoolean(mIsForLegacyFingerprintManager); dest.writeBoolean(mShowEmergencyCallButton); dest.writeBoolean(mUseParentProfileForDeviceCredential); dest.writeString(mClassNameIfItIsConfirmDeviceCredentialActivity); } // LINT.IfChange Loading @@ -148,6 +151,8 @@ public class PromptInfo implements Parcelable { return true; } else if (mIgnoreEnrollmentState) { return true; } else if (mClassNameIfItIsConfirmDeviceCredentialActivity != null) { return true; } return false; } Loading Loading @@ -296,6 +301,13 @@ public class PromptInfo implements Parcelable { mUseParentProfileForDeviceCredential = useParentProfileForDeviceCredential; } /** * Set the class name of ConfirmDeviceCredentialActivity. */ void setClassNameIfItIsConfirmDeviceCredentialActivity(String className) { mClassNameIfItIsConfirmDeviceCredentialActivity = className; } // Getters @DrawableRes public int getLogoRes() { Loading Loading @@ -409,4 +421,12 @@ public class PromptInfo implements Parcelable { "Exclusively one of logo resource or logo bitmap can be set"); } } /** * Get the class name of ConfirmDeviceCredentialActivity. Returns null if the direct caller is * not ConfirmDeviceCredentialActivity. */ public String getClassNameIfItIsConfirmDeviceCredentialActivity() { return mClassNameIfItIsConfirmDeviceCredentialActivity; } } core/java/android/os/BaseBundle.java +5 −5 Original line number Diff line number Diff line Loading @@ -472,10 +472,10 @@ public class BaseBundle { map.erase(); map.ensureCapacity(count); } int numLazyValues = 0; int[] numLazyValues = new int[]{0}; try { numLazyValues = parcelledData.readArrayMap(map, count, !parcelledByNative, /* lazy */ ownsParcel, mClassLoader); parcelledData.readArrayMap(map, count, !parcelledByNative, /* lazy */ ownsParcel, mClassLoader, numLazyValues); } catch (BadParcelableException e) { if (sShouldDefuse) { Log.w(TAG, "Failed to parse Bundle, but defusing quietly", e); Loading @@ -486,14 +486,14 @@ public class BaseBundle { } finally { mWeakParcelledData = null; if (ownsParcel) { if (numLazyValues == 0) { if (numLazyValues[0] == 0) { recycleParcel(parcelledData); } else { mWeakParcelledData = new WeakReference<>(parcelledData); } } mLazyValues = numLazyValues; mLazyValues = numLazyValues[0]; mParcelledByNative = false; mMap = map; // Set field last as it is volatile Loading core/java/android/os/Parcel.java +5 −7 Original line number Diff line number Diff line Loading @@ -5482,7 +5482,7 @@ public final class Parcel { private void readArrayMapInternal(@NonNull ArrayMap<? super String, Object> outVal, int size, @Nullable ClassLoader loader) { readArrayMap(outVal, size, /* sorted */ true, /* lazy */ false, loader); readArrayMap(outVal, size, /* sorted */ true, /* lazy */ false, loader, null); } /** Loading @@ -5492,17 +5492,16 @@ public final class Parcel { * @param lazy Whether to populate the map with lazy {@link Function} objects for * length-prefixed values. See {@link Parcel#readLazyValue(ClassLoader)} for more * details. * @return a count of the lazy values in the map * @param lazyValueCount number of lazy values added here * @hide */ int readArrayMap(ArrayMap<? super String, Object> map, int size, boolean sorted, boolean lazy, @Nullable ClassLoader loader) { int lazyValues = 0; void readArrayMap(ArrayMap<? super String, Object> map, int size, boolean sorted, boolean lazy, @Nullable ClassLoader loader, int[] lazyValueCount) { while (size > 0) { String key = readString(); Object value = (lazy) ? readLazyValue(loader) : readValue(loader); if (value instanceof LazyValue) { lazyValues++; lazyValueCount[0]++; } if (sorted) { map.append(key, value); Loading @@ -5514,7 +5513,6 @@ public final class Parcel { if (sorted) { map.validate(); } return lazyValues; } /** Loading Loading
core/java/android/appwidget/AppWidgetHostView.java +0 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.Activity; import android.app.ActivityOptions; import android.app.LoadedApk; import android.compat.annotation.UnsupportedAppUsage; import android.content.ComponentName; import android.content.Context; Loading Loading @@ -749,9 +748,6 @@ public class AppWidgetHostView extends FrameLayout implements AppWidgetHost.AppW */ protected Context getRemoteContextEnsuringCorrectCachedApkPath() { try { ApplicationInfo expectedAppInfo = mInfo.providerInfo.applicationInfo; LoadedApk.checkAndUpdateApkPaths(expectedAppInfo); // Return if cloned successfully, otherwise default Context newContext = mContext.createApplicationContext( mInfo.providerInfo.applicationInfo, Context.CONTEXT_RESTRICTED); Loading
core/java/android/hardware/biometrics/BiometricPrompt.java +14 −0 Original line number Diff line number Diff line Loading @@ -591,6 +591,20 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan return this; } /** * Set the class name of ConfirmDeviceCredentialActivity. * * @return This builder. * @hide */ @NonNull @RequiresPermission(anyOf = {TEST_BIOMETRIC, USE_BIOMETRIC_INTERNAL}) public Builder setClassNameIfItIsConfirmDeviceCredentialActivity() { mPromptInfo.setClassNameIfItIsConfirmDeviceCredentialActivity( mContext.getClass().getName()); return this; } /** * Creates a {@link BiometricPrompt}. * Loading
core/java/android/hardware/biometrics/PromptInfo.java +20 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public class PromptInfo implements Parcelable { private boolean mIsForLegacyFingerprintManager = false; private boolean mShowEmergencyCallButton = false; private boolean mUseParentProfileForDeviceCredential = false; private String mClassNameIfItIsConfirmDeviceCredentialActivity = null; public PromptInfo() { Loading Loading @@ -87,6 +88,7 @@ public class PromptInfo implements Parcelable { mIsForLegacyFingerprintManager = in.readBoolean(); mShowEmergencyCallButton = in.readBoolean(); mUseParentProfileForDeviceCredential = in.readBoolean(); mClassNameIfItIsConfirmDeviceCredentialActivity = in.readString(); } public static final Creator<PromptInfo> CREATOR = new Creator<PromptInfo>() { Loading Loading @@ -132,6 +134,7 @@ public class PromptInfo implements Parcelable { dest.writeBoolean(mIsForLegacyFingerprintManager); dest.writeBoolean(mShowEmergencyCallButton); dest.writeBoolean(mUseParentProfileForDeviceCredential); dest.writeString(mClassNameIfItIsConfirmDeviceCredentialActivity); } // LINT.IfChange Loading @@ -148,6 +151,8 @@ public class PromptInfo implements Parcelable { return true; } else if (mIgnoreEnrollmentState) { return true; } else if (mClassNameIfItIsConfirmDeviceCredentialActivity != null) { return true; } return false; } Loading Loading @@ -296,6 +301,13 @@ public class PromptInfo implements Parcelable { mUseParentProfileForDeviceCredential = useParentProfileForDeviceCredential; } /** * Set the class name of ConfirmDeviceCredentialActivity. */ void setClassNameIfItIsConfirmDeviceCredentialActivity(String className) { mClassNameIfItIsConfirmDeviceCredentialActivity = className; } // Getters @DrawableRes public int getLogoRes() { Loading Loading @@ -409,4 +421,12 @@ public class PromptInfo implements Parcelable { "Exclusively one of logo resource or logo bitmap can be set"); } } /** * Get the class name of ConfirmDeviceCredentialActivity. Returns null if the direct caller is * not ConfirmDeviceCredentialActivity. */ public String getClassNameIfItIsConfirmDeviceCredentialActivity() { return mClassNameIfItIsConfirmDeviceCredentialActivity; } }
core/java/android/os/BaseBundle.java +5 −5 Original line number Diff line number Diff line Loading @@ -472,10 +472,10 @@ public class BaseBundle { map.erase(); map.ensureCapacity(count); } int numLazyValues = 0; int[] numLazyValues = new int[]{0}; try { numLazyValues = parcelledData.readArrayMap(map, count, !parcelledByNative, /* lazy */ ownsParcel, mClassLoader); parcelledData.readArrayMap(map, count, !parcelledByNative, /* lazy */ ownsParcel, mClassLoader, numLazyValues); } catch (BadParcelableException e) { if (sShouldDefuse) { Log.w(TAG, "Failed to parse Bundle, but defusing quietly", e); Loading @@ -486,14 +486,14 @@ public class BaseBundle { } finally { mWeakParcelledData = null; if (ownsParcel) { if (numLazyValues == 0) { if (numLazyValues[0] == 0) { recycleParcel(parcelledData); } else { mWeakParcelledData = new WeakReference<>(parcelledData); } } mLazyValues = numLazyValues; mLazyValues = numLazyValues[0]; mParcelledByNative = false; mMap = map; // Set field last as it is volatile Loading
core/java/android/os/Parcel.java +5 −7 Original line number Diff line number Diff line Loading @@ -5482,7 +5482,7 @@ public final class Parcel { private void readArrayMapInternal(@NonNull ArrayMap<? super String, Object> outVal, int size, @Nullable ClassLoader loader) { readArrayMap(outVal, size, /* sorted */ true, /* lazy */ false, loader); readArrayMap(outVal, size, /* sorted */ true, /* lazy */ false, loader, null); } /** Loading @@ -5492,17 +5492,16 @@ public final class Parcel { * @param lazy Whether to populate the map with lazy {@link Function} objects for * length-prefixed values. See {@link Parcel#readLazyValue(ClassLoader)} for more * details. * @return a count of the lazy values in the map * @param lazyValueCount number of lazy values added here * @hide */ int readArrayMap(ArrayMap<? super String, Object> map, int size, boolean sorted, boolean lazy, @Nullable ClassLoader loader) { int lazyValues = 0; void readArrayMap(ArrayMap<? super String, Object> map, int size, boolean sorted, boolean lazy, @Nullable ClassLoader loader, int[] lazyValueCount) { while (size > 0) { String key = readString(); Object value = (lazy) ? readLazyValue(loader) : readValue(loader); if (value instanceof LazyValue) { lazyValues++; lazyValueCount[0]++; } if (sorted) { map.append(key, value); Loading @@ -5514,7 +5513,6 @@ public final class Parcel { if (sorted) { map.validate(); } return lazyValues; } /** Loading