Merge "Always disable() through SBMS; watch date."

This commit is contained in:
Jeff Sharkey
2011-09-08 15:22:51 -07:00
committed by Android (Google) Code Review
5 changed files with 14 additions and 15 deletions

View File

@@ -1174,7 +1174,6 @@ public class PhoneStatusBar extends StatusBar {
case MSG_OPEN_RECENTS_PANEL: case MSG_OPEN_RECENTS_PANEL:
if (DEBUG) Slog.d(TAG, "opening recents panel"); if (DEBUG) Slog.d(TAG, "opening recents panel");
if (mRecentsPanel != null) { if (mRecentsPanel != null) {
disable(StatusBarManager.DISABLE_BACK);
mRecentsPanel.setVisibility(View.VISIBLE); mRecentsPanel.setVisibility(View.VISIBLE);
mRecentsPanel.show(true, true); mRecentsPanel.show(true, true);
} }
@@ -1182,7 +1181,6 @@ public class PhoneStatusBar extends StatusBar {
case MSG_CLOSE_RECENTS_PANEL: case MSG_CLOSE_RECENTS_PANEL:
if (DEBUG) Slog.d(TAG, "closing recents panel"); if (DEBUG) Slog.d(TAG, "closing recents panel");
if (mRecentsPanel != null && mRecentsPanel.isShowing()) { if (mRecentsPanel != null && mRecentsPanel.isShowing()) {
disable(StatusBarManager.DISABLE_NONE);
mRecentsPanel.show(false, true); mRecentsPanel.show(false, true);
} }
break; break;

View File

@@ -22,11 +22,9 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.text.format.DateFormat; import android.text.format.DateFormat;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Slog;
import android.widget.TextView;
import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.ViewParent; import android.view.ViewParent;
import android.widget.TextView;
import com.android.systemui.R; import com.android.systemui.R;
@@ -42,9 +40,10 @@ public final class DateView extends TextView {
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() { private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
String action = intent.getAction(); final String action = intent.getAction();
if (action.equals(Intent.ACTION_TIME_TICK) if (Intent.ACTION_TIME_TICK.equals(action)
|| action.equals(Intent.ACTION_TIMEZONE_CHANGED)) { || Intent.ACTION_TIME_CHANGED.equals(action)
|| Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
updateClock(); updateClock();
} }
} }
@@ -118,6 +117,7 @@ public final class DateView extends TextView {
// Register for Intent broadcasts for the clock and battery // Register for Intent broadcasts for the clock and battery
IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_TIME_TICK); filter.addAction(Intent.ACTION_TIME_TICK);
filter.addAction(Intent.ACTION_TIME_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
mContext.registerReceiver(mIntentReceiver, filter, null, null); mContext.registerReceiver(mIntentReceiver, filter, null, null);
updateClock(); updateClock();
@@ -127,4 +127,3 @@ public final class DateView extends TextView {
} }
} }
} }

View File

@@ -301,6 +301,7 @@ public class TabletStatusBar extends StatusBar implements
mRecentsPanel = (RecentsPanelView) View.inflate(context, mRecentsPanel = (RecentsPanelView) View.inflate(context,
R.layout.status_bar_recent_panel, null); R.layout.status_bar_recent_panel, null);
mRecentsPanel.setVisibility(View.GONE); mRecentsPanel.setVisibility(View.GONE);
mRecentsPanel.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
mRecentsPanel.setOnTouchListener(new TouchOutsideListener(MSG_CLOSE_RECENTS_PANEL, mRecentsPanel.setOnTouchListener(new TouchOutsideListener(MSG_CLOSE_RECENTS_PANEL,
mRecentsPanel)); mRecentsPanel));
mStatusBarView.setIgnoreChildren(2, mRecentButton, mRecentsPanel); mStatusBarView.setIgnoreChildren(2, mRecentButton, mRecentsPanel);
@@ -705,7 +706,6 @@ public class TabletStatusBar extends StatusBar implements
case MSG_OPEN_RECENTS_PANEL: case MSG_OPEN_RECENTS_PANEL:
if (DEBUG) Slog.d(TAG, "opening recents panel"); if (DEBUG) Slog.d(TAG, "opening recents panel");
if (mRecentsPanel != null) { if (mRecentsPanel != null) {
disable(StatusBarManager.DISABLE_BACK);
mRecentsPanel.setVisibility(View.VISIBLE); mRecentsPanel.setVisibility(View.VISIBLE);
mRecentsPanel.show(true, true); mRecentsPanel.show(true, true);
} }
@@ -713,7 +713,6 @@ public class TabletStatusBar extends StatusBar implements
case MSG_CLOSE_RECENTS_PANEL: case MSG_CLOSE_RECENTS_PANEL:
if (DEBUG) Slog.d(TAG, "closing recents panel"); if (DEBUG) Slog.d(TAG, "closing recents panel");
if (mRecentsPanel != null && mRecentsPanel.isShowing()) { if (mRecentsPanel != null && mRecentsPanel.isShowing()) {
disable(StatusBarManager.DISABLE_NONE);
mRecentsPanel.show(false, true); mRecentsPanel.show(false, true);
} }
break; break;

View File

@@ -1202,12 +1202,15 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
// showing secure lockscreen; disable expanding. // showing secure lockscreen; disable expanding.
flags |= StatusBarManager.DISABLE_EXPAND; flags |= StatusBarManager.DISABLE_EXPAND;
} }
if (isSecure()) {
// showing secure lockscreen; disable ticker.
flags |= StatusBarManager.DISABLE_NOTIFICATION_TICKER;
}
} }
if (DEBUG) { if (DEBUG) {
Log.d(TAG, Log.d(TAG, "adjustStatusBarLocked: mShowing=" + mShowing + " mHidden=" + mHidden
"adjustStatusBarLocked: mShowing=" + mShowing + " mHidden=" + mHidden + " isSecure=" + isSecure() + " --> flags=0x" + Integer.toHexString(flags));
+ " isSecure=" + isSecure() + " --> flags=" + flags);
} }
mStatusBarManager.disable(flags); mStatusBarManager.disable(flags);

View File

@@ -301,7 +301,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub
// also allows calls from window manager which is in this process. // also allows calls from window manager which is in this process.
enforceStatusBarService(); enforceStatusBarService();
if (SPEW) Slog.d(TAG, "setSystemUiVisibility(" + vis + ")"); if (SPEW) Slog.d(TAG, "setSystemUiVisibility(0x" + Integer.toHexString(vis) + ")");
synchronized (mLock) { synchronized (mLock) {
updateUiVisibilityLocked(vis); updateUiVisibilityLocked(vis);