summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Notification.java2
-rw-r--r--core/java/android/widget/TextClock.java18
2 files changed, 8 insertions, 12 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index ee92646..e79b214 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1808,7 +1808,7 @@ public class Notification implements Parcelable
*
* This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so:
* <pre class="prettyprint">
- * Notification noti = new Notification.BigPictureStyle(
+ * Notification noti = new Notification.BigTextStyle(
* new Notification.Builder()
* .setContentTitle(&quot;New mail from &quot; + sender.toString())
* .setContentText(subject)
diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java
index 908eb0a..290d9b5 100644
--- a/core/java/android/widget/TextClock.java
+++ b/core/java/android/widget/TextClock.java
@@ -135,13 +135,11 @@ public class TextClock extends TextView {
private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
- if (mTimeZone == null) {
- if (intent.getAction().equals(Intent.ACTION_TIMEZONE_CHANGED)) {
- final String timeZone = intent.getStringExtra("time-zone");
- createTime(timeZone);
- }
- onTimeChanged();
+ if (mTimeZone == null && Intent.ACTION_TIMEZONE_CHANGED.equals(intent.getAction())) {
+ final String timeZone = intent.getStringExtra("time-zone");
+ createTime(timeZone);
}
+ onTimeChanged();
}
};
@@ -406,11 +404,9 @@ public class TextClock extends TextView {
boolean hadSeconds = mHasSeconds;
mHasSeconds = DateFormat.hasSeconds(mFormat);
- if (handleTicker) {
- if (hadSeconds != mHasSeconds) {
- if (hadSeconds) getHandler().removeCallbacks(mTicker);
- else mTicker.run();
- }
+ if (handleTicker && mAttached && hadSeconds != mHasSeconds) {
+ if (hadSeconds) getHandler().removeCallbacks(mTicker);
+ else mTicker.run();
}
}