diff --git a/Android.bp b/Android.bp
index 8353634..48e0d2d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -120,6 +120,10 @@
         "telephony-common",
         "ims-common",
     ],
+
+    lint: {
+        extra_check_modules: ["SettingsLibLintChecker"],
+    },
 }
 
 platform_compat_config {
diff --git a/res/layout/accessibility_text_reading_preview.xml b/res/layout/accessibility_text_reading_preview.xml
index 95ea2e4..830d9e6 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" />
 
         <com.android.settings.widget.DotsPageIndicator
             android:id="@+id/page_indicator"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 66e7321..402f526 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4511,7 +4511,9 @@
     <!-- Spinner label to indicate sort by app name. [CHAR LIMIT=30] -->
     <string name="usage_stats_sort_by_app_name">Sort by app name</string>
     <!-- label for last time used -->
-    <string name="last_time_used_label">Last time used</string>
+    <string name="last_time_used_label">Last used</string>
+    <!-- label for last time used of never opened apps -->
+    <string name="last_time_used_never">never</string>
     <!-- label for usage time -->
     <string name="usage_time_label">Usage time</string>
 
@@ -5864,12 +5866,16 @@
     <string name="battery_usage_timestamps_hyphen"><xliff:g id="from_timestamp">%1$s</xliff:g> - <xliff:g id="to_timestamp">%2$s</xliff:g></string>
     <!-- [CHAR_LIMIT=NONE] The first slot is a week day (e.g. "Monday"); the second slot is a hourly time span (e.g. "6 AM - 8 AM"). -->
     <string name="battery_usage_day_and_hour"><xliff:g id="day">%1$s</xliff:g> <xliff:g id="hour">%2$s</xliff:g></string>
+    <!-- [CHAR_LIMIT=NONE] Accessibility content description for each slot in battery chart view. -->
+    <string name="battery_usage_time_info_and_battery_level"><xliff:g id="time_info" example="Battery usage for Monday 6 AM - 8 AM">%1$s</xliff:g> <xliff:g id="battery_level" example="Battery level percentage from 83% to 59%">%2$s</xliff:g></string>
     <!-- [CHAR_LIMIT=NONE] Accessibility content description for battery chart view. -->
     <string name="battery_usage_chart">Battery usage chart</string>
     <!-- [CHAR_LIMIT=NONE] Accessibility content description for daily battery chart view. -->
     <string name="daily_battery_usage_chart">Daily battery usage chart</string>
     <!-- [CHAR_LIMIT=NONE] Accessibility content description for hourly battery chart view. -->
     <string name="hourly_battery_usage_chart">Hourly battery usage chart</string>
+    <!-- [CHAR_LIMIT=NONE] Accessibility content description for battery level percentage. -->
+    <string name="battery_level_percentage">Battery level percentage from <xliff:g id="start_percentage">%1$s</xliff:g> to <xliff:g id="end_percentage">%2$s</xliff:g></string>
     <!-- [CHAR_LIMIT=NONE] Battery usage breakdown title since last full charge -->
     <string name="battery_usage_breakdown_title_since_last_full_charge">Battery usage since last full charge</string>
     <!-- [CHAR_LIMIT=NONE] Battery usage breakdown title for a selected slot -->
diff --git a/src/com/android/settings/accessibility/TextReadingPreviewPager.java b/src/com/android/settings/accessibility/TextReadingPreviewPager.java
index 5d43159..252d121 100644
--- a/src/com/android/settings/accessibility/TextReadingPreviewPager.java
+++ b/src/com/android/settings/accessibility/TextReadingPreviewPager.java
@@ -18,8 +18,7 @@
 
 import android.content.Context;
 import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.ViewGroup;
+import android.view.View;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
@@ -29,18 +28,31 @@
  * The view pager is used for displaying screen preview with different size configuration changes.
  */
 public class TextReadingPreviewPager extends ViewPager {
+
     public TextReadingPreviewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
         super(context, attrs);
     }
 
     @Override
-    public boolean onInterceptTouchEvent(MotionEvent ev) {
-        final ViewGroup parent = (ViewGroup) getParent();
-        if (parent != null) {
-            // Avoid conflicting with the nested scroll view.
-            parent.requestDisallowInterceptTouchEvent(true);
-        }
+    public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) {
+        return (nestedScrollAxes & View.SCROLL_AXIS_VERTICAL) != 0;
+    }
 
-        return super.onInterceptTouchEvent(ev);
+    @Override
+    public void onNestedScrollAccepted(View child, View target, int axes) {
+        super.onNestedScrollAccepted(child, target, axes);
+        // Allow the nested scrollview inside of the view pager to be scrollable.
+        getParent().requestDisallowInterceptTouchEvent(true);
+    }
+
+    @Override
+    public void onNestedScroll(
+            View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
+        if (dyUnconsumed != 0) {
+            // Assume dyUnconsumed != 0 means the target has been scrolled to the end vertically.
+            // We could let the parent to consume the rest of the dyUnconsumed
+            getParent().requestDisallowInterceptTouchEvent(false);
+        }
+        super.onNestedScroll(target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed);
     }
 }
diff --git a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java
index d17fa24..c798dff 100644
--- a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java
+++ b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollEnrollingView.java
@@ -138,7 +138,8 @@
                 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 2d392ff..4a2a243 100644
--- a/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollView.java
+++ b/src/com/android/settings/biometrics/fingerprint/UdfpsEnrollView.java
@@ -19,6 +19,7 @@
 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 @@
     }
 
     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 831e83b..c99cb2d 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 @@
                 displayInfo.getNaturalWidth(),
                 displayInfo.getNaturalHeight(),
                 scaleFactor,
-                displayInfo.rotation);
-
+                displayInfo.rotation,
+                mSensorProperties.sensorType);
 
         post(() -> {
             mProgressBarRadius =
diff --git a/src/com/android/settings/dashboard/profileselector/ProfileSelectPhysicalKeyboardFragment.java b/src/com/android/settings/dashboard/profileselector/ProfileSelectPhysicalKeyboardFragment.java
index 239d609..2caf8db 100644
--- a/src/com/android/settings/dashboard/profileselector/ProfileSelectPhysicalKeyboardFragment.java
+++ b/src/com/android/settings/dashboard/profileselector/ProfileSelectPhysicalKeyboardFragment.java
@@ -51,9 +51,11 @@
 
     @Override
     public Fragment[] getFragments() {
+        Bundle bundle = new Bundle();
+        bundle.putParcelable(Settings.EXTRA_INPUT_DEVICE_IDENTIFIER, mInputDeviceIdentifier);
         return ProfileSelectFragment.getFragments(
                 getContext(),
-                null /* bundle */,
+                bundle,
                 NewKeyboardLayoutEnabledLocalesFragment::new,
                 NewKeyboardLayoutEnabledLocalesFragment::new,
                 NewKeyboardLayoutEnabledLocalesFragment::new);
diff --git a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java
index 8ae8edd..51dce26 100644
--- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartPreferenceController.java
@@ -35,6 +35,7 @@
 
 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 @@
                 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 @@
         return null;
     }
 
-    private final class DailyChartLabelTextGenerator
+    private abstract class BaseLabelTextGenerator
+            implements BatteryChartViewModel.LabelTextGenerator {
+        @Override
+        public String generateSlotBatteryLevelText(List<Integer> 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<Long> timestamps, int index) {
@@ -588,7 +633,7 @@
         }
     }
 
-    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 6ff52a2..111a5a1 100644
--- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java
+++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartView.java
@@ -784,10 +784,16 @@
             }
             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 6ec01a4..86890d5 100644
--- a/src/com/android/settings/fuelgauge/batteryusage/BatteryChartViewModel.java
+++ b/src/com/android/settings/fuelgauge/batteryusage/BatteryChartViewModel.java
@@ -40,11 +40,14 @@
     }
 
     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<Long> timestamps, int index);
 
-        /** Generate the full text for accessibility. */
+        /** Generates the full text for accessibility. */
         String generateFullText(List<Long> timestamps, int index);
+
+        /** Generates the battery level text of a slot for accessibility.*/
+        String generateSlotBatteryLevelText(List<Integer> levels, int index);
     }
 
     private final List<Integer> mLevels;
@@ -53,6 +56,7 @@
     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 @@
         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 @@
         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/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
index 2a299c5..4a760ad 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
@@ -417,7 +417,7 @@
             // 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);
     }
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java b/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java
index 4778c03..32e7489 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialUtils.java
@@ -23,6 +23,8 @@
 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,17 +70,45 @@
             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.
      * @param view used to get root {@link WindowInsets} and {@link WindowInsetsController}.
diff --git a/src/com/android/settings/spa/development/UsageStatsListModel.kt b/src/com/android/settings/spa/development/UsageStatsListModel.kt
index d27796d..bb20da6 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.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 @@
     @Composable
     override fun getSummary(option: Int, record: UsageStatsAppRecord): (() -> 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<String, UsageStats> {
         val startTime = now - TimeUnit.DAYS.toMillis(5)
 
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsCompanionAppsControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsCompanionAppsControllerTest.java
index 120274d..faea3d8 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 @@
                 /* selfManaged */ false,
                 /* notifyOnDeviceNearby */ true,
                 /* revoked */ false,
+                /* pending */ false,
                 /* timeApprovedMs */ System.currentTimeMillis(),
                 /* lastTimeConnected */ Long.MAX_VALUE,
                 /* systemDataSyncFlags */ -1);
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 bbb022e..6fb021c 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 @@
         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 @@
         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 @@
         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 @@
 
         assertThat(mBatteryChartPreferenceController.getSlotInformation())
                 .isEqualTo("10 AM - 12 PM");
+        assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo())
+                .isEqualTo("Battery level percentage from 97% to 95%");
     }
 
     @Test
@@ -422,6 +430,8 @@
 
         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 @@
 
         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 @@
         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 @@
 
         assertThat(mBatteryChartPreferenceController.getSlotInformation())
                 .isEqualTo("7:01 AM - now");
+        assertThat(mBatteryChartPreferenceController.getBatteryLevelPercentageInfo())
+                .isEqualTo("Battery level percentage from 100% to 66%");
     }
 
     @Test
