Skip to content

Commit 75c4800

Browse files
isheriffAndroid (Google) Code Review
authored andcommitted
Merge "Add icon for mobile notification" into jb-mr1-dev
2 parents bcbe9cf + ebb8f41 commit 75c4800

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

core/java/android/net/CaptivePortalTracker.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,28 +330,32 @@ private void setNotificationVisible(boolean visible) {
330330
if (visible) {
331331
CharSequence title;
332332
CharSequence details;
333+
int icon;
333334
switch (mNetworkInfo.getType()) {
334335
case ConnectivityManager.TYPE_WIFI:
335336
title = r.getString(R.string.wifi_available_sign_in, 0);
336337
details = r.getString(R.string.network_available_sign_in_detailed,
337338
mNetworkInfo.getExtraInfo());
339+
icon = R.drawable.stat_notify_wifi_in_range;
338340
break;
339341
case ConnectivityManager.TYPE_MOBILE:
340342
title = r.getString(R.string.network_available_sign_in, 0);
341343
// TODO: Change this to pull from NetworkInfo once a printable
342344
// name has been added to it
343345
details = mTelephonyManager.getNetworkOperatorName();
346+
icon = R.drawable.stat_notify_rssi_in_range;
344347
break;
345348
default:
346349
title = r.getString(R.string.network_available_sign_in, 0);
347350
details = r.getString(R.string.network_available_sign_in_detailed,
348351
mNetworkInfo.getExtraInfo());
352+
icon = R.drawable.stat_notify_rssi_in_range;
349353
break;
350354
}
351355

352356
Notification notification = new Notification();
353357
notification.when = 0;
354-
notification.icon = com.android.internal.R.drawable.stat_notify_wifi_in_range;
358+
notification.icon = icon;
355359
notification.flags = Notification.FLAG_AUTO_CANCEL;
356360
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mUrl));
357361
intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
1.13 KB
Loading
855 Bytes
Loading
1.46 KB
Loading

core/res/res/values/symbols.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,7 @@
949949
<java-symbol type="drawable" name="platlogo_alt" />
950950
<java-symbol type="drawable" name="stat_notify_sync_error" />
951951
<java-symbol type="drawable" name="stat_notify_wifi_in_range" />
952+
<java-symbol type="drawable" name="stat_notify_rssi_in_range" />
952953
<java-symbol type="drawable" name="stat_sys_gps_on" />
953954
<java-symbol type="drawable" name="stat_sys_tether_wifi" />
954955
<java-symbol type="drawable" name="status_bar_background" />

0 commit comments

Comments
 (0)