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

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

Snap for 12212122 from ebf8e0c8 to 24Q4-release

Change-Id: I6f9a009394ac901adf2ff8581eadc5e6164301a0
parents b97319ee ebf8e0c8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -638,17 +638,17 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan
         * Set caller's component name for getting logo icon/description. This should only be used
         * by ConfirmDeviceCredentialActivity, see b/337082634 for more context.
         *
         * @param componentNameForConfirmDeviceCredentialActivity set the component name for
         * @param realCaller set the component name of real caller for
         *                   ConfirmDeviceCredentialActivity.
         * @return This builder.
         * @hide
         */
        @NonNull
        @RequiresPermission(anyOf = {TEST_BIOMETRIC, USE_BIOMETRIC_INTERNAL})
        public Builder setComponentNameForConfirmDeviceCredentialActivity(
                ComponentName componentNameForConfirmDeviceCredentialActivity) {
            mPromptInfo.setComponentNameForConfirmDeviceCredentialActivity(
                    componentNameForConfirmDeviceCredentialActivity);
        public Builder setRealCallerForConfirmDeviceCredentialActivity(ComponentName realCaller) {
            mPromptInfo.setRealCallerForConfirmDeviceCredentialActivity(realCaller);
            mPromptInfo.setClassNameIfItIsConfirmDeviceCredentialActivity(
                    mContext.getClass().getName());
            return this;
        }

+26 −10
Original line number Diff line number Diff line
@@ -57,7 +57,8 @@ public class PromptInfo implements Parcelable {
    private boolean mIsForLegacyFingerprintManager = false;
    private boolean mShowEmergencyCallButton = false;
    private boolean mUseParentProfileForDeviceCredential = false;
    private ComponentName mComponentNameForConfirmDeviceCredentialActivity = null;
    private ComponentName mRealCallerForConfirmDeviceCredentialActivity = null;
    private String mClassNameIfItIsConfirmDeviceCredentialActivity = null;

    public PromptInfo() {

@@ -89,8 +90,9 @@ public class PromptInfo implements Parcelable {
        mIsForLegacyFingerprintManager = in.readBoolean();
        mShowEmergencyCallButton = in.readBoolean();
        mUseParentProfileForDeviceCredential = in.readBoolean();
        mComponentNameForConfirmDeviceCredentialActivity = in.readParcelable(
        mRealCallerForConfirmDeviceCredentialActivity = in.readParcelable(
                ComponentName.class.getClassLoader(), ComponentName.class);
        mClassNameIfItIsConfirmDeviceCredentialActivity = in.readString();
    }

    public static final Creator<PromptInfo> CREATOR = new Creator<PromptInfo>() {
@@ -136,7 +138,8 @@ public class PromptInfo implements Parcelable {
        dest.writeBoolean(mIsForLegacyFingerprintManager);
        dest.writeBoolean(mShowEmergencyCallButton);
        dest.writeBoolean(mUseParentProfileForDeviceCredential);
        dest.writeParcelable(mComponentNameForConfirmDeviceCredentialActivity, 0);
        dest.writeParcelable(mRealCallerForConfirmDeviceCredentialActivity, 0);
        dest.writeString(mClassNameIfItIsConfirmDeviceCredentialActivity);
    }

    // LINT.IfChange
@@ -155,7 +158,7 @@ public class PromptInfo implements Parcelable {
            return true;
        } else if (mShowEmergencyCallButton) {
            return true;
        } else if (mComponentNameForConfirmDeviceCredentialActivity != null) {
        } else if (mRealCallerForConfirmDeviceCredentialActivity != null) {
            return true;
        }
        return false;
@@ -321,10 +324,8 @@ public class PromptInfo implements Parcelable {
        mShowEmergencyCallButton = showEmergencyCallButton;
    }

    public void setComponentNameForConfirmDeviceCredentialActivity(
            ComponentName componentNameForConfirmDeviceCredentialActivity) {
        mComponentNameForConfirmDeviceCredentialActivity =
                componentNameForConfirmDeviceCredentialActivity;
    public void setRealCallerForConfirmDeviceCredentialActivity(ComponentName realCaller) {
        mRealCallerForConfirmDeviceCredentialActivity = realCaller;
    }

    public void setUseParentProfileForDeviceCredential(
@@ -332,6 +333,14 @@ public class PromptInfo implements Parcelable {
        mUseParentProfileForDeviceCredential = useParentProfileForDeviceCredential;
    }

    /**
     * Set the class name of ConfirmDeviceCredentialActivity.
     */
    void setClassNameIfItIsConfirmDeviceCredentialActivity(String className) {
        mClassNameIfItIsConfirmDeviceCredentialActivity = className;
    }


    // Getters

    /**
@@ -455,8 +464,15 @@ public class PromptInfo implements Parcelable {
        return mShowEmergencyCallButton;
    }

    public ComponentName getComponentNameForConfirmDeviceCredentialActivity() {
        return mComponentNameForConfirmDeviceCredentialActivity;
    public ComponentName getRealCallerForConfirmDeviceCredentialActivity() {
        return mRealCallerForConfirmDeviceCredentialActivity;
    }

    /**
     * Get the class name of ConfirmDeviceCredentialActivity. Returns null if the direct caller is
     * not ConfirmDeviceCredentialActivity.
     */
    public String getClassNameIfItIsConfirmDeviceCredentialActivity() {
       return mClassNameIfItIsConfirmDeviceCredentialActivity;
    }
}
+11 −1
Original line number Diff line number Diff line
@@ -348,7 +348,17 @@ public class A11yMenuOverlayLayout {

    /** Toggles a11y menu layout visibility. */
    public void toggleVisibility() {
        mLayout.setVisibility((mLayout.getVisibility() == View.VISIBLE) ? View.GONE : View.VISIBLE);
        if (mLayout.getVisibility() == View.VISIBLE) {
            mLayout.setVisibility(View.GONE);
        } else {
            if (Flags.hideRestrictedActions()) {
                // Reconfigure the shortcut list in case the set of restricted actions has changed.
                mA11yMenuViewPager.configureViewPagerAndFooter(
                        mLayout, createShortcutList(), getPageIndex());
                updateViewLayout();
            }
            mLayout.setVisibility(View.VISIBLE);
        }
    }

    /** Shows hint text on a minimal Snackbar-like text view. */
+0 −2
Original line number Diff line number Diff line
@@ -542,8 +542,6 @@ public class AccessibilityMenuServiceTest {
        final Context context = sInstrumentation.getTargetContext();
        final UserManager userManager = context.getSystemService(UserManager.class);
        userManager.setUserRestriction(restriction, isRestricted);
        // Re-enable the service for the restriction to take effect.
        enableA11yMenuService(context);
    }

    private static void unlockSignal() throws IOException {
+6 −6
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ class InternetTileDataInteractorTest : SysuiTestCase() {

            val actualIcon = latest?.icon
            assertThat(actualIcon).isEqualTo(expectedIcon)
            assertThat(latest?.iconId).isNull()
            assertThat(latest?.iconId).isEqualTo(WifiIcons.WIFI_NO_INTERNET_ICONS[4])
            assertThat(latest?.contentDescription.loadContentDescription(context))
                .isEqualTo("$internet,test ssid")
            val expectedSd = wifiIcon.contentDescription
@@ -443,15 +443,15 @@ class InternetTileDataInteractorTest : SysuiTestCase() {
     * on the mentioned context. Since that context does not have a looper assigned to it, the
     * handler instantiation will throw a RuntimeException.
     *
     * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception
     * So either we should make Robolectric behvase similar to the device test, or change this
     * test to look for a different signal than the exception, when run by Robolectric. For now
     * we just assume the test is not Robolectric.
     * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception So
     *   either we should make Robolectric behave similar to the device test, or change this test to
     *   look for a different signal than the exception, when run by Robolectric. For now we just
     *   assume the test is not Robolectric.
     */
    @Test(expected = java.lang.RuntimeException::class)
    fun mobileDefault_usesNetworkNameAndIcon_throwsRunTimeException() =
        testScope.runTest {
            assumeFalse(isRobolectricTest());
            assumeFalse(isRobolectricTest())

            collectLastValue(underTest.tileData(testUser, flowOf(DataUpdateTrigger.InitialRequest)))

Loading