From b047e1aacfc2988bd72737f71aeb4bc848ada8ab Mon Sep 17 00:00:00 2001 From: Sunny Shao Date: Wed, 22 Nov 2023 12:11:29 +0800 Subject: [PATCH 1/8] Add a linter requiring Nullability Annotations -This linter only check Java source and its public methods. -Apply to method return type not primitives or void. -Apply to method parameters not primitives. Bug: 307770597 Test: manual test Change-Id: I372168fb7dbe6c45803994c931bb5d103cf66169 --- Android.bp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Android.bp b/Android.bp index 9b4cfde6e97..9c354501915 100644 --- a/Android.bp +++ b/Android.bp @@ -118,6 +118,10 @@ android_library { "telephony-common", "ims-common", ], + + lint: { + extra_check_modules: ["SettingsLibLintChecker"], + }, } platform_compat_config { From e89aa195f1bb4353e90f5a9de3e831cfed773e0f Mon Sep 17 00:00:00 2001 From: Raphael Kim Date: Thu, 4 Jan 2024 01:47:32 +0000 Subject: [PATCH 2/8] Update test with new AssociationInfo constructor. Bug: 314992577 Change-Id: I0be91dc331e6ae5f3b410cdf057ca547bb4dd862 Test: m --- .../bluetooth/BluetoothDetailsCompanionAppsControllerTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsCompanionAppsControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsCompanionAppsControllerTest.java index 120274d4736..faea3d8ecb1 100644 --- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsCompanionAppsControllerTest.java +++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsCompanionAppsControllerTest.java @@ -112,6 +112,7 @@ public class BluetoothDetailsCompanionAppsControllerTest extends /* selfManaged */ false, /* notifyOnDeviceNearby */ true, /* revoked */ false, + /* pending */ false, /* timeApprovedMs */ System.currentTimeMillis(), /* lastTimeConnected */ Long.MAX_VALUE, /* systemDataSyncFlags */ -1); From 2703909793263687044dfb17eb80def3af016355 Mon Sep 17 00:00:00 2001 From: MiltonWu Date: Tue, 2 Jan 2024 12:22:55 +0800 Subject: [PATCH 3/8] Refine udfps enrolling icon Refine fingerprint enrolling icon show/hide logic Test: Manually test udfps enrolling flow Bug: 313801674 Flag: NA Change-Id: I8d10a2048d74efa8b0a5bf025dd81df0a9041274 --- .../biometrics/fingerprint/UdfpsEnrollEnrollingView.java | 3 ++- .../settings/biometrics/fingerprint/UdfpsEnrollView.java | 5 ++++- .../settings/biometrics2/ui/widget/UdfpsEnrollView.java | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java index d17fa24fede..c798dff4be7 100644 --- a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java +++ b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java @@ -138,7 +138,8 @@ public class UdfpsEnrollEnrollingView extends GlifLayout { displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight(), scaleFactor, - displayInfo.rotation); + displayInfo.rotation, + udfpsProps.sensorType); mUdfpsEnrollView.setOverlayParams(params); mUdfpsEnrollView.setEnrollHelper(udfpsEnrollHelper); diff --git a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollView.java b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollView.java index 2d392ffbe6d..4a2a243d2d8 100644 --- a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollView.java +++ b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollView.java @@ -19,6 +19,7 @@ package com.android.settings.biometrics.fingerprint; import android.content.Context; import android.graphics.Rect; import android.graphics.RectF; +import android.hardware.fingerprint.FingerprintSensorProperties; import android.os.Handler; import android.os.Looper; import android.util.AttributeSet; @@ -202,7 +203,9 @@ public class UdfpsEnrollView extends FrameLayout implements UdfpsEnrollHelper.Li } private void onFingerDown() { - mFingerprintDrawable.setShouldSkipDraw(true); + if (mOverlayParams.getSensorType() == FingerprintSensorProperties.TYPE_UDFPS_OPTICAL) { + mFingerprintDrawable.setShouldSkipDraw(true); + } mFingerprintDrawable.invalidateSelf(); } diff --git a/src/com/android/settings/biometrics2/ui/widget/UdfpsEnrollView.java b/src/com/android/settings/biometrics2/ui/widget/UdfpsEnrollView.java index 831e83b5ed5..c99cb2ddd57 100644 --- a/src/com/android/settings/biometrics2/ui/widget/UdfpsEnrollView.java +++ b/src/com/android/settings/biometrics2/ui/widget/UdfpsEnrollView.java @@ -260,8 +260,8 @@ public class UdfpsEnrollView extends FrameLayout { displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight(), scaleFactor, - displayInfo.rotation); - + displayInfo.rotation, + mSensorProperties.sensorType); post(() -> { mProgressBarRadius = From 3adb65b84d5c8b9d724ad424f5ae9f3158765446 Mon Sep 17 00:00:00 2001 From: Jigar Thakkar Date: Tue, 2 Jan 2024 18:12:46 +0000 Subject: [PATCH 4/8] Disable strong auth for all profiles after successful unlock The change generalizes the workflow to disable strong auth requirements for all profiles that require authentication to disable quiet mode, once a successful unlock has happened through CDCA. Currently, the call to disable the strong auth requirements is only being done for work-profile. Test: Tested locally on device with private space setup with a separate challenge and tested the strong auth tracker values post this change. Bug: 312184187 Change-Id: Ib41c51d1df78eea9415d72724b8cc693344e2c26 --- .../ConfirmDeviceCredentialUtils.java | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java b/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java index 4778c03f9f8..32e7489c6a6 100644 --- a/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java +++ b/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java @@ -23,6 +23,8 @@ import android.app.IActivityManager; import android.app.admin.DevicePolicyManager; import android.content.Intent; import android.content.IntentSender; +import android.content.pm.UserInfo; +import android.content.pm.UserProperties; import android.os.RemoteException; import android.os.UserManager; import android.view.View; @@ -68,16 +70,44 @@ public class ConfirmDeviceCredentialUtils { DevicePolicyManager dpm, int userId, boolean isStrongAuth) { if (isStrongAuth) { utils.reportSuccessfulPasswordAttempt(userId); + if (isBiometricUnlockEnabledForPrivateSpace()) { + final UserInfo userInfo = userManager.getUserInfo(userId); + if (userInfo != null) { + if (isProfileThatAlwaysRequiresAuthToDisableQuietMode(userManager, userInfo) + || userInfo.isManagedProfile()) { + // Keyguard is responsible to disable StrongAuth for primary user. Disable + // StrongAuth for profile challenges only here. + utils.userPresent(userId); + } + } + } } else { dpm.reportSuccessfulBiometricAttempt(userId); } - if (userManager.isManagedProfile(userId)) { - // Keyguard is responsible to disable StrongAuth for primary user. Disable StrongAuth - // for work challenge only here. - utils.userPresent(userId); + if (!isBiometricUnlockEnabledForPrivateSpace()) { + if (userManager.isManagedProfile(userId)) { + // Disable StrongAuth for work challenge only here. + utils.userPresent(userId); + } } } + /** + * Returns true if the userInfo passed as the parameter corresponds to a profile that always + * requires auth to disable quiet mode and false otherwise + */ + private static boolean isProfileThatAlwaysRequiresAuthToDisableQuietMode( + UserManager userManager, @NonNull UserInfo userInfo) { + final UserProperties userProperties = + userManager.getUserProperties(userInfo.getUserHandle()); + return userProperties.isAuthAlwaysRequiredToDisableQuietMode() && userInfo.isProfile(); + } + + private static boolean isBiometricUnlockEnabledForPrivateSpace() { + return android.os.Flags.allowPrivateProfile() + && android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace(); + } + /** * Request hiding soft-keyboard before animating away credential UI, in case IME * insets animation get delayed by dismissing animation. From b20f910cd180168367151cd0d0fa52111b140b69 Mon Sep 17 00:00:00 2001 From: mxyyiyi Date: Wed, 3 Jan 2024 17:15:21 +0800 Subject: [PATCH 5/8] Update accessibility content description for battery usage chart view. - Add battery level percentage description. Bug: 317000579 Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.batteryusage.*" Change-Id: I03c8a97c521997170cbd72b7e0fcc88f7eb97221 --- res/values/strings.xml | 4 ++ .../BatteryChartPreferenceController.java | 59 ++++++++++++++++--- .../batteryusage/BatteryChartView.java | 10 +++- .../batteryusage/BatteryChartViewModel.java | 19 +++++- .../BatteryChartPreferenceControllerTest.java | 16 +++++ 5 files changed, 97 insertions(+), 11 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 9b4d9ee49bd..ce83035228f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5864,12 +5864,16 @@ %1$s - %2$s %1$s %2$s + + %1$s %2$s Battery usage chart Daily battery usage chart Hourly battery usage chart + + Battery level percentage from %1$s to %2$s Battery usage since last full charge diff --git a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java index 8ae8edd4be0..51dce26fdf4 100644 --- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java +++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java @@ -35,6 +35,7 @@ import androidx.preference.PreferenceScreen; import com.android.settings.R; import com.android.settings.SettingsActivity; +import com.android.settings.Utils; import com.android.settings.core.PreferenceControllerMixin; import com.android.settings.overlay.FeatureFactory; import com.android.settingslib.core.AbstractPreferenceController; @@ -427,13 +428,35 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll R.string.battery_usage_day_and_hour, selectedDayText, selectedHourText); } + @VisibleForTesting + String getBatteryLevelPercentageInfo() { + if (mDailyViewModel == null || mHourlyViewModels == null) { + // No data + return ""; + } + + if (mDailyChartIndex == BatteryChartViewModel.SELECTED_INDEX_ALL + || mHourlyChartIndex == BatteryChartViewModel.SELECTED_INDEX_ALL) { + return mDailyViewModel.getSlotBatteryLevelText(mDailyChartIndex); + } + + return mHourlyViewModels.get(mDailyChartIndex).getSlotBatteryLevelText(mHourlyChartIndex); + } + private String getAccessibilityAnnounceMessage() { final String slotInformation = getSlotInformation(); - return slotInformation == null - ? mPrefContext.getString( - R.string.battery_usage_breakdown_title_since_last_full_charge) - : mPrefContext.getString( - R.string.battery_usage_breakdown_title_for_slot, slotInformation); + final String slotInformationMessage = + slotInformation == null + ? mPrefContext.getString( + R.string.battery_usage_breakdown_title_since_last_full_charge) + : mPrefContext.getString( + R.string.battery_usage_breakdown_title_for_slot, slotInformation); + final String batteryLevelPercentageMessage = getBatteryLevelPercentageInfo(); + + return mPrefContext.getString( + R.string.battery_usage_time_info_and_battery_level, + slotInformationMessage, + batteryLevelPercentageMessage); } private void animateBatteryChartViewGroup() { @@ -573,7 +596,29 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll return null; } - private final class DailyChartLabelTextGenerator + private abstract class BaseLabelTextGenerator + implements BatteryChartViewModel.LabelTextGenerator { + @Override + public String generateSlotBatteryLevelText(List levels, int index) { + final int fromBatteryLevelIndex = + index == BatteryChartViewModel.SELECTED_INDEX_ALL ? 0 : index; + final int toBatteryLevelIndex = + index == BatteryChartViewModel.SELECTED_INDEX_ALL + ? levels.size() - 1 + : index + 1; + return mPrefContext.getString( + R.string.battery_level_percentage, + generateBatteryLevelText(levels.get(fromBatteryLevelIndex)), + generateBatteryLevelText(levels.get(toBatteryLevelIndex))); + } + + @VisibleForTesting + private static String generateBatteryLevelText(Integer level) { + return Utils.formatPercentage(level); + } + } + + private final class DailyChartLabelTextGenerator extends BaseLabelTextGenerator implements BatteryChartViewModel.LabelTextGenerator { @Override public String generateText(List timestamps, int index) { @@ -588,7 +633,7 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll } } - private final class HourlyChartLabelTextGenerator + private final class HourlyChartLabelTextGenerator extends BaseLabelTextGenerator implements BatteryChartViewModel.LabelTextGenerator { private static final int FULL_CHARGE_BATTERY_LEVEL = 100; diff --git a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java index 6ff52a2bc1d..111a5a1c677 100644 --- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java +++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java @@ -784,10 +784,16 @@ public class BatteryChartView extends AppCompatImageView implements View.OnClick } final AccessibilityNodeInfo childInfo = new AccessibilityNodeInfo(BatteryChartView.this, index); + final String slotTimeInfo = mViewModel.getFullText(index); + final String batteryLevelInfo = mViewModel.getSlotBatteryLevelText(index); onInitializeAccessibilityNodeInfo(childInfo); childInfo.setClickable(isValidToDraw(mViewModel, index)); - childInfo.setText(mViewModel.getFullText(index)); - childInfo.setContentDescription(mViewModel.getFullText(index)); + childInfo.setText(slotTimeInfo); + childInfo.setContentDescription( + mContext.getString( + R.string.battery_usage_time_info_and_battery_level, + slotTimeInfo, + batteryLevelInfo)); final Rect bounds = new Rect(); getBoundsOnScreen(bounds, true); diff --git a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartViewModel.java b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartViewModel.java index 6ec01a4c344..86890d5926e 100644 --- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartViewModel.java +++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartViewModel.java @@ -40,11 +40,14 @@ class BatteryChartViewModel { } interface LabelTextGenerator { - /** Generate the label text. The text may be abbreviated to save space. */ + /** Generates the label text. The text may be abbreviated to save space. */ String generateText(List timestamps, int index); - /** Generate the full text for accessibility. */ + /** Generates the full text for accessibility. */ String generateFullText(List timestamps, int index); + + /** Generates the battery level text of a slot for accessibility.*/ + String generateSlotBatteryLevelText(List levels, int index); } private final List mLevels; @@ -53,6 +56,7 @@ class BatteryChartViewModel { private final LabelTextGenerator mLabelTextGenerator; private final String[] mTexts; private final String[] mFullTexts; + private final String[] mBatteryLevelTexts; private int mSelectedIndex = SELECTED_INDEX_ALL; private int mHighlightSlotIndex = SELECTED_INDEX_INVALID; @@ -75,6 +79,8 @@ class BatteryChartViewModel { mLabelTextGenerator = labelTextGenerator; mTexts = new String[size()]; mFullTexts = new String[size()]; + // Last one for SELECTED_INDEX_ALL + mBatteryLevelTexts = new String[size() + 1]; } public int size() { @@ -99,6 +105,15 @@ class BatteryChartViewModel { return mFullTexts[index]; } + public String getSlotBatteryLevelText(int index) { + final int textIndex = index != SELECTED_INDEX_ALL ? index : size(); + if (mBatteryLevelTexts[textIndex] == null) { + mBatteryLevelTexts[textIndex] = + mLabelTextGenerator.generateSlotBatteryLevelText(mLevels, index); + } + return mBatteryLevelTexts[textIndex]; + } + public AxisLabelPosition axisLabelPosition() { return mAxisLabelPosition; } diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceControllerTest.java index bbb022edb3b..6fb021cbdae 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceControllerTest.java @@ -384,6 +384,8 @@ public final class BatteryChartPreferenceControllerTest { mBatteryChartPreferenceController.mHourlyChartIndex = SELECTED_INDEX_ALL; assertThat(mBatteryChartPreferenceController.getSlotInformation()).isEqualTo(null); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 100% to 66%"); } @Test @@ -393,6 +395,8 @@ public final class BatteryChartPreferenceControllerTest { mBatteryChartPreferenceController.mHourlyChartIndex = SELECTED_INDEX_ALL; assertThat(mBatteryChartPreferenceController.getSlotInformation()).isEqualTo(null); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 100% to 66%"); } @Test @@ -402,6 +406,8 @@ public final class BatteryChartPreferenceControllerTest { mBatteryChartPreferenceController.mHourlyChartIndex = SELECTED_INDEX_ALL; assertThat(mBatteryChartPreferenceController.getSlotInformation()).isEqualTo("Sunday"); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 83% to 59%"); } @Test @@ -412,6 +418,8 @@ public final class BatteryChartPreferenceControllerTest { assertThat(mBatteryChartPreferenceController.getSlotInformation()) .isEqualTo("10 AM - 12 PM"); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 97% to 95%"); } @Test @@ -422,6 +430,8 @@ public final class BatteryChartPreferenceControllerTest { assertThat(mBatteryChartPreferenceController.getSlotInformation()) .isEqualTo("Sunday 4 PM - 6 PM"); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 67% to 65%"); } @Test @@ -432,6 +442,8 @@ public final class BatteryChartPreferenceControllerTest { assertThat(mBatteryChartPreferenceController.getSlotInformation()) .isEqualTo("7:01 AM - 8 AM"); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 100% to 99%"); } @Test @@ -441,6 +453,8 @@ public final class BatteryChartPreferenceControllerTest { mBatteryChartPreferenceController.mHourlyChartIndex = 3; assertThat(mBatteryChartPreferenceController.getSlotInformation()).isEqualTo("12 PM - now"); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 95% to 66%"); } @Test @@ -451,6 +465,8 @@ public final class BatteryChartPreferenceControllerTest { assertThat(mBatteryChartPreferenceController.getSlotInformation()) .isEqualTo("7:01 AM - now"); + assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo()) + .isEqualTo("Battery level percentage from 100% to 66%"); } @Test From 2370adbbcea94f66bfa5bf4da48dafff403c529a Mon Sep 17 00:00:00 2001 From: Fan Wu Date: Fri, 5 Jan 2024 11:56:28 +0800 Subject: [PATCH 6/8] Update Usage statistics string to avoid confusion Bug: 314134835 Test: manually by typing *#*#4636#*#* on phone Change-Id: Idac3f58f8c21ff5ecf6a1b7e9d686d770e2e09ba --- res/values/strings.xml | 4 +++- .../spa/development/UsageStatsListModel.kt | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 66e73214285..09cd23ce520 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4511,7 +4511,9 @@ Sort by app name - Last time used + Last used + + never Usage time diff --git a/src/com/android/settings/spa/development/UsageStatsListModel.kt b/src/com/android/settings/spa/development/UsageStatsListModel.kt index d27796d14c8..bb20da6b304 100644 --- a/src/com/android/settings/spa/development/UsageStatsListModel.kt +++ b/src/com/android/settings/spa/development/UsageStatsListModel.kt @@ -29,6 +29,7 @@ import com.android.settingslib.spaprivileged.model.app.AppEntry import com.android.settingslib.spaprivileged.model.app.AppListModel import com.android.settingslib.spaprivileged.model.app.AppRecord import java.text.DateFormat +import java.time.Duration import java.util.concurrent.TimeUnit import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine @@ -77,15 +78,25 @@ class UsageStatsListModel(private val context: Context) : AppListModel String)? { val usageStats = record.usageStats ?: return null - val lastTimeUsed = DateUtils.formatSameDayTime( - usageStats.lastTimeUsed, now, DateFormat.MEDIUM, DateFormat.MEDIUM - ) - val lastTimeUsedLine = "${context.getString(R.string.last_time_used_label)}: $lastTimeUsed" + val lastTimeUsedLine = + "${context.getString(R.string.last_time_used_label)}: ${usageStats.getLastUsedString()}" val usageTime = DateUtils.formatElapsedTime(usageStats.totalTimeInForeground / 1000) val usageTimeLine = "${context.getString(R.string.usage_time_label)}: $usageTime" return { "$lastTimeUsedLine\n$usageTimeLine" } } + private fun UsageStats.getLastUsedString() = when { + lastTimeUsed < Duration.ofDays(1) + .toMillis() -> context.getString(R.string.last_time_used_never) + + else -> DateUtils.formatSameDayTime( + lastTimeUsed, + now, + DateFormat.MEDIUM, + DateFormat.MEDIUM + ) + } + private fun getUsageStats(): Map { val startTime = now - TimeUnit.DAYS.toMillis(5) From ed3d2f91713af15521fa8db8e30c6c20bff3dd1d Mon Sep 17 00:00:00 2001 From: Chun-Ku Lin Date: Thu, 4 Jan 2024 07:19:51 +0000 Subject: [PATCH 7/8] Implemented nested scrolling parent in TextReadingPreviewPager Flag: N/A Bug: 317947238 Test: manual Change-Id: I173881b84d5c5ff81c15a80a4de65fda59f5bf65 --- .../accessibility_text_reading_preview.xml | 3 +- .../TextReadingPreviewPager.java | 30 +++++++++++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/res/layout/accessibility_text_reading_preview.xml b/res/layout/accessibility_text_reading_preview.xml index 95ea2e42349..830d9e66778 100644 --- a/res/layout/accessibility_text_reading_preview.xml +++ b/res/layout/accessibility_text_reading_preview.xml @@ -42,7 +42,8 @@ android:id="@+id/preview_pager" android:layout_width="match_parent" android:layout_height="217dp" - android:contentDescription="@string/preview_pager_content_description" /> + android:contentDescription="@string/preview_pager_content_description" + android:nestedScrollingEnabled="true" /> Date: Tue, 9 Jan 2024 18:10:17 +0000 Subject: [PATCH 8/8] Use isCeStorageUnlocked() in ConfirmDeviceCredentialActivity isUserKeyUnlocked() is being renamed to isCeStorageUnlocked() to make it clear what it does (considering that there are many types of user keys). Temporarily, the method exists under both names. Change ConfirmDeviceCredentialActivity to use the new name. No change in behavior. Bug: 306204742 Flag: exempt, mechanical refactoring Test: presubmit Change-Id: I9a3f686b57cfbf99b6c915565e5ecc38ddfe9b22 --- .../settings/password/ConfirmDeviceCredentialActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java index 2a299c55ac2..4a760add79e 100644 --- a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java +++ b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java @@ -417,7 +417,7 @@ public class ConfirmDeviceCredentialActivity extends FragmentActivity { // the profile user using verifyTiedProfileChallenge. Biometrics can still be used if // the user is stopped with delayed locking (i.e., with storage unlocked), so the user // state (whether the user is in the RUNNING_UNLOCKED state) should not be relied upon. - return !StorageManager.isUserKeyUnlocked(userId); + return !StorageManager.isCeStorageUnlocked(userId); } return !mUserManager.isUserUnlocked(userId); }