Merge "Fix wifi launch intent" into pi-dev am: 7f50a0c837

am: 23ba6152aa

Change-Id: Ic1a1156ba8f05ca8ffeb19cae05c871b45d9c293
This commit is contained in:
Jason Monk
2018-04-19 06:34:46 -07:00
committed by android-build-merger

View File

@@ -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;
}