From 28af23680e52007b0140c518cfd1054ec07a1c9f Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Wed, 18 Apr 2018 10:54:35 -0400 Subject: [PATCH] Fix wifi launch intent Test: manual Bug: 76162313 Change-Id: Ie4d4235026ed72afc68f0e513ec34c8f188badb9 --- src/com/android/settings/slices/SettingsSliceProvider.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/slices/SettingsSliceProvider.java b/src/com/android/settings/slices/SettingsSliceProvider.java index ab2cb8213ea..70e9d763f64 100644 --- a/src/com/android/settings/slices/SettingsSliceProvider.java +++ b/src/com/android/settings/slices/SettingsSliceProvider.java @@ -24,6 +24,7 @@ import android.content.Intent; import android.graphics.drawable.Icon; import android.net.Uri; import android.net.wifi.WifiManager; +import android.provider.Settings; import android.provider.SettingsSlicesContract; import android.support.annotation.VisibleForTesting; import android.support.v4.graphics.drawable.IconCompat; @@ -290,13 +291,14 @@ public class SettingsSliceProvider extends SliceProvider { .addEndItem(new SliceAction(getBroadcastIntent(ACTION_WIFI_CHANGED), null, finalWifiEnabled)) .setPrimaryAction( - new SliceAction(getIntent(Intent.ACTION_MAIN), + new SliceAction(getIntent(Settings.ACTION_WIFI_SETTINGS), (IconCompat) null, null))) .build(); } private PendingIntent getIntent(String action) { Intent intent = new Intent(action); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pi = PendingIntent.getActivity(getContext(), 0, intent, 0); return pi; }