diff options
author | Joe Onorato <joeo@google.com> | 2011-01-30 13:18:16 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-30 13:18:16 -0800 |
commit | f2057d907b5d9c75086337e840f70b5061b2a5aa (patch) | |
tree | 4410a8f70df6c3b83f70dcdef6ce2e742e63055a /packages | |
parent | b2abd8c424a68eb6a5e3615a99f66c0bd46e6063 (diff) | |
parent | 0c953f68f54b5ff13b002f8e054537cafb29677e (diff) | |
download | frameworks_base-f2057d907b5d9c75086337e840f70b5061b2a5aa.zip frameworks_base-f2057d907b5d9c75086337e840f70b5061b2a5aa.tar.gz frameworks_base-f2057d907b5d9c75086337e840f70b5061b2a5aa.tar.bz2 |
Merge changes I09e8c4eb,I91a0e05f into honeycomb
* changes:
Use a DateFormat that fits.
Update the network info when the configuration changes.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java | 7 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java index 136f4a94..6ab03e1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java @@ -20,6 +20,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.text.format.DateFormat; import android.util.AttributeSet; import android.util.Slog; import android.widget.TextView; @@ -27,7 +28,6 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewParent; -import java.text.DateFormat; import java.util.Date; public final class DateView extends TextView { @@ -86,8 +86,11 @@ public final class DateView extends TextView { } private final void updateClock() { + final Context context = getContext(); Date now = new Date(); - setText(DateFormat.getDateInstance(DateFormat.FULL).format(now)); + CharSequence dow = DateFormat.format("EEEE", now); + CharSequence date = DateFormat.getMediumDateFormat(getContext()).format(now); + setText(dow + "\n" + date); } private boolean isVisible() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index d3f4703..a4c153f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -146,6 +146,7 @@ public class NetworkController extends BroadcastReceiver { filter.addAction(Telephony.Intents.SPN_STRINGS_UPDATED_ACTION); filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); filter.addAction(ConnectivityManager.INET_CONDITION_ACTION); + filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED); context.registerReceiver(this, filter); // yuck @@ -197,6 +198,8 @@ public class NetworkController extends BroadcastReceiver { action.equals(ConnectivityManager.INET_CONDITION_ACTION)) { updateConnectivity(intent); refreshViews(); + } else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) { + refreshViews(); } } |