summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2017-07-26 21:36:27 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-07-26 21:36:27 +0000
commite15765c974de614090f13e5dc39a5899c8e9cb96 (patch)
tree3716ef9c8a5ead8f9bd107ad6a0713c258e22bfe /service
parent0f2d9e8da0a64cb397aaac94cf1f66b077761ea6 (diff)
parenteed767c1935faf0747e7c6a82074532442c9949c (diff)
Merge "Update landing activity for wrong password notification" into oc-dr1-dev
am: eed767c193 Change-Id: I3d549fc0ea01a1275ef85ed0a4a049a5d96c705c
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WrongPasswordNotifier.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/WrongPasswordNotifier.java b/service/java/com/android/server/wifi/WrongPasswordNotifier.java
index 5447322d3..37e23da64 100644
--- a/service/java/com/android/server/wifi/WrongPasswordNotifier.java
+++ b/service/java/com/android/server/wifi/WrongPasswordNotifier.java
@@ -21,11 +21,12 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
-import android.net.wifi.WifiManager;
+import android.provider.Settings;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.internal.notification.SystemNotificationChannels;
+import com.android.server.wifi.util.NativeUtil;
/**
* Responsible for notifying user for wrong password errors.
@@ -78,6 +79,8 @@ public class WrongPasswordNotifier {
* @param ssid SSID of the Wi-FI network
*/
private void showNotification(String ssid) {
+ Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS);
+ intent.putExtra("wifi_start_connect_ssid", NativeUtil.removeEnclosingQuotes(ssid));
Notification.Builder builder = mFrameworkFacade.makeNotificationBuilder(mContext,
SystemNotificationChannels.NETWORK_ALERTS)
.setAutoCancel(true)
@@ -87,10 +90,8 @@ public class WrongPasswordNotifier {
.setContentTitle(mContext.getString(
com.android.internal.R.string.wifi_available_title_failed_to_connect))
.setContentText(ssid)
- // TODO(zqiu): update to point to the new activity when it is ready.
.setContentIntent(mFrameworkFacade.getActivity(
- mContext, 0, new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK),
- PendingIntent.FLAG_UPDATE_CURRENT))
+ mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT))
.setColor(mContext.getResources().getColor(
com.android.internal.R.color.system_notification_accent_color));
mNotificationManager.notify(NOTIFICATION_ID, builder.build());