diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 48b1333..96e3dd1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -3029,11 +3029,15 @@
                      <category android:name="android.intent.category.DEFAULT" />
                  </intent-filter>
                 <intent-filter>
-                    <action android:name="android.settings.panel.action.VOLUME" />
+                    <action android:name="android.settings.panel.action.NFC" />
                     <category android:name="android.intent.category.DEFAULT" />
                 </intent-filter>
                 <intent-filter>
-                    <action android:name="android.settings.panel.action.NFC" />
+                    <action android:name="android.settings.panel.action.WIFI" />
+                    <category android:name="android.intent.category.DEFAULT" />
+                </intent-filter>
+                <intent-filter>
+                    <action android:name="android.settings.panel.action.VOLUME" />
                     <category android:name="android.intent.category.DEFAULT" />
                 </intent-filter>
         </activity>
diff --git a/res/layout/homepage_slice_tile.xml b/res/layout/homepage_slice_tile.xml
index 807c26b..e95129e 100644
--- a/res/layout/homepage_slice_tile.xml
+++ b/res/layout/homepage_slice_tile.xml
@@ -31,6 +31,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
+            android:animateLayoutChanges="true"
             style="@style/SliceViewStyle"/>
 
         <!--dismissal view-->
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6cbe22b..f3fe1f0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5587,6 +5587,12 @@
     <!-- Battery saver: Title for battery saver schedule screen [CHAR_LIMIT=40] -->
     <string name="battery_saver_schedule_settings_title">Set a schedule</string>
 
+    <!-- Battery Saver: Title for sticky battery saver preference [CHAR_LIMIT=60] -->
+    <string name="battery_saver_sticky_title">Keep battery saver on</string>
+
+    <!-- Battery Saver: Description for sticky battery saver preference [CHAR_LIMIT=NONE] -->
+    <string name="battery_saver_sticky_description">Battery saver will stay on even after device is fully charged</string>
+
     <!-- Battery saver: Label for seekbar to change battery saver threshold [CHAR_LIMIT=40] -->
     <string name="battery_saver_seekbar_title"><xliff:g id="percent">%1$s</xliff:g></string>
 
@@ -7151,6 +7157,9 @@
     <string name="keywords_ring_vibration">haptics, vibrate, phone, call, sensitivity, ring</string>
     <!-- List of synonyms for notification vibration setting (changes whether your phone vibrates when it shows a notification), used to match in settings search [CHAR LIMIT=NONE] -->
     <string name="keywords_notification_vibration">haptics, vibrate, sensitivity</string>
+    <!-- Battery Saver: Search terms for sticky battery saver preference [CHAR_LIMIT=NONE] -->
+    <string name="keywords_battery_saver_sticky">battery saver, sticky, persist, power saver, battery</string>
+
 
     <!-- NFC Wi-Fi pairing/setup strings-->
 
@@ -10657,6 +10666,9 @@
     <!-- Title for the Volume dialog (settings panel) with all volume streams[CHAR LIMIT=50] -->
     <string name="volume_connectivity_panel_title">Volume</string>
 
+    <!-- Subtitle explaining that mobile data cannot be used while airplane mode is on [CHAR LIMIT=50] -->
+    <string name="mobile_data_ap_mode_disabled">Unavailable during airplane mode</string>
+
     <!-- UI debug setting: force desktop mode [CHAR LIMIT=50] -->
     <string name="force_desktop_mode">Force desktop mode</string>
     <!-- UI debug setting: force desktop mode summary [CHAR LIMIT=NONE] -->
diff --git a/res/xml/battery_saver_settings.xml b/res/xml/battery_saver_settings.xml
index 89f7eab..ae9d14d 100644
--- a/res/xml/battery_saver_settings.xml
+++ b/res/xml/battery_saver_settings.xml
@@ -26,6 +26,13 @@
         android:title="@string/battery_saver_schedule_settings_title"
         settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverSchedulePreferenceController"/>
 
+    <SwitchPreference
+        android:key="battery_saver_sticky"
+        android:title="@string/battery_saver_sticky_title"
+        android:summary="@string/battery_saver_sticky_description"
+        settings:keywords="@string/keywords_battery_saver_sticky"
+        settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverStickyPreferenceController"/>
+
     <com.android.settings.widget.TwoStateButtonPreference
         android:key="battery_saver"
         android:title="@string/battery_saver"
diff --git a/res/xml/language_and_input.xml b/res/xml/language_and_input.xml
index b04bdf8..e3690a9 100644
--- a/res/xml/language_and_input.xml
+++ b/res/xml/language_and_input.xml
@@ -94,7 +94,8 @@
 
     <com.android.settings.widget.WorkOnlyCategory
         android:key="language_and_input_for_work_category"
-        android:title="@string/language_and_input_for_work_category_title">
+        android:title="@string/language_and_input_for_work_category_title"
+        settings:searchable="false">
 
         <Preference
             android:key="virtual_keyboards_for_work_pref"
diff --git a/res/xml/top_level_settings.xml b/res/xml/top_level_settings.xml
index 64b620a..367f426 100644
--- a/res/xml/top_level_settings.xml
+++ b/res/xml/top_level_settings.xml
@@ -18,8 +18,7 @@
 <PreferenceScreen
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:settings="http://schemas.android.com/apk/res-auto"
-    android:key="top_level_settings"
-    android:title="@string/settings_label_launcher">
+    android:key="top_level_settings">
 
     <Preference
         android:key="top_level_network"
diff --git a/src/com/android/settings/biometrics/BiometricEnrollActivity.java b/src/com/android/settings/biometrics/BiometricEnrollActivity.java
index b650c6c..39a7a80 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollActivity.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollActivity.java
@@ -16,8 +16,6 @@
 
 package com.android.settings.biometrics;
 
-import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
-
 import android.app.settings.SettingsEnums;
 import android.content.Intent;
 import android.content.pm.PackageManager;
@@ -25,8 +23,11 @@
 
 import com.android.settings.biometrics.face.FaceEnrollIntroduction;
 import com.android.settings.biometrics.fingerprint.FingerprintEnrollIntroduction;
+import com.android.settings.biometrics.fingerprint.SetupFingerprintEnrollIntroduction;
 import com.android.settings.core.InstrumentedActivity;
 
+import com.google.android.setupcompat.util.WizardManagerHelper;
+
 /**
  * Trampoline activity launched by the {@code android.settings.BIOMETRIC_ENROLL} action which
  * shows the user an appropriate enrollment flow depending on the device's biometric hardware.
@@ -40,20 +41,38 @@
         super.onCreate(savedInstanceState);
 
         final PackageManager pm = getApplicationContext().getPackageManager();
-        final Intent intent = new Intent();
+        Intent intent;
 
         // This logic may have to be modified on devices with multiple biometrics.
         if (pm.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) {
-            intent.setClassName(SETTINGS_PACKAGE_NAME,
-                    FingerprintEnrollIntroduction.class.getName());
+            intent = getFingerprintEnrollIntent();
         } else if (pm.hasSystemFeature(PackageManager.FEATURE_FACE)) {
-            intent.setClassName(SETTINGS_PACKAGE_NAME, FaceEnrollIntroduction.class.getName());
+            intent = getFaceEnrollIntent();
+        } else {
+            intent = new Intent();
         }
 
+        intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
         startActivity(intent);
         finish();
     }
 
+    private Intent getFingerprintEnrollIntent() {
+        if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
+            Intent intent = new Intent(this, SetupFingerprintEnrollIntroduction.class);
+            WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
+            return intent;
+        } else {
+            return new Intent(this, FingerprintEnrollIntroduction.class);
+        }
+    }
+
+    private Intent getFaceEnrollIntent() {
+        Intent intent = new Intent(this, FaceEnrollIntroduction.class);
+        WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
+        return intent;
+    }
+
     @Override
     public int getMetricsCategory() {
         return SettingsEnums.BIOMETRIC_ENROLL_ACTIVITY;
diff --git a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
index e8cf809..d7f2c97 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollIntroduction.java
@@ -27,8 +27,10 @@
 import com.android.settings.R;
 import com.android.settings.password.ChooseLockGeneric;
 import com.android.settings.password.ChooseLockSettingsHelper;
+import com.android.settings.password.SetupChooseLockGeneric;
 
 import com.google.android.setupcompat.template.FooterButton;
+import com.google.android.setupcompat.util.WizardManagerHelper;
 import com.google.android.setupdesign.span.LinkSpan;
 
 /**
@@ -199,7 +201,13 @@
     }
 
     protected Intent getChooseLockIntent() {
-        return new Intent(this, ChooseLockGeneric.class);
+        if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
+            Intent intent = new Intent(this, SetupChooseLockGeneric.class);
+            WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
+            return intent;
+        } else {
+            return new Intent(this, ChooseLockGeneric.class);
+        }
     }
 
     @Override
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
index e45817d..8d4c82e 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
@@ -36,6 +36,7 @@
 
 import com.google.android.setupcompat.template.FooterBarMixin;
 import com.google.android.setupcompat.template.FooterButton;
+import com.google.android.setupcompat.util.WizardManagerHelper;
 import com.google.android.setupdesign.span.LinkSpan;
 
 public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
@@ -166,6 +167,7 @@
             intent.setClass(this, FaceEnrollEnrolling.class);
         }
         intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, mSwitchDiversity.isChecked());
+        WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
         return intent;
     }
 
diff --git a/src/com/android/settings/biometrics/face/FaceSettings.java b/src/com/android/settings/biometrics/face/FaceSettings.java
index 490580d..ea5a303 100644
--- a/src/com/android/settings/biometrics/face/FaceSettings.java
+++ b/src/com/android/settings/biometrics/face/FaceSettings.java
@@ -156,6 +156,9 @@
 
     @Override
     protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
+        if (!isAvailable(context)) {
+            return null;
+        }
         final List<AbstractPreferenceController> controllers =
                 buildPreferenceControllers(context, getSettingsLifecycle());
         // There's no great way of doing this right now :/
@@ -197,7 +200,11 @@
                 @Override
                 public List<AbstractPreferenceController> createPreferenceControllers(
                         Context context) {
-                    return buildPreferenceControllers(context, null /* lifecycle */);
+                    if (isAvailable(context)) {
+                        return buildPreferenceControllers(context, null /* lifecycle */);
+                    } else {
+                        return null;
+                    }
                 }
 
                 @Override
diff --git a/src/com/android/settings/fuelgauge/BatteryInfo.java b/src/com/android/settings/fuelgauge/BatteryInfo.java
index 1f11f5a..c851a71 100644
--- a/src/com/android/settings/fuelgauge/BatteryInfo.java
+++ b/src/com/android/settings/fuelgauge/BatteryInfo.java
@@ -47,6 +47,7 @@
     public long averageTimeToDischarge = Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN;
     public String batteryPercentString;
     public String statusLabel;
+    public String suggestionLabel;
     private boolean mCharging;
     private BatteryStats mStats;
     private static final String LOG_TAG = "BatteryInfo";
@@ -247,6 +248,7 @@
         final int status = batteryBroadcast.getIntExtra(BatteryManager.EXTRA_STATUS,
                 BatteryManager.BATTERY_STATUS_UNKNOWN);
         info.discharging = false;
+        info.suggestionLabel = null;
         if (chargeTime > 0 && status != BatteryManager.BATTERY_STATUS_FULL) {
             info.remainingTimeUs = chargeTime;
             CharSequence timeString = StringUtil.formatElapsedTime(context,
@@ -282,8 +284,11 @@
                     info.batteryPercentString,
                     estimate.isBasedOnUsage && !shortString
             );
+            info.suggestionLabel = PowerUtil.getBatteryTipStringFormatted(
+                    context, PowerUtil.convertUsToMs(drainTimeUs));
         } else {
             info.remainingLabel = null;
+            info.suggestionLabel = null;
             info.chargeLabel = info.batteryPercentString;
         }
     }
diff --git a/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java
new file mode 100644
index 0000000..b14fec9
--- /dev/null
+++ b/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceController.java
@@ -0,0 +1,41 @@
+package com.android.settings.fuelgauge.batterysaver;
+
+import android.content.Context;
+import android.provider.Settings;
+import androidx.preference.Preference;
+import androidx.preference.SwitchPreference;
+import com.android.settings.core.BasePreferenceController;
+import com.android.settings.core.PreferenceControllerMixin;
+
+public class BatterySaverStickyPreferenceController extends BasePreferenceController implements
+        PreferenceControllerMixin, Preference.OnPreferenceChangeListener {
+
+    public static final String LOW_POWER_STICKY_AUTO_DISABLE_ENABLED =
+            "low_power_sticky_auto_disable_enabled";
+
+    public BatterySaverStickyPreferenceController(Context context, String preferenceKey) {
+        super(context, preferenceKey);
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        int setting = Settings.System.getInt(mContext.getContentResolver(),
+                LOW_POWER_STICKY_AUTO_DISABLE_ENABLED, 1);
+
+        ((SwitchPreference) preference).setChecked(setting == 0);
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        boolean keepActive = (Boolean) newValue;
+        Settings.System.putInt(mContext.getContentResolver(),
+                LOW_POWER_STICKY_AUTO_DISABLE_ENABLED,
+                keepActive ? 0 : 1);
+        return true;
+    }
+
+    @Override
+    public int getAvailabilityStatus() {
+        return AVAILABLE;
+    }
+}
diff --git a/src/com/android/settings/fuelgauge/batterytip/detectors/LowBatteryDetector.java b/src/com/android/settings/fuelgauge/batterytip/detectors/LowBatteryDetector.java
index 21cc28a..ca9141d 100644
--- a/src/com/android/settings/fuelgauge/batterytip/detectors/LowBatteryDetector.java
+++ b/src/com/android/settings/fuelgauge/batterytip/detectors/LowBatteryDetector.java
@@ -62,6 +62,6 @@
         }
 
         return new LowBatteryTip(
-                state, powerSaveModeOn, mBatteryInfo.remainingLabel);
+                state, powerSaveModeOn, mBatteryInfo.suggestionLabel);
     }
 }
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardFeatureProviderImpl.java b/src/com/android/settings/homepage/contextualcards/ContextualCardFeatureProviderImpl.java
index 12590ff..43e90e8 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardFeatureProviderImpl.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardFeatureProviderImpl.java
@@ -165,6 +165,7 @@
                 com.android.settings.intelligence.ContextualCardProto.ContextualCard.newBuilder()
                         .setSliceUri(card.getSliceUri().toString())
                         .setCardName(card.getName())
+                        .setCardScore(card.getRankingScore())
                         .build()));
         return builder.build().toByteArray();
     }
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java b/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java
index ea6ac43..13564b5 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java
@@ -26,7 +26,6 @@
 import android.net.Uri;
 import android.os.Handler;
 import android.os.Looper;
-import android.text.format.DateUtils;
 import android.util.Log;
 
 import androidx.annotation.NonNull;
@@ -50,7 +49,6 @@
     @VisibleForTesting
     static final int DEFAULT_CARD_COUNT = 4;
     static final int CARD_CONTENT_LOADER_ID = 1;
-    static final long CARD_CONTENT_LOADER_TIMEOUT_MS = DateUtils.SECOND_IN_MILLIS;
 
     private static final String TAG = "ContextualCardLoader";
     private static final long ELIGIBILITY_CHECKER_TIMEOUT_MS = 250;
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java b/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
index 3b8aacd..c829015 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardManager.java
@@ -24,6 +24,8 @@
 
 import android.content.Context;
 import android.os.Bundle;
+import android.provider.Settings;
+import android.text.format.DateUtils;
 import android.util.ArrayMap;
 import android.util.Log;
 import android.widget.BaseAdapter;
@@ -62,8 +64,12 @@
 public class ContextualCardManager implements ContextualCardLoader.CardContentLoaderListener,
         ContextualCardUpdateListener, LifecycleObserver, OnSaveInstanceState {
 
-    private static final String KEY_CONTEXTUAL_CARDS = "key_contextual_cards";
+    @VisibleForTesting
+    static final long CARD_CONTENT_LOADER_TIMEOUT_MS = DateUtils.SECOND_IN_MILLIS;
+    @VisibleForTesting
+    static final String KEY_GLOBAL_CARD_LOADER_TIMEOUT = "global_card_loader_timeout_key";
 
+    private static final String KEY_CONTEXTUAL_CARDS = "key_contextual_cards";
     private static final String TAG = "ContextualCardManager";
 
     //The list for Settings Custom Card
@@ -201,7 +207,8 @@
         }
 
         //only log homepage display upon a fresh launch
-        if (loadTime <= ContextualCardLoader.CARD_CONTENT_LOADER_TIMEOUT_MS) {
+        final long timeoutLimit = getCardLoaderTimeout(mContext);
+        if (loadTime <= timeoutLimit) {
             onContextualCardUpdated(cards.stream()
                     .collect(groupingBy(ContextualCard::getCardType)));
         }
@@ -239,6 +246,14 @@
         return getCardsWithSuggestionViewType(result);
     }
 
+    @VisibleForTesting
+    long getCardLoaderTimeout(Context context) {
+        // Return the timeout limit if Settings.Global has the KEY_GLOBAL_CARD_LOADER_TIMEOUT key,
+        // else return default timeout.
+        return Settings.Global.getLong(mContext.getContentResolver(),
+                KEY_GLOBAL_CARD_LOADER_TIMEOUT, CARD_CONTENT_LOADER_TIMEOUT_MS);
+    }
+
     private List<ContextualCard> getCardsWithSuggestionViewType(List<ContextualCard> cards) {
         // Shows as half cards if 2 suggestion type of cards are next to each other.
         // Shows as full card if 1 suggestion type of card lives alone.
diff --git a/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java b/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java
index 95412a8..3320be0 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSlice.java
@@ -179,14 +179,9 @@
         final Collection<CachedBluetoothDevice> cachedDevices =
                 bluetoothManager.getCachedDeviceManager().getCachedDevicesCopy();
 
-        /**
-         * TODO(b/114807655): Contextual Home Page - Connected Device
-         * It's under discussion for including available media devices and currently connected
-         * devices from Bluetooth. Will update the devices list or remove TODO later.
-         */
-        // Get available media device list and sort them.
+        // Get all connected devices and sort them.
         return cachedDevices.stream()
-                .filter(device -> device.isConnected() && device.isConnectedA2dpDevice())
+                .filter(device -> device.getDevice().isConnected())
                 .sorted(COMPARATOR).collect(Collectors.toList());
     }
 
@@ -217,7 +212,7 @@
             return Utils.createIconWithDrawable(pair.first);
         } else {
             return IconCompat.createWithResource(mContext,
-                com.android.internal.R.drawable.ic_settings_bluetooth);
+                    com.android.internal.R.drawable.ic_settings_bluetooth);
         }
     }
 
@@ -226,18 +221,29 @@
         final List<ListBuilder.RowBuilder> bluetoothRows = new ArrayList<>();
         final List<CachedBluetoothDevice> bluetoothDevices = getConnectedBluetoothDevices();
         for (CachedBluetoothDevice bluetoothDevice : bluetoothDevices) {
-            bluetoothRows.add(new ListBuilder.RowBuilder()
+            final ListBuilder.RowBuilder rowBuilder = new ListBuilder.RowBuilder()
                     .setTitleItem(getBluetoothDeviceIcon(bluetoothDevice), ListBuilder.ICON_IMAGE)
                     .setTitle(bluetoothDevice.getName())
-                    .setSubtitle(bluetoothDevice.getConnectionSummary())
-                    .setPrimaryAction(buildBluetoothDeviceAction(bluetoothDevice))
-                    .addEndItem(buildBluetoothDetailDeepLinkAction(bluetoothDevice)));
+                    .setSubtitle(bluetoothDevice.getConnectionSummary());
+
+            if (bluetoothDevice.isConnectedA2dpDevice()) {
+                // For available media devices, the primary action is to active audio stream and
+                // add setting icon to the end to link detail page.
+                rowBuilder.setPrimaryAction(buildMediaBluetoothAction(bluetoothDevice));
+                rowBuilder.addEndItem(buildBluetoothDetailDeepLinkAction(bluetoothDevice));
+            } else {
+                // For other devices, the primary action is to link detail page.
+                rowBuilder.setPrimaryAction(buildBluetoothDetailDeepLinkAction(bluetoothDevice));
+            }
+
+            bluetoothRows.add(rowBuilder);
         }
 
         return bluetoothRows;
     }
 
-    private SliceAction buildBluetoothDeviceAction(CachedBluetoothDevice bluetoothDevice) {
+    @VisibleForTesting
+    SliceAction buildMediaBluetoothAction(CachedBluetoothDevice bluetoothDevice) {
         // Send broadcast to activate available media device.
         final Intent intent = new Intent(getUri().toString())
                 .setClass(mContext, SliceBroadcastReceiver.class)
@@ -250,7 +256,8 @@
                 bluetoothDevice.getName());
     }
 
-    private SliceAction buildBluetoothDetailDeepLinkAction(CachedBluetoothDevice bluetoothDevice) {
+    @VisibleForTesting
+    SliceAction buildBluetoothDetailDeepLinkAction(CachedBluetoothDevice bluetoothDevice) {
         return SliceAction.createDeeplink(
                 getBluetoothDetailIntent(bluetoothDevice),
                 IconCompat.createWithResource(mContext, R.drawable.ic_settings_24dp),
diff --git a/src/com/android/settings/homepage/contextualcards/slices/SliceFullCardRendererHelper.java b/src/com/android/settings/homepage/contextualcards/slices/SliceFullCardRendererHelper.java
index ef0a67d..ee63536 100644
--- a/src/com/android/settings/homepage/contextualcards/slices/SliceFullCardRendererHelper.java
+++ b/src/com/android/settings/homepage/contextualcards/slices/SliceFullCardRendererHelper.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.homepage.contextualcards.slices;
 
+import android.animation.LayoutTransition;
 import android.content.Context;
 import android.view.View;
 
@@ -94,6 +95,7 @@
         public SliceViewHolder(View view) {
             super(view);
             sliceView = view.findViewById(R.id.slice_view);
+            sliceView.getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
         }
     }
 }
diff --git a/src/com/android/settings/network/telephony/MobileDataSlice.java b/src/com/android/settings/network/telephony/MobileDataSlice.java
index 6efd8c3..5a5d6a2 100644
--- a/src/com/android/settings/network/telephony/MobileDataSlice.java
+++ b/src/com/android/settings/network/telephony/MobileDataSlice.java
@@ -74,8 +74,27 @@
         final IconCompat icon = IconCompat.createWithResource(mContext,
                 R.drawable.ic_network_cell);
         final String title = mContext.getText(R.string.mobile_data_settings_title).toString();
-        final CharSequence summary = getSummary();
         @ColorInt final int color = Utils.getColorAccentDefaultColor(mContext);
+
+        // Return a Slice without the mobile data toggle when airplane mode is on.
+        if (isAirplaneModeEnabled()) {
+            final CharSequence summary = mContext.getText(R.string.mobile_data_ap_mode_disabled);
+            // Intent does nothing, but we have to pass an intent to the Row.
+            final PendingIntent intent = PendingIntent.getActivity(mContext, 0 /* requestCode */,
+                    new Intent(), 0 /* flags */);
+            final SliceAction deadAction =
+                    SliceAction.create(intent, icon, ListBuilder.ICON_IMAGE, title);
+            final ListBuilder listBuilder = new ListBuilder(mContext, getUri(),
+                    ListBuilder.INFINITY)
+                    .setAccentColor(color)
+                    .addRow(new ListBuilder.RowBuilder()
+                            .setTitle(title)
+                            .setSubtitle(summary)
+                            .setPrimaryAction(deadAction));
+            return listBuilder.build();
+        }
+
+        final CharSequence summary = getSummary();
         final PendingIntent toggleAction = getBroadcastIntent(mContext);
         final PendingIntent primaryAction = getPrimaryAction();
         final SliceAction primarySliceAction = SliceAction.createDeeplink(primaryAction, icon,
@@ -101,11 +120,6 @@
 
     @Override
     public void onNotifyChange(Intent intent) {
-        // Don't make a change if we are in Airplane Mode.
-        if (isAirplaneModeEnabled()) {
-            return;
-        }
-
         final boolean newState = intent.getBooleanExtra(EXTRA_TOGGLE_STATE,
                     isMobileDataEnabled());
 
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index 5553dd7..9f5ece2 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.notification;
 
+import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+
 import android.app.NotificationChannel;
 import android.app.NotificationChannelGroup;
 import android.app.settings.SettingsEnums;
@@ -24,6 +26,8 @@
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.util.Log;
+import android.view.Window;
+import android.view.WindowManager;
 
 import androidx.preference.Preference;
 import androidx.preference.PreferenceCategory;
@@ -33,7 +37,6 @@
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.R;
-import com.android.settings.widget.MasterCheckBoxPreference;
 import com.android.settingslib.RestrictedSwitchPreference;
 import com.android.settingslib.core.AbstractPreferenceController;
 
@@ -85,6 +88,8 @@
     public void onResume() {
         super.onResume();
 
+        getActivity().getWindow().addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+
         if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null) {
             Log.w(TAG, "Missing package or uid or packageinfo");
             finish();
@@ -119,6 +124,15 @@
     }
 
     @Override
+    public void onPause() {
+        super.onPause();
+        final Window window = getActivity().getWindow();
+        final WindowManager.LayoutParams attrs = window.getAttributes();
+        attrs.privateFlags &= ~SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+        window.setAttributes(attrs);
+    }
+
+    @Override
     protected String getLogTag() {
         return TAG;
     }
diff --git a/src/com/android/settings/panel/NfcPanel.java b/src/com/android/settings/panel/NfcPanel.java
index 8fa41d9..6a9c74d 100644
--- a/src/com/android/settings/panel/NfcPanel.java
+++ b/src/com/android/settings/panel/NfcPanel.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2019 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.panel;
 
 import android.app.settings.SettingsEnums;
diff --git a/src/com/android/settings/panel/PanelFeatureProviderImpl.java b/src/com/android/settings/panel/PanelFeatureProviderImpl.java
index 6b096a1..67c300f 100644
--- a/src/com/android/settings/panel/PanelFeatureProviderImpl.java
+++ b/src/com/android/settings/panel/PanelFeatureProviderImpl.java
@@ -28,12 +28,14 @@
         switch (panelType) {
             case Settings.Panel.ACTION_INTERNET_CONNECTIVITY:
                 return InternetConnectivityPanel.create(context);
-            case Settings.Panel.ACTION_VOLUME:
-                return VolumePanel.create(context);
-            case Settings.Panel.ACTION_NFC:
-                return NfcPanel.create(context);
             case ACTION_MEDIA_OUTPUT:
                 return MediaOutputPanel.create(context, mediaPackageName);
+            case Settings.Panel.ACTION_NFC:
+                return NfcPanel.create(context);
+            case Settings.Panel.ACTION_WIFI:
+                return WifiPanel.create(context);
+            case Settings.Panel.ACTION_VOLUME:
+                return VolumePanel.create(context);
         }
 
         throw new IllegalStateException("No matching panel for: "  + panelType);
diff --git a/src/com/android/settings/panel/WifiPanel.java b/src/com/android/settings/panel/WifiPanel.java
new file mode 100644
index 0000000..6d83742
--- /dev/null
+++ b/src/com/android/settings/panel/WifiPanel.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2019 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.panel;
+
+import android.app.settings.SettingsEnums;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+
+import com.android.settings.R;
+import com.android.settings.SubSettings;
+import com.android.settings.network.NetworkDashboardFragment;
+import com.android.settings.slices.CustomSliceRegistry;
+import com.android.settings.slices.SliceBuilderUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Panel data class for Wifi settings.
+ */
+public class WifiPanel implements PanelContent {
+
+    private final Context mContext;
+
+    public static WifiPanel create(Context context) {
+        return new WifiPanel(context);
+    }
+
+    private WifiPanel(Context context) {
+        mContext = context.getApplicationContext();
+    }
+
+    @Override
+    public CharSequence getTitle() {
+        return mContext.getText(R.string.wifi_settings);
+    }
+
+    @Override
+    public List<Uri> getSlices() {
+        final List<Uri> uris = new ArrayList<>();
+        uris.add(CustomSliceRegistry.WIFI_SLICE_URI);
+        return uris;
+    }
+
+    @Override
+    public Intent getSeeMoreIntent() {
+        final String screenTitle =
+                mContext.getText(R.string.network_dashboard_title).toString();
+        final Intent intent = SliceBuilderUtils.buildSearchResultPageIntent(mContext,
+                NetworkDashboardFragment.class.getName(),
+                null /* key */,
+                screenTitle,
+                SettingsEnums.SETTINGS_NETWORK_CATEGORY);
+        intent.setClassName(mContext.getPackageName(), SubSettings.class.getName());
+        return intent;
+    }
+
+    @Override
+    public int getMetricsCategory() {
+        return SettingsEnums.PANEL_WIFI;
+    }
+}
diff --git a/src/com/android/settings/wifi/slice/WifiSlice.java b/src/com/android/settings/wifi/slice/WifiSlice.java
index 8d20f7f..a2debb8 100644
--- a/src/com/android/settings/wifi/slice/WifiSlice.java
+++ b/src/com/android/settings/wifi/slice/WifiSlice.java
@@ -198,7 +198,7 @@
 
     private IconCompat getEndIcon(AccessPoint accessPoint) {
         if (accessPoint.isActive()) {
-            return IconCompat.createWithResource(mContext, R.drawable.ic_settings_accent);
+            return null;
         } else if (accessPoint.getSecurity() != AccessPoint.SECURITY_NONE) {
             return IconCompat.createWithResource(mContext, R.drawable.ic_friction_lock_closed);
         } else if (accessPoint.isMetered()) {
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryInfoTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryInfoTest.java
index 0103031..d5e0ed8 100644
--- a/tests/robotests/src/com/android/settings/fuelgauge/BatteryInfoTest.java
+++ b/tests/robotests/src/com/android/settings/fuelgauge/BatteryInfoTest.java
@@ -65,7 +65,9 @@
     private static final String STATUS_NOT_CHARGING = "Not charging";
     private static final long REMAINING_TIME_NULL = -1;
     private static final long REMAINING_TIME = 2;
+    // Strings are defined in frameworks/base/packages/SettingsLib/res/values/strings.xml
     private static final String ENHANCED_STRING_SUFFIX = "based on your usage";
+    private static final String EXTEND_PREFIX = "Extend battery life past";
     private static final long TEST_CHARGE_TIME_REMAINING = TimeUnit.MINUTES.toMicros(1);
     private static final String TEST_CHARGE_TIME_REMAINING_STRINGIFIED =
             "1 min left until fully charged";
@@ -148,8 +150,10 @@
 
         // We only add special mention for the long string
         assertThat(info.remainingLabel.toString()).contains(ENHANCED_STRING_SUFFIX);
+        assertThat(info.suggestionLabel).contains(EXTEND_PREFIX);
         // shortened string should not have extra text
         assertThat(info2.remainingLabel.toString()).doesNotContain(ENHANCED_STRING_SUFFIX);
+        assertThat(info2.suggestionLabel).contains(EXTEND_PREFIX);
     }
 
     @Test
@@ -169,6 +173,19 @@
                 mContext.getString(R.string.power_remaining_duration_only_shutdown_imminent));
         assertThat(info2.remainingLabel.toString()).isEqualTo(
                 mContext.getString(R.string.power_remaining_duration_only_shutdown_imminent));
+        assertThat(info2.suggestionLabel).contains(EXTEND_PREFIX);
+    }
+
+    @Test
+    public void getBatteryInfo_MoreThanOneDay_suggestionLabelIsCorrectString() {
+        Estimate estimate = new Estimate(Duration.ofDays(3).toMillis(),
+                true /* isBasedOnUsage */,
+                1000 /* averageDischargeTime */);
+        BatteryInfo info = BatteryInfo.getBatteryInfo(mContext, mDisChargingBatteryBroadcast,
+                mBatteryStats, estimate, SystemClock.elapsedRealtime() * 1000,
+                false /* shortString */);
+
+        assertThat(info.suggestionLabel).doesNotContain(EXTEND_PREFIX);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceControllerTest.java
new file mode 100644
index 0000000..a441864
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/fuelgauge/batterysaver/BatterySaverStickyPreferenceControllerTest.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2016 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.fuelgauge.batterysaver;
+
+import static com.android.settings.fuelgauge.batterysaver.BatterySaverStickyPreferenceController.LOW_POWER_STICKY_AUTO_DISABLE_ENABLED;
+import static com.google.common.truth.Truth.assertThat;
+
+import android.content.Context;
+import android.provider.Settings;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+@RunWith(RobolectricTestRunner.class)
+public class BatterySaverStickyPreferenceControllerTest {
+
+    private static final String PREF_KEY = "battery_saver_sticky";
+
+    private Context mContext;
+    private BatterySaverStickyPreferenceController mController;
+
+    @Before
+    public void setup() {
+        mContext = RuntimeEnvironment.application;
+        mController = new BatterySaverStickyPreferenceController(mContext, PREF_KEY);
+    }
+
+    private int getAutoDisableSetting() {
+        return Settings.System.getInt(mContext.getContentResolver(),
+                LOW_POWER_STICKY_AUTO_DISABLE_ENABLED,
+                1);
+    }
+
+    @Test
+    public void testOnPreferenceChange_turnOnKeepActive_autoDisableOff() {
+        mController.onPreferenceChange(null, true);
+        final int isOn = getAutoDisableSetting();
+        assertThat(isOn).isEqualTo(0);
+    }
+
+    @Test
+    public void testOnPreferenceChange_TurnOffKeepActive_autoDisableOff() {
+        mController.onPreferenceChange(null, false);
+        final int isOn = getAutoDisableSetting();
+        assertThat(isOn).isEqualTo(1);
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
index 1a0539c..eb9a461 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardManagerTest.java
@@ -31,6 +31,7 @@
 
 import android.content.Context;
 import android.net.Uri;
+import android.provider.Settings;
 import android.util.ArrayMap;
 
 import com.android.settings.homepage.contextualcards.conditional.ConditionFooterContextualCard;
@@ -126,6 +127,24 @@
     }
 
     @Test
+    public void getCardLoaderTimeout_noConfiguredTimeout_shouldReturnDefaultTimeout() {
+        final long timeout = mManager.getCardLoaderTimeout(mContext);
+
+        assertThat(timeout).isEqualTo(ContextualCardManager.CARD_CONTENT_LOADER_TIMEOUT_MS);
+    }
+
+    @Test
+    public void getCardLoaderTimeout_hasConfiguredTimeout_shouldReturnConfiguredTimeout() {
+        final long configuredTimeout = 5000L;
+        Settings.Global.putLong(mContext.getContentResolver(),
+                ContextualCardManager.KEY_GLOBAL_CARD_LOADER_TIMEOUT, configuredTimeout);
+
+        final long timeout = mManager.getCardLoaderTimeout(mContext);
+
+        assertThat(timeout).isEqualTo(configuredTimeout);
+    }
+
+    @Test
     public void onFinishCardLoading_fastLoad_shouldCallOnContextualCardUpdated() {
         mManager.mStartTime = System.currentTimeMillis();
         final ContextualCardManager manager = spy(mManager);
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSliceTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSliceTest.java
index 77fc5d9..4a23c33 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSliceTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/BluetoothDevicesSliceTest.java
@@ -23,6 +23,7 @@
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -83,7 +84,7 @@
 
         // Mock the icon and detail intent of Bluetooth.
         mIcon = IconCompat.createWithResource(mContext,
-            com.android.internal.R.drawable.ic_settings_bluetooth);
+                com.android.internal.R.drawable.ic_settings_bluetooth);
         mDetailIntent = PendingIntent.getActivity(mContext, 0, new Intent("test action"), 0);
         doReturn(mIcon).when(mBluetoothDevicesSlice).getBluetoothDeviceIcon(any());
         doReturn(mDetailIntent).when(mBluetoothDevicesSlice).getBluetoothDetailIntent(any());
@@ -122,6 +123,27 @@
     }
 
     @Test
+    public void getSlice_hasMediaBluetoothDevice_shouldBuildMediaBluetoothAction() {
+        mockBluetoothDeviceList(1 /* deviceCount */);
+        doReturn(true).when(mBluetoothDeviceList.get(0)).isConnectedA2dpDevice();
+        doReturn(mBluetoothDeviceList).when(mBluetoothDevicesSlice).getConnectedBluetoothDevices();
+
+        mBluetoothDevicesSlice.getSlice();
+
+        verify(mBluetoothDevicesSlice).buildMediaBluetoothAction(any());
+    }
+
+    @Test
+    public void getSlice_noMediaBluetoothDevice_shouldNotBuildMediaBluetoothAction() {
+        mockBluetoothDeviceList(1 /* deviceCount */);
+        doReturn(mBluetoothDeviceList).when(mBluetoothDevicesSlice).getConnectedBluetoothDevices();
+
+        mBluetoothDevicesSlice.getSlice();
+
+        verify(mBluetoothDevicesSlice, never()).buildMediaBluetoothAction(any());
+    }
+
+    @Test
     public void getSlice_noBluetoothDevices_shouldHaveNoBluetoothDevicesTitle() {
         doReturn(mBluetoothDeviceList).when(mBluetoothDevicesSlice).getConnectedBluetoothDevices();
 
@@ -175,7 +197,6 @@
         doReturn(BLUETOOTH_MOCK_TITLE).when(mCachedBluetoothDevice).getName();
         doReturn(BLUETOOTH_MOCK_SUMMARY).when(mCachedBluetoothDevice).getConnectionSummary();
         doReturn(BLUETOOTH_MOCK_ADDRESS).when(mCachedBluetoothDevice).getAddress();
-        doReturn(true).when(mCachedBluetoothDevice).isConnectedA2dpDevice();
         for (int i = 0; i < deviceCount; i++) {
             mBluetoothDeviceList.add(mCachedBluetoothDevice);
         }
diff --git a/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java b/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java
index c497cf8..31daa37 100644
--- a/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java
+++ b/tests/robotests/src/com/android/settings/network/telephony/MobileDataSliceTest.java
@@ -24,6 +24,7 @@
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
+import android.app.PendingIntent;
 import android.content.Context;
 import android.content.Intent;
 import android.provider.Settings;
@@ -162,4 +163,27 @@
 
         assertThat(isMobileDataEnabled).isEqualTo(seed);
     }
+
+    @Test
+    public void airplaneModeEnabled_slicePrimaryActionIsEmpty() {
+        doReturn(true).when(mMobileDataSlice).isAirplaneModeEnabled();
+        doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID);
+        final Slice mobileData = mMobileDataSlice.getSlice();
+
+        final SliceMetadata metadata = SliceMetadata.from(mContext, mobileData);
+        assertThat(metadata.getTitle())
+                .isEqualTo(mContext.getString(R.string.mobile_data_settings_title));
+
+        assertThat(metadata.getSubtitle())
+                .isEqualTo(mContext.getString(R.string.mobile_data_ap_mode_disabled));
+
+        final List<SliceAction> toggles = metadata.getToggles();
+        assertThat(toggles).hasSize(0);
+
+        final SliceAction primaryAction = metadata.getPrimaryAction();
+        final PendingIntent pendingIntent = primaryAction.getAction();
+        final Intent actionIntent = pendingIntent.getIntent();
+
+        assertThat(actionIntent.getAction()).isNull();
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/notification/AppNotificationSettingsTest.java b/tests/robotests/src/com/android/settings/notification/AppNotificationSettingsTest.java
new file mode 100644
index 0000000..9555a56
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/notification/AppNotificationSettingsTest.java
@@ -0,0 +1,93 @@
+package com.android.settings.notification;
+
+import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
+
+import static org.junit.Assert.assertEquals;
+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.view.Window;
+import android.view.WindowManager;
+
+import androidx.fragment.app.FragmentActivity;
+import androidx.fragment.app.FragmentManager;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.Robolectric;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.annotation.Config;
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+@RunWith(RobolectricTestRunner.class)
+public class AppNotificationSettingsTest {
+
+    private WindowManager.LayoutParams mLayoutParams;
+    private AppNotificationSettings mFragment;
+    private FragmentActivity mActivity;
+    @Mock
+    private Window mWindow;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mLayoutParams = new WindowManager.LayoutParams();
+        mActivity = spy(Robolectric.setupActivity(FragmentActivity.class));
+        mFragment = spy(new AppNotificationSettings());
+        when(mFragment.getActivity()).thenReturn(mActivity);
+        when(mFragment.getFragmentManager()).thenReturn(mock(FragmentManager.class));
+        when(mActivity.getWindow()).thenReturn(mWindow);
+        when(mWindow.getAttributes()).thenReturn(mLayoutParams);
+    }
+
+    @Test
+    @Config(shadows = {ShadowNotificationSettingsBase.class})
+    public void onResume_shouldHideSystemOverlay() {
+        mFragment.onResume();
+
+        verify(mWindow).addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+    }
+
+    @Test
+    @Config(shadows = {ShadowNotificationSettingsBase.class})
+    public void onPause_shouldRemoveHideSystemOverlay() {
+        mFragment.onResume();
+
+        verify(mWindow).addSystemFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+
+        mFragment.onPause();
+
+        // There's no Window.clearPrivateFlags() method, so the Window.attributes are updated.
+        ArgumentCaptor<WindowManager.LayoutParams> paramCaptor = ArgumentCaptor.forClass(
+                WindowManager.LayoutParams.class);
+        verify(mWindow).setAttributes(paramCaptor.capture());
+        assertEquals(0,
+                paramCaptor.getValue().privateFlags
+                        & SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+    }
+
+    @Implements(NotificationSettingsBase.class)
+    public static class ShadowNotificationSettingsBase {
+
+        protected void __constructor__() {
+            // Do nothing
+        }
+
+        @Implementation
+        protected void onResume() {
+            // No-op.
+        }
+
+        @Implementation
+        protected void onPause() {
+            // No-op.
+        }
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/panel/NfcPanelTest.java b/tests/robotests/src/com/android/settings/panel/NfcPanelTest.java
index bf6662d..1de2c5a 100644
--- a/tests/robotests/src/com/android/settings/panel/NfcPanelTest.java
+++ b/tests/robotests/src/com/android/settings/panel/NfcPanelTest.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2019 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.panel;
 
 import static com.google.common.truth.Truth.assertThat;
diff --git a/tests/robotests/src/com/android/settings/panel/WifiPanelTest.java b/tests/robotests/src/com/android/settings/panel/WifiPanelTest.java
new file mode 100644
index 0000000..08db23e
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/panel/WifiPanelTest.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2019 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.panel;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.net.Uri;
+
+import com.android.settings.slices.CustomSliceRegistry;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+import java.util.List;
+
+@RunWith(RobolectricTestRunner.class)
+public class WifiPanelTest {
+
+    private WifiPanel mPanel;
+
+    @Before
+    public void setUp() {
+        mPanel = WifiPanel.create(RuntimeEnvironment.application);
+    }
+
+    @Test
+    public void getSlices_containsNecessarySlices() {
+        final List<Uri> uris = mPanel.getSlices();
+
+        assertThat(uris).containsExactly(
+                CustomSliceRegistry.WIFI_SLICE_URI);
+    }
+
+    @Test
+    public void getSeeMoreIntent_notNull() {
+        assertThat(mPanel.getSeeMoreIntent()).isNotNull();
+    }
+}
