Merge "Fix periodically disappearing status icons." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
3f677b1b3e
@@ -817,7 +817,8 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
|
|||||||
|
|
||||||
void performCollapse() {
|
void performCollapse() {
|
||||||
if (SPEW) Slog.d(TAG, "performCollapse: mExpanded=" + mExpanded
|
if (SPEW) Slog.d(TAG, "performCollapse: mExpanded=" + mExpanded
|
||||||
+ " mExpandedVisible=" + mExpandedVisible);
|
+ " mExpandedVisible=" + mExpandedVisible
|
||||||
|
+ " mTicking=" + mTicking);
|
||||||
|
|
||||||
if (!mExpandedVisible) {
|
if (!mExpandedVisible) {
|
||||||
return;
|
return;
|
||||||
@@ -832,7 +833,9 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
|
|||||||
if ((mDisabled & StatusBarManager.DISABLE_NOTIFICATION_ICONS) == 0) {
|
if ((mDisabled & StatusBarManager.DISABLE_NOTIFICATION_ICONS) == 0) {
|
||||||
setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
|
setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
|
||||||
}
|
}
|
||||||
setDateViewVisibility(false, com.android.internal.R.anim.fade_out);
|
if (mDateView.getVisibility() == View.VISIBLE) {
|
||||||
|
setDateViewVisibility(false, com.android.internal.R.anim.fade_out);
|
||||||
|
}
|
||||||
|
|
||||||
if (!mExpanded) {
|
if (!mExpanded) {
|
||||||
return;
|
return;
|
||||||
@@ -1147,6 +1150,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
void tickerStarting() {
|
void tickerStarting() {
|
||||||
|
if (SPEW) Slog.d(TAG, "tickerStarting");
|
||||||
mTicking = true;
|
mTicking = true;
|
||||||
mIcons.setVisibility(View.GONE);
|
mIcons.setVisibility(View.GONE);
|
||||||
mTickerView.setVisibility(View.VISIBLE);
|
mTickerView.setVisibility(View.VISIBLE);
|
||||||
@@ -1159,38 +1163,30 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
void tickerDone() {
|
void tickerDone() {
|
||||||
|
if (SPEW) Slog.d(TAG, "tickerDone");
|
||||||
|
mTicking = false;
|
||||||
mIcons.setVisibility(View.VISIBLE);
|
mIcons.setVisibility(View.VISIBLE);
|
||||||
mTickerView.setVisibility(View.GONE);
|
mTickerView.setVisibility(View.GONE);
|
||||||
mIcons.startAnimation(loadAnim(com.android.internal.R.anim.push_down_in, null));
|
mIcons.startAnimation(loadAnim(com.android.internal.R.anim.push_down_in, null));
|
||||||
mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.push_down_out,
|
mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.push_down_out, null));
|
||||||
mTickingDoneListener));
|
|
||||||
if (mExpandedVisible) {
|
if (mExpandedVisible) {
|
||||||
setDateViewVisibility(true, com.android.internal.R.anim.push_down_in);
|
setDateViewVisibility(true, com.android.internal.R.anim.push_down_in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tickerHalting() {
|
void tickerHalting() {
|
||||||
|
if (SPEW) Slog.d(TAG, "tickerHalting");
|
||||||
|
mTicking = false;
|
||||||
mIcons.setVisibility(View.VISIBLE);
|
mIcons.setVisibility(View.VISIBLE);
|
||||||
mTickerView.setVisibility(View.GONE);
|
mTickerView.setVisibility(View.GONE);
|
||||||
mIcons.startAnimation(loadAnim(com.android.internal.R.anim.fade_in, null));
|
mIcons.startAnimation(loadAnim(com.android.internal.R.anim.fade_in, null));
|
||||||
mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.fade_out,
|
mTickerView.startAnimation(loadAnim(com.android.internal.R.anim.fade_out, null));
|
||||||
mTickingDoneListener));
|
|
||||||
if (mExpandedVisible) {
|
if (mExpandedVisible) {
|
||||||
setDateViewVisibility(true, com.android.internal.R.anim.fade_in);
|
setDateViewVisibility(true, com.android.internal.R.anim.fade_in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Animation.AnimationListener mTickingDoneListener = new Animation.AnimationListener() {;
|
|
||||||
public void onAnimationEnd(Animation animation) {
|
|
||||||
mTicking = false;
|
|
||||||
}
|
|
||||||
public void onAnimationRepeat(Animation animation) {
|
|
||||||
}
|
|
||||||
public void onAnimationStart(Animation animation) {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private Animation loadAnim(int id, Animation.AnimationListener listener) {
|
private Animation loadAnim(int id, Animation.AnimationListener listener) {
|
||||||
Animation anim = AnimationUtils.loadAnimation(StatusBarService.this, id);
|
Animation anim = AnimationUtils.loadAnimation(StatusBarService.this, id);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
@@ -1373,7 +1369,8 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
|
|||||||
void updateExpandedViewPos(int expandedPosition) {
|
void updateExpandedViewPos(int expandedPosition) {
|
||||||
if (SPEW) {
|
if (SPEW) {
|
||||||
Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
|
Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
|
||||||
+ " mTrackingParams.y=" + mTrackingParams.y
|
+ " mTrackingParams.y="
|
||||||
|
+ ((mTrackingParams == null) ? "???" : mTrackingParams.y)
|
||||||
+ " mTrackingPosition=" + mTrackingPosition);
|
+ " mTrackingPosition=" + mTrackingPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1518,6 +1515,9 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
} else if ((diff & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||||
|
Slog.d(TAG, "DISABLE_NOTIFICATION_TICKER: "
|
||||||
|
+ (((net & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0)
|
||||||
|
? "yes" : "no"));
|
||||||
if (mTicking && (net & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
if (mTicking && (net & StatusBarManager.DISABLE_NOTIFICATION_TICKER) != 0) {
|
||||||
mTicker.halt();
|
mTicker.halt();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -637,6 +637,20 @@ public class NotificationTestList extends TestActivity
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
new Test("Ticker") {
|
||||||
|
public void run() {
|
||||||
|
Notification not = new Notification(
|
||||||
|
R.drawable.app_gmail,
|
||||||
|
"New mail from joeo@example.com, on the topic of very long ticker texts",
|
||||||
|
System.currentTimeMillis());
|
||||||
|
not.setLatestEventInfo(NotificationTestList.this,
|
||||||
|
"A new message awaits",
|
||||||
|
"The contents are very interesting and important",
|
||||||
|
makeIntent());
|
||||||
|
mNM.notify(1, not);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
new Test("Crash") {
|
new Test("Crash") {
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user