summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-02 16:58:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-02 16:58:15 -0700
commit75c480091552b05db6c447330f36ca436a4d0fb6 (patch)
treecc6e355e01be55b5a0a0402c71d6605ce9d0ea7d /core/java
parentbcbe9cf475835102ae2490dc9f067a3ac78a9551 (diff)
parentebb8f413e63dee6d96904a49a3508b97671e5fe8 (diff)
downloadframeworks_base-75c480091552b05db6c447330f36ca436a4d0fb6.zip
frameworks_base-75c480091552b05db6c447330f36ca436a4d0fb6.tar.gz
frameworks_base-75c480091552b05db6c447330f36ca436a4d0fb6.tar.bz2
Merge "Add icon for mobile notification" into jb-mr1-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/CaptivePortalTracker.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/net/CaptivePortalTracker.java b/core/java/android/net/CaptivePortalTracker.java
index 19ed658..ce71e6b 100644
--- a/core/java/android/net/CaptivePortalTracker.java
+++ b/core/java/android/net/CaptivePortalTracker.java
@@ -330,28 +330,32 @@ public class CaptivePortalTracker extends StateMachine {
if (visible) {
CharSequence title;
CharSequence details;
+ int icon;
switch (mNetworkInfo.getType()) {
case ConnectivityManager.TYPE_WIFI:
title = r.getString(R.string.wifi_available_sign_in, 0);
details = r.getString(R.string.network_available_sign_in_detailed,
mNetworkInfo.getExtraInfo());
+ icon = R.drawable.stat_notify_wifi_in_range;
break;
case ConnectivityManager.TYPE_MOBILE:
title = r.getString(R.string.network_available_sign_in, 0);
// TODO: Change this to pull from NetworkInfo once a printable
// name has been added to it
details = mTelephonyManager.getNetworkOperatorName();
+ icon = R.drawable.stat_notify_rssi_in_range;
break;
default:
title = r.getString(R.string.network_available_sign_in, 0);
details = r.getString(R.string.network_available_sign_in_detailed,
mNetworkInfo.getExtraInfo());
+ icon = R.drawable.stat_notify_rssi_in_range;
break;
}
Notification notification = new Notification();
notification.when = 0;
- notification.icon = com.android.internal.R.drawable.stat_notify_wifi_in_range;
+ notification.icon = icon;
notification.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mUrl));
intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |