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

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

Snap for 9043175 from 66dee9be to tm-qpr1-release

Change-Id: Idef9c7bba3203c5735cb4e6a5e3b000f0d7ba837
parents 8cd8f898 66dee9be
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="start|top"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorSecondary"
            android:gravity="start"
            android:layout_weight="1"/>

@@ -77,6 +79,8 @@
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="end|top"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorSecondary"
            android:gravity="end"
            android:layout_weight="1"/>

+5 −0
Original line number Diff line number Diff line
@@ -102,6 +102,11 @@ public abstract class AccessibilityQuickSettingsPrimarySwitchPreferenceControlle
    }

    private void showQuickSettingsTooltipIfNeeded() {
        if (mPreference == null) {
            // Returns if no preference found by slice highlight menu.
            return;
        }

        final ComponentName tileComponentName = getTileComponentName();
        if (tileComponentName == null) {
            // Returns if no tile service assigned.
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ class TextReadingPreviewController extends BasePreferenceController implements
        final PreviewPagerAdapter pagerAdapter = new PreviewPagerAdapter(mContext, isLayoutRtl,
                PREVIEW_SAMPLE_RES_IDS, createConfig(origConfig));
        mPreviewPreference.setPreviewAdapter(pagerAdapter);
        mPreviewPreference.setCurrentItem(isLayoutRtl ? PREVIEW_SAMPLE_RES_IDS.length - 1 : 0);
        pagerAdapter.setPreviewLayer(/* newLayerIndex= */ 0,
                /* currentLayerIndex= */ 0,
                /* currentFrameIndex= */ 0, /* animate= */ false);
+3 −1
Original line number Diff line number Diff line
@@ -203,7 +203,9 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
        // Do NOT cancel enrollment progress after rotating, adding mIsOrientationChanged
        // to judge if the focus changed was triggered by rotation, current WMS has triple callbacks
        // (true > false > true), we need to reset mIsOrientationChanged when !hasFocus callback.
        if (!mIsOrientationChanged) {
        // Side fps do not have to synchronize udfpsController overlay state, we should bypass sfps
        // from onWindowFocusChanged() as long press sfps power key will prompt dialog to users.
        if (!mIsOrientationChanged && !mCanAssumeSfps) {
            onCancelEnrollment(FINGERPRINT_ERROR_USER_CANCELED);
        } else {
            mIsOrientationChanged = false;
+13 −1
Original line number Diff line number Diff line
@@ -118,18 +118,29 @@ public class AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest {
        mController = new TestAccessibilityQuickSettingsPrimarySwitchPreferenceController(mContext,
                TEST_KEY);
        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
        mController.displayPreference(mScreen);
    }

    @Test
    public void setChecked_showTooltipView() {
        mController.displayPreference(mScreen);

        mController.setChecked(true);

        assertThat(getLatestPopupWindow().isShowing()).isTrue();
    }

    @Test
    public void setChecked_notCallDisplayPreference_notShowTooltipView() {
        // Simulates the slice highlight menu that does not call {@link #displayPreference} before
        // {@link #setChecked} called.
        mController.setChecked(true);

        assertThat(getLatestPopupWindow()).isNull();
    }

    @Test
    public void setChecked_tooltipViewShown_notShowTooltipView() {
        mController.displayPreference(mScreen);
        mController.setChecked(true);
        getLatestPopupWindow().dismiss();
        mController.setChecked(false);
@@ -142,6 +153,7 @@ public class AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest {
    @Test
    @Config(shadows = ShadowFragment.class)
    public void restoreValueFromSavedInstanceState_showTooltipView() {
        mController.displayPreference(mScreen);
        mController.setChecked(true);
        final Bundle savedInstanceState = new Bundle();
        savedInstanceState.putBoolean(KEY_SAVED_QS_TOOLTIP_RESHOW, /* value= */ true);
Loading