diff --git a/src/com/android/settings/accessibility/AccessibilitySettings.java b/src/com/android/settings/accessibility/AccessibilitySettings.java
index becd4e7..f918046 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettings.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettings.java
@@ -269,7 +269,7 @@
 
         final CharSequence serviceState;
         final int fragmentType = AccessibilityUtil.getAccessibilityServiceFragmentType(info);
-        if (fragmentType == AccessibilityServiceFragmentType.INVISIBLE) {
+        if (fragmentType == AccessibilityServiceFragmentType.INVISIBLE_TOGGLE) {
             final ComponentName componentName = new ComponentName(
                     info.getResolveInfo().serviceInfo.packageName,
                     info.getResolveInfo().serviceInfo.name);
@@ -652,13 +652,16 @@
         }
 
         private String getAccessibilityServiceFragmentTypeName(AccessibilityServiceInfo info) {
-            switch (AccessibilityUtil.getAccessibilityServiceFragmentType(
-                    info)) {
-                case AccessibilityServiceFragmentType.LEGACY:
-                    return LegacyAccessibilityServicePreferenceFragment.class.getName();
-                case AccessibilityServiceFragmentType.INVISIBLE:
+            // Shorten the name to avoid exceeding 100 characters in one line.
+            final String volumeShortcutToggleAccessibilityServicePreferenceFragment =
+                    VolumeShortcutToggleAccessibilityServicePreferenceFragment.class.getName();
+
+            switch (AccessibilityUtil.getAccessibilityServiceFragmentType(info)) {
+                case AccessibilityServiceFragmentType.VOLUME_SHORTCUT_TOGGLE:
+                    return volumeShortcutToggleAccessibilityServicePreferenceFragment;
+                case AccessibilityServiceFragmentType.INVISIBLE_TOGGLE:
                     return InvisibleToggleAccessibilityServicePreferenceFragment.class.getName();
-                case AccessibilityServiceFragmentType.INTUITIVE:
+                case AccessibilityServiceFragmentType.TOGGLE:
                     return ToggleAccessibilityServicePreferenceFragment.class.getName();
                 default:
                     // impossible status
diff --git a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizard.java b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizard.java
index 2bcb5b3..090e5d4 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizard.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizard.java
@@ -16,7 +16,7 @@
 
 package com.android.settings.accessibility;
 
-import static com.android.settings.accessibility.AccessibilityUtil.AccessibilityServiceFragmentType.LEGACY;
+import static com.android.settings.accessibility.AccessibilityUtil.AccessibilityServiceFragmentType.VOLUME_SHORTCUT_TOGGLE;
 
 import android.accessibilityservice.AccessibilityServiceInfo;
 import android.app.settings.SettingsEnums;
@@ -102,10 +102,10 @@
         super.onResume();
         updateAccessibilityServicePreference(mScreenReaderPreference,
                 SCREEN_READER_PACKAGE_NAME, SCREEN_READER_SERVICE_NAME,
-                LegacyToggleScreenReaderPreferenceFragmentForSetupWizard.class.getName());
+                VolumeShortcutToggleScreenReaderPreferenceFragmentForSetupWizard.class.getName());
         updateAccessibilityServicePreference(mSelectToSpeakPreference,
                 SELECT_TO_SPEAK_PACKAGE_NAME, SELECT_TO_SPEAK_SERVICE_NAME,
-                LegacyToggleSelectToSpeakPreferenceFragmentForSetupWizard.class.getName());
+                VolumeShortcutToggleSelectToSpeakPreferenceFragmentForSetupWizard.class.getName());
         configureMagnificationPreferenceIfNeeded(mDisplayMagnificationPreference);
     }
 
@@ -147,7 +147,7 @@
     }
 
     private void updateAccessibilityServicePreference(Preference preference,
-            String packageName, String serviceName, String targetLegacyFragment) {
+            String packageName, String serviceName, String targetFragment) {
         final AccessibilityServiceInfo info = findService(packageName, serviceName);
         if (info == null) {
             getPreferenceScreen().removePreference(preference);
@@ -159,8 +159,8 @@
         preference.setTitle(title);
         ComponentName componentName = new ComponentName(serviceInfo.packageName, serviceInfo.name);
         preference.setKey(componentName.flattenToString());
-        if (AccessibilityUtil.getAccessibilityServiceFragmentType(info) == LEGACY) {
-            preference.setFragment(targetLegacyFragment);
+        if (AccessibilityUtil.getAccessibilityServiceFragmentType(info) == VOLUME_SHORTCUT_TOGGLE) {
+            preference.setFragment(targetFragment);
         }
 
         // Update the extras.
diff --git a/src/com/android/settings/accessibility/AccessibilityUtil.java b/src/com/android/settings/accessibility/AccessibilityUtil.java
index a0e3d81..eb202b5 100644
--- a/src/com/android/settings/accessibility/AccessibilityUtil.java
+++ b/src/com/android/settings/accessibility/AccessibilityUtil.java
@@ -46,22 +46,23 @@
     /**
      * Annotation for different accessibilityService fragment UI type.
      *
-     * {@code LEGACY} for displaying appearance aligned with sdk version Q accessibility service
-     * page, but only hardware shortcut allowed.
-     * {@code INVISIBLE} for displaying appearance without switch bar.
-     * {@code INTUITIVE} for displaying appearance with new design.
+     * {@code VOLUME_SHORTCUT_TOGGLE} for displaying basic accessibility service fragment but
+     * only hardware shortcut allowed.
+     * {@code INVISIBLE_TOGGLE} for displaying basic accessibility service fragment without
+     * switch bar.
+     * {@code TOGGLE} for displaying basic accessibility service fragment.
      */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({
-            AccessibilityServiceFragmentType.LEGACY,
-            AccessibilityServiceFragmentType.INVISIBLE,
-            AccessibilityServiceFragmentType.INTUITIVE,
+            AccessibilityServiceFragmentType.VOLUME_SHORTCUT_TOGGLE,
+            AccessibilityServiceFragmentType.INVISIBLE_TOGGLE,
+            AccessibilityServiceFragmentType.TOGGLE,
     })
 
     public @interface AccessibilityServiceFragmentType {
-        int LEGACY = 0;
-        int INVISIBLE = 1;
-        int INTUITIVE = 2;
+        int VOLUME_SHORTCUT_TOGGLE = 0;
+        int INVISIBLE_TOGGLE = 1;
+        int TOGGLE = 2;
     }
 
     // TODO(b/147021230): Will move common functions and variables to
@@ -162,11 +163,11 @@
                 & AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON) != 0;
 
         if (targetSdk <= Build.VERSION_CODES.Q) {
-            return AccessibilityServiceFragmentType.LEGACY;
+            return AccessibilityServiceFragmentType.VOLUME_SHORTCUT_TOGGLE;
         }
         return requestA11yButton
-                ? AccessibilityServiceFragmentType.INVISIBLE
-                : AccessibilityServiceFragmentType.INTUITIVE;
+                ? AccessibilityServiceFragmentType.INVISIBLE_TOGGLE
+                : AccessibilityServiceFragmentType.TOGGLE;
     }
 
     /**
diff --git a/src/com/android/settings/accessibility/LegacyAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/VolumeShortcutToggleAccessibilityServicePreferenceFragment.java
similarity index 97%
rename from src/com/android/settings/accessibility/LegacyAccessibilityServicePreferenceFragment.java
rename to src/com/android/settings/accessibility/VolumeShortcutToggleAccessibilityServicePreferenceFragment.java
index c5cede3..31f97a8 100644
--- a/src/com/android/settings/accessibility/LegacyAccessibilityServicePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/VolumeShortcutToggleAccessibilityServicePreferenceFragment.java
@@ -34,7 +34,7 @@
  *
  * <p>For accessibility services that target SDK <= Q.
  */
-public class LegacyAccessibilityServicePreferenceFragment extends
+public class VolumeShortcutToggleAccessibilityServicePreferenceFragment extends
         ToggleAccessibilityServicePreferenceFragment {
 
     @Override
diff --git a/src/com/android/settings/accessibility/LegacyToggleScreenReaderPreferenceFragmentForSetupWizard.java b/src/com/android/settings/accessibility/VolumeShortcutToggleScreenReaderPreferenceFragmentForSetupWizard.java
similarity index 91%
rename from src/com/android/settings/accessibility/LegacyToggleScreenReaderPreferenceFragmentForSetupWizard.java
rename to src/com/android/settings/accessibility/VolumeShortcutToggleScreenReaderPreferenceFragmentForSetupWizard.java
index 1b37a42..6e4a233 100644
--- a/src/com/android/settings/accessibility/LegacyToggleScreenReaderPreferenceFragmentForSetupWizard.java
+++ b/src/com/android/settings/accessibility/VolumeShortcutToggleScreenReaderPreferenceFragmentForSetupWizard.java
@@ -21,8 +21,8 @@
 import android.view.View;
 
 /** For accessibility services that target SDK <= Q in setup wizard. */
-public class LegacyToggleScreenReaderPreferenceFragmentForSetupWizard
-        extends LegacyAccessibilityServicePreferenceFragment {
+public class VolumeShortcutToggleScreenReaderPreferenceFragmentForSetupWizard
+        extends VolumeShortcutToggleAccessibilityServicePreferenceFragment {
 
     private boolean mToggleSwitchWasInitiallyChecked;
 
diff --git a/src/com/android/settings/accessibility/LegacyToggleSelectToSpeakPreferenceFragmentForSetupWizard.java b/src/com/android/settings/accessibility/VolumeShortcutToggleSelectToSpeakPreferenceFragmentForSetupWizard.java
similarity index 91%
rename from src/com/android/settings/accessibility/LegacyToggleSelectToSpeakPreferenceFragmentForSetupWizard.java
rename to src/com/android/settings/accessibility/VolumeShortcutToggleSelectToSpeakPreferenceFragmentForSetupWizard.java
index ffb363c..3dd648c 100644
--- a/src/com/android/settings/accessibility/LegacyToggleSelectToSpeakPreferenceFragmentForSetupWizard.java
+++ b/src/com/android/settings/accessibility/VolumeShortcutToggleSelectToSpeakPreferenceFragmentForSetupWizard.java
@@ -21,8 +21,8 @@
 import android.view.View;
 
 /** For accessibility services that target SDK <= Q in setup wizard. */
-public class LegacyToggleSelectToSpeakPreferenceFragmentForSetupWizard
-        extends LegacyAccessibilityServicePreferenceFragment {
+public class VolumeShortcutToggleSelectToSpeakPreferenceFragmentForSetupWizard
+        extends VolumeShortcutToggleAccessibilityServicePreferenceFragment {
 
     private boolean mToggleSwitchWasInitiallyChecked;
 
diff --git a/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java b/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
index 239ad21..2a91c48 100644
--- a/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
+++ b/src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
@@ -210,6 +210,11 @@
         final DataUsageController.DataUsageInfo info =
                 mDataUsageController.getDataUsageInfo(mDefaultTemplate);
 
+        long usageLevel = info.usageLevel;
+        if (usageLevel <= 0L) {
+            usageLevel = mDataUsageController.getHistoricalUsageLevel(mDefaultTemplate);
+        }
+
         if (subInfo != null) {
             mDataInfoController.updateDataLimit(info, mPolicyEditor.getPolicy(mDefaultTemplate));
             summaryPreference.setWifiMode(/* isWifiMode */ false,
@@ -218,7 +223,7 @@
             summaryPreference.setWifiMode(/* isWifiMode */ true, /* usagePeriod */
                     info.period, /* isSingleWifi */ false);
             summaryPreference.setLimitInfo(null);
-            summaryPreference.setUsageNumbers(info.usageLevel,
+            summaryPreference.setUsageNumbers(usageLevel,
                     /* dataPlanSize */ -1L,
                     /* hasMobileData */ true);
             summaryPreference.setChartEnabled(false);
@@ -231,6 +236,11 @@
         }
 
         refreshDataplanInfo(info, subInfo);
+        if ((mDataplanUse <= 0L) && (mSnapshotTime < 0)) {
+            Log.d(TAG, "Display data usage from history");
+            mDataplanUse = usageLevel;
+            mSnapshotTime = -1L;
+        }
 
         if (info.warningLevel > 0 && info.limitLevel > 0) {
             summaryPreference.setLimitInfo(TextUtils.expandTemplate(
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
index c6a7684..bf63130 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsTest.java
@@ -130,8 +130,8 @@
     }
 
     @Test
-    public void getServiceSummary_invisibleType_shortcutDisabled_showsOffSummary() {
-        setInvisibleFragmentType(mServiceInfo);
+    public void getServiceSummary_invisibleToggle_shortcutDisabled_showsOffSummary() {
+        setInvisibleToggleFragmentType(mServiceInfo);
         doReturn(DEFAULT_SUMMARY).when(mServiceInfo).loadSummary(any());
 
         final CharSequence summary = AccessibilitySettings.getServiceSummary(mContext,
@@ -277,7 +277,7 @@
         when(mockInfo.getComponentName()).thenReturn(DUMMY_COMPONENT_NAME);
     }
 
-    private void setInvisibleFragmentType(AccessibilityServiceInfo info) {
+    private void setInvisibleToggleFragmentType(AccessibilityServiceInfo info) {
         info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion = Build.VERSION_CODES.R;
         info.flags |= AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON;
     }
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilityUtilTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilityUtilTest.java
index b8936c4..ac3198f 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilityUtilTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilityUtilTest.java
@@ -102,36 +102,36 @@
     }
 
     @Test
-    public void getAccessibilityServiceFragmentType_targetSdkQ_legacyType() {
+    public void getAccessibilityServiceFragmentType_targetSdkQ_volumeShortcutType() {
         final AccessibilityServiceInfo info = getMockAccessibilityServiceInfo();
 
         info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion = Build.VERSION_CODES.Q;
         info.flags |= AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON;
 
         assertThat(AccessibilityUtil.getAccessibilityServiceFragmentType(info)).isEqualTo(
-                AccessibilityUtil.AccessibilityServiceFragmentType.LEGACY);
+                AccessibilityUtil.AccessibilityServiceFragmentType.VOLUME_SHORTCUT_TOGGLE);
     }
 
     @Test
-    public void getAccessibilityServiceFragmentType_targetSdkR_HaveA11yButton_headlessType() {
+    public void getAccessibilityServiceFragmentType_targetSdkR_HaveA11yButton_invisibleType() {
         final AccessibilityServiceInfo info = getMockAccessibilityServiceInfo();
 
         info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion = Build.VERSION_CODES.R;
         info.flags |= AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON;
 
         assertThat(AccessibilityUtil.getAccessibilityServiceFragmentType(info)).isEqualTo(
-                AccessibilityUtil.AccessibilityServiceFragmentType.INVISIBLE);
+                AccessibilityUtil.AccessibilityServiceFragmentType.INVISIBLE_TOGGLE);
     }
 
     @Test
-    public void getAccessibilityServiceFragmentType_targetSdkR_NoA11yButton_intuitiveType() {
+    public void getAccessibilityServiceFragmentType_targetSdkR_NoA11yButton_toggleType() {
         final AccessibilityServiceInfo info = getMockAccessibilityServiceInfo();
 
         info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion = Build.VERSION_CODES.R;
         info.flags |= ~AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON;
 
         assertThat(AccessibilityUtil.getAccessibilityServiceFragmentType(info)).isEqualTo(
-                AccessibilityUtil.AccessibilityServiceFragmentType.INTUITIVE);
+                AccessibilityUtil.AccessibilityServiceFragmentType.TOGGLE);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/notification/RedactionInterstitialTest.java b/tests/robotests/src/com/android/settings/notification/RedactionInterstitialTest.java
index 081f764..5c6da49 100644
--- a/tests/robotests/src/com/android/settings/notification/RedactionInterstitialTest.java
+++ b/tests/robotests/src/com/android/settings/notification/RedactionInterstitialTest.java
@@ -11,6 +11,7 @@
 
 import android.content.ContentResolver;
 import android.content.Intent;
+import android.content.pm.UserInfo;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.provider.Settings;
@@ -25,7 +26,6 @@
 
 import org.junit.After;
 import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.RobolectricTestRunner;
@@ -103,12 +103,13 @@
     }
 
     @Test
-    @Ignore
     public void managedProfileNoRestrictionsTest() {
         setupSettings(1 /* show */, 1 /* showUnredacted */);
         final ShadowUserManager sum =
                 Shadow.extract(RuntimeEnvironment.application.getSystemService(UserManager.class));
-        sum.setManagedProfile(true);
+        sum.addProfile(
+                UserHandle.myUserId(), UserHandle.myUserId(),
+                "work-profile"/* profileName */, UserInfo.FLAG_MANAGED_PROFILE);
         setupActivity();
 
         assertHideAllVisible(false);
@@ -117,12 +118,13 @@
     }
 
     @Test
-    @Ignore
     public void managedProfileUnredactedRestrictionTest() {
         setupSettings(1 /* show */, 1 /* showUnredacted */);
         final ShadowUserManager sum =
                 Shadow.extract(RuntimeEnvironment.application.getSystemService(UserManager.class));
-        sum.setManagedProfile(true);
+        sum.addProfile(
+                UserHandle.myUserId(), UserHandle.myUserId(),
+                "work-profile"/* profileName */, UserInfo.FLAG_MANAGED_PROFILE);
         ShadowRestrictedLockUtilsInternal.setKeyguardDisabledFeatures(
                 KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS);
         setupActivity();
