diff --git a/res/values/strings.xml b/res/values/strings.xml
index 406251d..ef02a10 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4960,8 +4960,8 @@
     <!-- Bluetooth on time -->
     <string name="bluetooth_on_time">Wi\u2011Fi on time</string>
 
-    <!-- Activity title for advanced battery usage page [CHAR LIMIT=60] -->
-    <string name="advanced_battery_title">Advanced battery usage</string>
+    <!-- Activity title for advanced battery usage page [CHAR LIMIT=25] -->
+    <string name="advanced_battery_title">Battery usage</string>
     <!-- Activity title for battery usage history details [CHAR LIMIT=60] -->
     <string name="history_details_title">History details</string>
 
diff --git a/res/xml/app_and_notification.xml b/res/xml/app_and_notification.xml
index 85a766e..e3319e9 100644
--- a/res/xml/app_and_notification.xml
+++ b/res/xml/app_and_notification.xml
@@ -20,7 +20,7 @@
     xmlns:settings="http://schemas.android.com/apk/res-auto"
     android:key="apps_and_notification_screen"
     android:title="@string/app_and_notification_dashboard_title"
-    settings:initialExpandedChildrenCount="9">
+    settings:initialExpandedChildrenCount="7">
 
     <PreferenceCategory
         android:key="recent_apps_category"
diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
index 937e6db..52ca127 100644
--- a/src/com/android/settings/dashboard/DashboardAdapter.java
+++ b/src/com/android/settings/dashboard/DashboardAdapter.java
@@ -17,6 +17,7 @@
 
 import android.app.Activity;
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.service.settings.suggestions.Suggestion;
@@ -47,6 +48,7 @@
 import com.android.settingslib.core.lifecycle.events.OnSaveInstanceState;
 import com.android.settingslib.drawer.DashboardCategory;
 import com.android.settingslib.drawer.Tile;
+import com.android.settingslib.drawer.TileUtils;
 import com.android.settingslib.suggestions.SuggestionControllerMixin;
 import com.android.settingslib.utils.IconCache;
 
@@ -316,6 +318,20 @@
         if (!TextUtils.equals(tile.icon.getResPackage(), mContext.getPackageName())
                 && !(icon instanceof RoundedHomepageIcon)) {
             icon = new RoundedHomepageIcon(mContext, icon);
+            try {
+                if (tile.metaData != null) {
+                    final int colorRes = tile.metaData.getInt(
+                            TileUtils.META_DATA_PREFERENCE_ICON_BACKGROUND_HINT, 0 /* default */);
+                    if (colorRes != 0) {
+                        final int bgColor = mContext.getPackageManager()
+                                .getResourcesForApplication(tile.icon.getResPackage())
+                                .getColor(colorRes, null /* theme */);
+                        ((RoundedHomepageIcon) icon).setBackgroundColor(bgColor);
+                    }
+                }
+            } catch (PackageManager.NameNotFoundException e) {
+                Log.e(TAG, "Failed to set background color for " + tile.intent.getPackage());
+            }
             mCache.updateIcon(tile.icon, icon);
         }
         holder.icon.setImageDrawable(icon);
diff --git a/src/com/android/settings/dashboard/RoundedHomepageIcon.java b/src/com/android/settings/dashboard/RoundedHomepageIcon.java
index 19749b9..d63b80a 100644
--- a/src/com/android/settings/dashboard/RoundedHomepageIcon.java
+++ b/src/com/android/settings/dashboard/RoundedHomepageIcon.java
@@ -16,14 +16,21 @@
 
 package com.android.settings.dashboard;
 
+import static android.support.annotation.VisibleForTesting.NONE;
+
 import android.content.Context;
+import android.graphics.PorterDuff;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
+import android.support.annotation.VisibleForTesting;
 
 import com.android.settings.R;
 
 public class RoundedHomepageIcon extends LayerDrawable {
 
+    @VisibleForTesting(otherwise = NONE)
+    int mBackgroundColor = -1;
+
     public RoundedHomepageIcon(Context context, Drawable foreground) {
         super(new Drawable[] {
                 context.getDrawable(R.drawable.ic_homepage_generic_background),
@@ -33,4 +40,9 @@
                 .getDimensionPixelSize(R.dimen.dashboard_tile_foreground_image_inset);
         setLayerInset(1 /* index */, insetPx, insetPx, insetPx, insetPx);
     }
+
+    public void setBackgroundColor(int color) {
+        mBackgroundColor = color;
+        getDrawable(0).setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
+    }
 }
diff --git a/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java b/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java
index 1d71bea..7913bb5 100644
--- a/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java
+++ b/src/com/android/settings/deviceinfo/DeviceNamePreferenceController.java
@@ -21,32 +21,49 @@
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
 import android.os.Build;
+import android.os.Bundle;
 import android.provider.Settings;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceScreen;
 import android.text.SpannedString;
 
+import com.android.internal.annotations.VisibleForTesting;
+
 import com.android.settings.bluetooth.BluetoothLengthDeviceNameFilter;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.widget.ValidatedEditTextPreference;
 import com.android.settings.wifi.tether.WifiDeviceNameTextValidator;
 import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
 import com.android.settingslib.bluetooth.LocalBluetoothManager;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+import com.android.settingslib.core.lifecycle.LifecycleObserver;
+import com.android.settingslib.core.lifecycle.events.OnCreate;
+import com.android.settingslib.core.lifecycle.events.OnSaveInstanceState;
 
 public class DeviceNamePreferenceController extends BasePreferenceController
-        implements ValidatedEditTextPreference.Validator, Preference.OnPreferenceChangeListener {
+        implements ValidatedEditTextPreference.Validator,
+                Preference.OnPreferenceChangeListener,
+                LifecycleObserver,
+                OnSaveInstanceState,
+                OnCreate {
     private static final String PREF_KEY = "device_name";
+    public static final int DEVICE_NAME_SET_WARNING_ID = 1;
+    private static final String KEY_PENDING_DEVICE_NAME = "key_pending_device_name";
     private String mDeviceName;
     protected WifiManager mWifiManager;
     private final WifiDeviceNameTextValidator mWifiDeviceNameTextValidator;
     private ValidatedEditTextPreference mPreference;
     @Nullable
     private LocalBluetoothManager mBluetoothManager;
+    private DeviceNamePreferenceHost mHost;
+    private String mPendingDeviceName;
 
     public DeviceNamePreferenceController(Context context) {
         super(context, PREF_KEY);
+
         mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
         mWifiDeviceNameTextValidator = new WifiDeviceNameTextValidator();
+
         initializeDeviceName();
     }
 
@@ -85,9 +102,10 @@
 
     @Override
     public boolean onPreferenceChange(Preference preference, Object newValue) {
-        mDeviceName = (String) newValue;
-        setDeviceName(mDeviceName);
-        preference.setSummary(getSummary());
+        mPendingDeviceName = (String) newValue;
+        if (mHost != null) {
+            mHost.showDeviceNameWarningDialog(mPendingDeviceName);
+        }
         return true;
     }
 
@@ -103,13 +121,25 @@
         mBluetoothManager = localBluetoothManager;
     }
 
+    public void confirmDeviceName() {
+        if (mPendingDeviceName != null) {
+            setDeviceName(mPendingDeviceName);
+        }
+    }
+
+    public void setHost(DeviceNamePreferenceHost host) {
+        mHost = host;
+    }
+
     /**
      * This method presumes that security/validity checks have already been passed.
      */
     private void setDeviceName(String deviceName) {
+        mDeviceName = deviceName;
         setSettingsGlobalDeviceName(deviceName);
         setBluetoothDeviceName(deviceName);
         setTetherSsidName(deviceName);
+        mPreference.setSummary(getSummary());
     }
 
     private void setSettingsGlobalDeviceName(String deviceName) {
@@ -150,4 +180,20 @@
         // TODO: If tether is running, turn off the AP and restart it after setting config.
         mWifiManager.setWifiApConfiguration(config);
     }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        if (savedInstanceState != null) {
+            mPendingDeviceName = savedInstanceState.getString(KEY_PENDING_DEVICE_NAME, null);
+        }
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        outState.putString(KEY_PENDING_DEVICE_NAME, mPendingDeviceName);
+    }
+
+    public interface DeviceNamePreferenceHost {
+        void showDeviceNameWarningDialog(String deviceName);
+    }
 }
\ No newline at end of file
diff --git a/src/com/android/settings/deviceinfo/aboutphone/DeviceNameWarningDialog.java b/src/com/android/settings/deviceinfo/aboutphone/DeviceNameWarningDialog.java
new file mode 100644
index 0000000..9808069
--- /dev/null
+++ b/src/com/android/settings/deviceinfo/aboutphone/DeviceNameWarningDialog.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.deviceinfo.aboutphone;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.FragmentManager;
+import android.content.DialogInterface;
+import android.os.Bundle;
+
+import com.android.internal.logging.nano.MetricsProto;
+import com.android.settings.R;
+import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+
+/**
+ * Warning dialog to let the user know where the device name will be shown before setting it.
+ */
+public class DeviceNameWarningDialog extends InstrumentedDialogFragment
+        implements DialogInterface.OnClickListener {
+
+    public static final String TAG = "DeviceNameWarningDlg";
+
+    public static void show(MyDeviceInfoFragment host) {
+        final FragmentManager manager = host.getActivity().getFragmentManager();
+        if (manager.findFragmentByTag(TAG) != null) {
+            return;
+        }
+
+        final DeviceNameWarningDialog dialog = new DeviceNameWarningDialog();
+        dialog.setTargetFragment(host, 0 /* requestCode */);
+        dialog.show(manager, TAG);
+    }
+
+    @Override
+    public int getMetricsCategory() {
+        return MetricsProto.MetricsEvent.DIALOG_ENABLE_DEVELOPMENT_OPTIONS;
+    }
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        return new AlertDialog.Builder(getActivity())
+                .setTitle(R.string.my_device_info_device_name_preference_title)
+                .setMessage(R.string.about_phone_device_name_warning)
+                .setCancelable(false)
+                .setPositiveButton(com.android.internal.R.string.ok, this)
+                .setNegativeButton(com.android.internal.R.string.cancel, this)
+                .create();
+    }
+
+    @Override
+    public void onClick(DialogInterface dialog, int which) {
+        final MyDeviceInfoFragment host = (MyDeviceInfoFragment) getTargetFragment();
+        if (which == DialogInterface.BUTTON_POSITIVE) {
+            host.onSetDeviceNameConfirm();
+        }
+    }
+}
diff --git a/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java b/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
index e6303dc..09262a0 100644
--- a/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
+++ b/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
@@ -19,7 +19,6 @@
 import static com.android.settings.bluetooth.Utils.getLocalBtManager;
 
 import android.app.Activity;
-import android.app.Fragment;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.UserInfo;
@@ -60,7 +59,8 @@
 import java.util.Arrays;
 import java.util.List;
 
-public class MyDeviceInfoFragment extends DashboardFragment {
+public class MyDeviceInfoFragment extends DashboardFragment
+        implements DeviceNamePreferenceController.DeviceNamePreferenceHost {
     private static final String LOG_TAG = "MyDeviceInfoFragment";
 
     private static final String KEY_MY_DEVICE_INFO_HEADER = "my_device_info_header";
@@ -98,8 +98,11 @@
                 getLifecycle());
     }
 
-    private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
-            Activity activity, Fragment fragment, Lifecycle lifecycle) {
+    private static List<AbstractPreferenceController> buildPreferenceControllers(
+            Context context,
+            Activity activity,
+            MyDeviceInfoFragment fragment,
+            Lifecycle lifecycle) {
         final List<AbstractPreferenceController> controllers = new ArrayList<>();
         controllers.add(new EmergencyInfoPreferenceController(context));
         controllers.add(new PhoneNumberPreferenceController(context));
@@ -107,6 +110,10 @@
         DeviceNamePreferenceController deviceNamePreferenceController =
                 new DeviceNamePreferenceController(context);
         deviceNamePreferenceController.setLocalBluetoothManager(getLocalBtManager(context));
+        deviceNamePreferenceController.setHost(fragment);
+        if (lifecycle != null) {
+            lifecycle.addObserver(deviceNamePreferenceController);
+        }
         controllers.add(deviceNamePreferenceController);
         controllers.add(new SimStatusPreferenceController(context, fragment));
         controllers.add(new DeviceModelPreferenceController(context, fragment));
@@ -162,6 +169,16 @@
         controller.done(context, true /* rebindActions */);
     }
 
+    @Override
+    public void showDeviceNameWarningDialog(String deviceName) {
+        DeviceNameWarningDialog.show(this);
+    }
+
+    public void onSetDeviceNameConfirm() {
+        final DeviceNamePreferenceController controller = use(DeviceNamePreferenceController.class);
+        controller.confirmDeviceName();
+    }
+
     private static class SummaryProvider implements SummaryLoader.SummaryProvider {
 
         private final SummaryLoader mSummaryLoader;
diff --git a/src/com/android/settings/fuelgauge/BatteryUtils.java b/src/com/android/settings/fuelgauge/BatteryUtils.java
index 111b279..c8a5d47 100644
--- a/src/com/android/settings/fuelgauge/BatteryUtils.java
+++ b/src/com/android/settings/fuelgauge/BatteryUtils.java
@@ -20,6 +20,7 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.os.BatteryStats;
@@ -595,5 +596,21 @@
 
         return false;
     }
+
+    /**
+     * Return version number of an app represented by {@code packageName}, and return -1 if not
+     * found.
+     */
+    public long getAppLongVersionCode(String packageName) {
+        try {
+            final PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName,
+                    0 /* flags */);
+            return packageInfo.getLongVersionCode();
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.e(TAG, "Cannot find package: " + packageName, e);
+        }
+
+        return -1L;
+    }
 }
 
diff --git a/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobService.java b/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobService.java
index 661cb53..518b633 100644
--- a/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobService.java
+++ b/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobService.java
@@ -146,6 +146,7 @@
                     : Settings.Global.getInt(contentResolver,
                             Settings.Global.APP_AUTO_RESTRICTION_ENABLED, ON) == ON;
             final String packageName = batteryUtils.getPackageName(uid);
+            final long versionCode = batteryUtils.getAppLongVersionCode(packageName);
 
             final boolean anomalyDetected;
             if (isExcessiveBackgroundAnomaly(anomalyInfo)) {
@@ -162,7 +163,9 @@
                             MetricsProto.MetricsEvent.ACTION_ANOMALY_IGNORED,
                             packageName,
                             Pair.create(MetricsProto.MetricsEvent.FIELD_CONTEXT,
-                                    anomalyInfo.anomalyType));
+                                    anomalyInfo.anomalyType),
+                            Pair.create(MetricsProto.MetricsEvent.FIELD_APP_VERSION_CODE,
+                                    versionCode));
                 } else {
                     if (autoFeatureOn && anomalyInfo.autoRestriction) {
                         // Auto restrict this app
@@ -180,7 +183,9 @@
                             MetricsProto.MetricsEvent.ACTION_ANOMALY_TRIGGERED,
                             packageName,
                             Pair.create(MetricsProto.MetricsEvent.FIELD_ANOMALY_TYPE,
-                                    anomalyInfo.anomalyType));
+                                    anomalyInfo.anomalyType),
+                            Pair.create(MetricsProto.MetricsEvent.FIELD_APP_VERSION_CODE,
+                                    versionCode));
                 }
             }
         } catch (NullPointerException | IndexOutOfBoundsException e) {
diff --git a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
index 5256ac4..ad0b01f 100644
--- a/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/DashboardAdapterTest.java
@@ -18,6 +18,7 @@
 import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.reset;
@@ -30,6 +31,7 @@
 import android.content.res.Resources;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Icon;
+import android.os.Bundle;
 import android.service.settings.suggestions.Suggestion;
 import android.support.v7.widget.RecyclerView;
 import android.util.DisplayMetrics;
@@ -46,6 +48,7 @@
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settings.testutils.shadow.SettingsShadowResources;
 import com.android.settingslib.drawer.Tile;
+import com.android.settingslib.drawer.TileUtils;
 import com.android.settingslib.utils.IconCache;
 
 import org.junit.Before;
@@ -193,24 +196,48 @@
 
     @Test
     public void onBindTile_externalTile_shouldUpdateIcon() {
-        final Context context = RuntimeEnvironment.application;
+        final Context context = spy(RuntimeEnvironment.application);
         final View view = LayoutInflater.from(context).inflate(R.layout.dashboard_tile, null);
         final DashboardAdapter.DashboardItemHolder holder =
                 new DashboardAdapter.DashboardItemHolder(view);
         final Tile tile = new Tile();
-        tile.icon = mock(Icon.class);
+        tile.icon = Icon.createWithResource(context, R.drawable.ic_settings);
         when(tile.icon.getResPackage()).thenReturn("another.package");
 
-        final IconCache iconCache = mock(IconCache.class);
-        when(iconCache.getIcon(tile.icon)).thenReturn(context.getDrawable(R.drawable.ic_settings));
+        final IconCache iconCache = new IconCache(context);
 
         mDashboardAdapter = new DashboardAdapter(context, null /* savedInstanceState */,
                 null /* conditions */, null /* suggestionControllerMixin */, null /* lifecycle */);
         ReflectionHelpers.setField(mDashboardAdapter, "mCache", iconCache);
 
+        doReturn("another.package").when(context).getPackageName();
         mDashboardAdapter.onBindTile(holder, tile);
 
-        verify(iconCache).updateIcon(eq(tile.icon), any(RoundedHomepageIcon.class));
+        assertThat(iconCache.getIcon(tile.icon)).isInstanceOf(RoundedHomepageIcon.class);
+    }
+
+    @Test
+    public void onBindTile_externalTileWithBackgroundColorHint_shouldUpdateIcon() {
+        final Context context = spy(RuntimeEnvironment.application);
+        final View view = LayoutInflater.from(context).inflate(R.layout.dashboard_tile, null);
+        final DashboardAdapter.DashboardItemHolder holder =
+                new DashboardAdapter.DashboardItemHolder(view);
+        final Tile tile = new Tile();
+        tile.metaData = new Bundle();
+        tile.metaData.putInt(TileUtils.META_DATA_PREFERENCE_ICON_BACKGROUND_HINT,
+                R.color.memory_critical);
+        tile.icon = Icon.createWithResource(context, R.drawable.ic_settings);
+        final IconCache iconCache = new IconCache(context);
+        mDashboardAdapter = new DashboardAdapter(context, null /* savedInstanceState */,
+                null /* conditions */, null /* suggestionControllerMixin */, null /* lifecycle */);
+        ReflectionHelpers.setField(mDashboardAdapter, "mCache", iconCache);
+
+        doReturn("another.package").when(context).getPackageName();
+        mDashboardAdapter.onBindTile(holder, tile);
+
+        final RoundedHomepageIcon homepageIcon = (RoundedHomepageIcon) iconCache.getIcon(tile.icon);
+        assertThat(homepageIcon.mBackgroundColor)
+                .isEqualTo(RuntimeEnvironment.application.getColor(R.color.memory_critical));
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/dashboard/RoundedHomepageIconTest.java b/tests/robotests/src/com/android/settings/dashboard/RoundedHomepageIconTest.java
index f270395..0c90660 100644
--- a/tests/robotests/src/com/android/settings/dashboard/RoundedHomepageIconTest.java
+++ b/tests/robotests/src/com/android/settings/dashboard/RoundedHomepageIconTest.java
@@ -17,10 +17,16 @@
 package com.android.settings.dashboard;
 
 import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import android.content.Context;
 import android.graphics.Color;
+import android.graphics.PorterDuff;
 import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.ShapeDrawable;
 
 import com.android.settings.R;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
@@ -43,10 +49,22 @@
     @Test
     public void createIcon_shouldSetBackgroundAndInset() {
         final RoundedHomepageIcon icon =
-            new RoundedHomepageIcon(mContext, new ColorDrawable(Color.BLACK));
+                new RoundedHomepageIcon(mContext, new ColorDrawable(Color.BLACK));
 
         assertThat(icon.getNumberOfLayers()).isEqualTo(2);
         assertThat(icon.getDrawable(0))
-            .isEqualTo(mContext.getDrawable(R.drawable.ic_homepage_generic_background));
+                .isEqualTo(mContext.getDrawable(R.drawable.ic_homepage_generic_background));
+    }
+
+    @Test
+    public void setBackgroundColor_shouldUpdateColorFilter() {
+        final RoundedHomepageIcon icon =
+                spy(new RoundedHomepageIcon(mContext, new ColorDrawable(Color.BLACK)));
+        final ShapeDrawable background = mock(ShapeDrawable.class);
+        when(icon.getDrawable(0)).thenReturn(background);
+
+        icon.setBackgroundColor(Color.BLUE);
+
+        verify(background).setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);
     }
 }
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/DeviceNamePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/DeviceNamePreferenceControllerTest.java
index a4e0975..66a50ee 100644
--- a/tests/robotests/src/com/android/settings/deviceinfo/DeviceNamePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/deviceinfo/DeviceNamePreferenceControllerTest.java
@@ -17,8 +17,10 @@
 package com.android.settings.deviceinfo;
 
 import static com.google.common.truth.Truth.assertThat;
+
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -84,8 +86,8 @@
 
     @Test
     public void constructor_deviceNameLoadedIfSet() {
-        Settings.Global
-            .putString(mContext.getContentResolver(), Settings.Global.DEVICE_NAME, "Test");
+        Settings.Global.putString(
+                mContext.getContentResolver(), Settings.Global.DEVICE_NAME, "Test");
         mController = new DeviceNamePreferenceController(mContext);
         mController.setLocalBluetoothManager(mBluetoothManager);
         assertThat(mController.getSummary()).isEqualTo("Test");
@@ -103,6 +105,8 @@
 
     @Test
     public void setDeviceName_preferenceUpdatedWhenDeviceNameUpdated() {
+        forceAcceptDeviceName();
+        mController.displayPreference(mScreen);
         mController.onPreferenceChange(mPreference, TESTING_STRING);
 
         assertThat(mPreference.getSummary()).isEqualTo(TESTING_STRING);
@@ -110,6 +114,8 @@
 
     @Test
     public void setDeviceName_bluetoothNameUpdatedWhenDeviceNameUpdated() {
+        forceAcceptDeviceName();
+        mController.displayPreference(mScreen);
         mController.onPreferenceChange(mPreference, TESTING_STRING);
 
         verify(mBluetoothAdapter).setName(eq(TESTING_STRING));
@@ -117,6 +123,8 @@
 
     @Test
     public void setDeviceName_wifiTetherNameUpdatedWhenDeviceNameUpdated() {
+        forceAcceptDeviceName();
+        mController.displayPreference(mScreen);
         mController.onPreferenceChange(mPreference, TESTING_STRING);
 
         ArgumentCaptor<WifiConfiguration> captor = ArgumentCaptor.forClass(WifiConfiguration.class);
@@ -131,4 +139,22 @@
         assertThat(mPreference.getText()).isEqualTo(Build.MODEL);
     }
 
+    @Test
+    public void setDeviceName_ignoresIfCancelPressed() {
+        mController.displayPreference(mScreen);
+        mController.onPreferenceChange(mPreference, TESTING_STRING);
+
+        verify(mBluetoothAdapter, never()).setName(eq(TESTING_STRING));
+    }
+
+    private void forceAcceptDeviceName() {
+        mController.setHost(
+                new DeviceNamePreferenceController.DeviceNamePreferenceHost() {
+                    @Override
+                    public void showDeviceNameWarningDialog(String deviceName) {
+                        mController.confirmDeviceName();
+                    }
+                });
+    }
+
 }
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/deviceinfo/DeviceNameWarningDialogTest.java b/tests/robotests/src/com/android/settings/deviceinfo/deviceinfo/DeviceNameWarningDialogTest.java
new file mode 100644
index 0000000..376264e
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/deviceinfo/deviceinfo/DeviceNameWarningDialogTest.java
@@ -0,0 +1,48 @@
+package com.android.settings.deviceinfo.deviceinfo;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+
+import android.content.DialogInterface;
+
+import com.android.settings.deviceinfo.aboutphone.DeviceNameWarningDialog;
+import com.android.settings.deviceinfo.aboutphone.MyDeviceInfoFragment;
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.Robolectric;
+import org.robolectric.android.controller.FragmentController;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+public class DeviceNameWarningDialogTest {
+    DeviceNameWarningDialog mDialog;
+
+    @Test
+    public void onClick_okSetsName() {
+        final FragmentController<DeviceNameWarningDialog> fragmentController =
+                Robolectric.buildFragment(DeviceNameWarningDialog.class);
+        final DeviceNameWarningDialog fragment = spy(fragmentController.get());
+        final MyDeviceInfoFragment deviceInfoFragment = mock(MyDeviceInfoFragment.class);
+        fragment.setTargetFragment(deviceInfoFragment, 0);
+        fragmentController.create().start().resume();
+        fragment.onClick(null, DialogInterface.BUTTON_POSITIVE);
+
+        verify(deviceInfoFragment).onSetDeviceNameConfirm();
+    }
+
+    @Test
+    public void onClick_cancelDoesNothing() {
+        final FragmentController<DeviceNameWarningDialog> fragmentController =
+                Robolectric.buildFragment(DeviceNameWarningDialog.class);
+        final DeviceNameWarningDialog fragment = spy(fragmentController.get());
+        final MyDeviceInfoFragment deviceInfoFragment = mock(MyDeviceInfoFragment.class);
+        fragment.setTargetFragment(deviceInfoFragment, 0);
+        fragmentController.create().start().resume();
+        fragment.onClick(null, DialogInterface.BUTTON_NEGATIVE);
+
+        verify(deviceInfoFragment, never()).onSetDeviceNameConfirm();
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobServiceTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobServiceTest.java
index 16d7c3f..d6fad34 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobServiceTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/AnomalyDetectionJobServiceTest.java
@@ -79,6 +79,7 @@
     private static final String SUBSCRIBER_COOKIES_NOT_AUTO_RESTRICTION =
             "anomaly_type=6,auto_restriction=false";
     private static final int ANOMALY_TYPE = 6;
+    private static final long VERSION_CODE = 15;
     @Mock
     private BatteryStatsHelper mBatteryStatsHelper;
     @Mock
@@ -107,6 +108,7 @@
         mBundle = new Bundle();
         mBundle.putParcelable(StatsManager.EXTRA_STATS_DIMENSIONS_VALUE, mStatsDimensionsValue);
         mFeatureFactory = FakeFeatureFactory.setupForTest();
+        when(mBatteryUtils.getAppLongVersionCode(any())).thenReturn(VERSION_CODE);
 
         mAnomalyDetectionJobService = spy(new AnomalyDetectionJobService());
     }
@@ -163,7 +165,8 @@
         verify(mFeatureFactory.metricsFeatureProvider).action(mContext,
                 MetricsProto.MetricsEvent.ACTION_ANOMALY_IGNORED,
                 SYSTEM_PACKAGE,
-                Pair.create(MetricsProto.MetricsEvent.FIELD_CONTEXT, ANOMALY_TYPE));
+                Pair.create(MetricsProto.MetricsEvent.FIELD_CONTEXT, ANOMALY_TYPE),
+                Pair.create(MetricsProto.MetricsEvent.FIELD_APP_VERSION_CODE, VERSION_CODE));
     }
 
     @Test
@@ -217,7 +220,8 @@
         verify(mFeatureFactory.metricsFeatureProvider).action(mContext,
                 MetricsProto.MetricsEvent.ACTION_ANOMALY_TRIGGERED,
                 SYSTEM_PACKAGE,
-                Pair.create(MetricsProto.MetricsEvent.FIELD_ANOMALY_TYPE, ANOMALY_TYPE));
+                Pair.create(MetricsProto.MetricsEvent.FIELD_ANOMALY_TYPE, ANOMALY_TYPE),
+                Pair.create(MetricsProto.MetricsEvent.FIELD_APP_VERSION_CODE, VERSION_CODE));
     }
 
 
@@ -242,7 +246,8 @@
         verify(mFeatureFactory.metricsFeatureProvider).action(mContext,
                 MetricsProto.MetricsEvent.ACTION_ANOMALY_TRIGGERED,
                 SYSTEM_PACKAGE,
-                Pair.create(MetricsProto.MetricsEvent.FIELD_ANOMALY_TYPE, ANOMALY_TYPE));
+                Pair.create(MetricsProto.MetricsEvent.FIELD_ANOMALY_TYPE, ANOMALY_TYPE),
+                Pair.create(MetricsProto.MetricsEvent.FIELD_APP_VERSION_CODE, VERSION_CODE));
     }
 
     @Test
