summaryrefslogtreecommitdiffstats
path: root/services/java/com
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2013-10-04 00:52:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-04 00:52:59 +0000
commita48ccdd6fb671435ed2583830b2828450bfc3cde (patch)
tree9c8a0ada02d9ee50970df3e71dd1209aa59f3159 /services/java/com
parent5eb2b0ca76560cb8d707295aec42cb72f379eafe (diff)
parent3ec8e7fb79f2e662c2b06cfec118a0eeaefd9370 (diff)
downloadframeworks_base-a48ccdd6fb671435ed2583830b2828450bfc3cde.zip
frameworks_base-a48ccdd6fb671435ed2583830b2828450bfc3cde.tar.gz
frameworks_base-a48ccdd6fb671435ed2583830b2828450bfc3cde.tar.bz2
Merge "Use networkType to display wifi and mobile notification separately." into klp-dev
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/ConnectivityService.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 3f13f3a..f005f5f 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -3987,8 +3987,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return timeOutMs;
}
- // Start off with notification off
- setProvNotificationVisible(false, ConnectivityManager.TYPE_NONE, null, null);
+ // Start off with mobile notification off
+ setProvNotificationVisible(false, ConnectivityManager.TYPE_MOBILE_HIPRI, null, null);
CheckMp checkMp = new CheckMp(mContext, this);
CheckMp.CallBack cb = new CheckMp.CallBack() {
@@ -4013,7 +4013,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
if (TextUtils.isEmpty(url) == false) {
if (DBG) log("CheckMp.onComplete: warm (redirected), url=" + url);
- setProvNotificationVisible(true, ni.getType(), ni.getExtraInfo(),
+ setProvNotificationVisible(true,
+ ConnectivityManager.TYPE_MOBILE_HIPRI, ni.getExtraInfo(),
url);
} else {
if (DBG) log("CheckMp.onComplete: warm (redirected), no url");
@@ -4024,7 +4025,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
String url = getMobileProvisioningUrl();
if (TextUtils.isEmpty(url) == false) {
if (DBG) log("CheckMp.onComplete: warm (no dns/tcp), url=" + url);
- setProvNotificationVisible(true, ni.getType(), ni.getExtraInfo(),
+ setProvNotificationVisible(true,
+ ConnectivityManager.TYPE_MOBILE_HIPRI, ni.getExtraInfo(),
url);
} else {
if (DBG) log("CheckMp.onComplete: warm (no dns/tcp), no url");
@@ -4426,7 +4428,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
private void handleMobileProvisioningAction(String url) {
// Notication mark notification as not visible
- setProvNotificationVisible(false, ConnectivityManager.TYPE_NONE, null, null);
+ setProvNotificationVisible(false, ConnectivityManager.TYPE_MOBILE_HIPRI, null, null);
// If provisioning network handle as a special case,
// otherwise launch browser with the intent directly.
@@ -4512,14 +4514,14 @@ public class ConnectivityService extends IConnectivityManager.Stub {
notification.setLatestEventInfo(mContext, title, details, notification.contentIntent);
try {
- notificationManager.notify(NOTIFICATION_ID, 1, notification);
+ notificationManager.notify(NOTIFICATION_ID, networkType, notification);
} catch (NullPointerException npe) {
loge("setNotificaitionVisible: visible notificationManager npe=" + npe);
npe.printStackTrace();
}
} else {
try {
- notificationManager.cancel(NOTIFICATION_ID, 1);
+ notificationManager.cancel(NOTIFICATION_ID, networkType);
} catch (NullPointerException npe) {
loge("setNotificaitionVisible: cancel notificationManager npe=" + npe);
npe.printStackTrace();