Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ffd5652 authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am 75c48009: Merge "Add icon for mobile notification" into jb-mr1-dev

* commit '75c48009':
  Add icon for mobile notification
parents 709b9434 75c48009
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -330,28 +330,32 @@ public class CaptivePortalTracker extends StateMachine {
        if (visible) {
        if (visible) {
            CharSequence title;
            CharSequence title;
            CharSequence details;
            CharSequence details;
            int icon;
            switch (mNetworkInfo.getType()) {
            switch (mNetworkInfo.getType()) {
                case ConnectivityManager.TYPE_WIFI:
                case ConnectivityManager.TYPE_WIFI:
                    title = r.getString(R.string.wifi_available_sign_in, 0);
                    title = r.getString(R.string.wifi_available_sign_in, 0);
                    details = r.getString(R.string.network_available_sign_in_detailed,
                    details = r.getString(R.string.network_available_sign_in_detailed,
                            mNetworkInfo.getExtraInfo());
                            mNetworkInfo.getExtraInfo());
                    icon = R.drawable.stat_notify_wifi_in_range;
                    break;
                    break;
                case ConnectivityManager.TYPE_MOBILE:
                case ConnectivityManager.TYPE_MOBILE:
                    title = r.getString(R.string.network_available_sign_in, 0);
                    title = r.getString(R.string.network_available_sign_in, 0);
                    // TODO: Change this to pull from NetworkInfo once a printable
                    // TODO: Change this to pull from NetworkInfo once a printable
                    // name has been added to it
                    // name has been added to it
                    details = mTelephonyManager.getNetworkOperatorName();
                    details = mTelephonyManager.getNetworkOperatorName();
                    icon = R.drawable.stat_notify_rssi_in_range;
                    break;
                    break;
                default:
                default:
                    title = r.getString(R.string.network_available_sign_in, 0);
                    title = r.getString(R.string.network_available_sign_in, 0);
                    details = r.getString(R.string.network_available_sign_in_detailed,
                    details = r.getString(R.string.network_available_sign_in_detailed,
                            mNetworkInfo.getExtraInfo());
                            mNetworkInfo.getExtraInfo());
                    icon = R.drawable.stat_notify_rssi_in_range;
                    break;
                    break;
            }
            }


            Notification notification = new Notification();
            Notification notification = new Notification();
            notification.when = 0;
            notification.when = 0;
            notification.icon = com.android.internal.R.drawable.stat_notify_wifi_in_range;
            notification.icon = icon;
            notification.flags = Notification.FLAG_AUTO_CANCEL;
            notification.flags = Notification.FLAG_AUTO_CANCEL;
            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mUrl));
            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mUrl));
            intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
            intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT |
+1.13 KiB
Loading image diff...
+855 B
Loading image diff...
+1.46 KiB
Loading image diff...
+1 −0
Original line number Original line Diff line number Diff line
@@ -949,6 +949,7 @@
  <java-symbol type="drawable" name="platlogo_alt" />
  <java-symbol type="drawable" name="platlogo_alt" />
  <java-symbol type="drawable" name="stat_notify_sync_error" />
  <java-symbol type="drawable" name="stat_notify_sync_error" />
  <java-symbol type="drawable" name="stat_notify_wifi_in_range" />
  <java-symbol type="drawable" name="stat_notify_wifi_in_range" />
  <java-symbol type="drawable" name="stat_notify_rssi_in_range" />
  <java-symbol type="drawable" name="stat_sys_gps_on" />
  <java-symbol type="drawable" name="stat_sys_gps_on" />
  <java-symbol type="drawable" name="stat_sys_tether_wifi" />
  <java-symbol type="drawable" name="stat_sys_tether_wifi" />
  <java-symbol type="drawable" name="status_bar_background" />
  <java-symbol type="drawable" name="status_bar_background" />