import com.android.systemui.R;
import com.android.systemui.SystemUI;
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+
/**
* Ensure a single status bar service implementation is running at all times.
*
return 0;
}
+ @Override
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ if (mStatusBar != null) {
+ mStatusBar.dump(fd, pw, args);
+ }
+ }
+
private void createStatusBarFromConfig() {
if (DEBUG) Log.d(TAG, "createStatusBarFromConfig");
final String clsName = mContext.getString(R.string.config_statusBarComponent);
package com.android.systemui.statusbar.phone;
+import static android.app.StatusBarManager.windowStateToString;
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE;
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT;
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT;
public static final boolean DEBUG_GESTURES = false;
public static final boolean DEBUG_CLINGS = false;
+ public static final boolean DEBUG_WINDOW_STATE = true;
public static final boolean ENABLE_NOTIFICATION_PANEL_CLING = false;
&& window == StatusBarManager.WINDOW_STATUS_BAR
&& mStatusBarWindowState != state) {
mStatusBarWindowState = state;
- if (DEBUG) Log.d(TAG, "Status bar " + StatusBarManager.windowStateToString(state));
+ if (DEBUG_WINDOW_STATE) Log.d(TAG, "Status bar " + windowStateToString(state));
mStatusBarWindow.setEnabled(showing);
if (!showing) {
mStatusBarView.collapseAllPanels(false);
&& window == StatusBarManager.WINDOW_NAVIGATION_BAR
&& mNavigationBarWindowState != state) {
mNavigationBarWindowState = state;
- if (DEBUG) Log.d(TAG, "Navigation bar " + StatusBarManager.windowStateToString(state));
+ if (DEBUG_WINDOW_STATE) Log.d(TAG, "Navigation bar " + windowStateToString(state));
mNavigationBarView.setEnabled(showing);
}
}
+ " scroll " + mScrollView.getScrollX() + "," + mScrollView.getScrollY());
}
+ pw.print(" mStatusBarWindowState=");
+ pw.println(windowStateToString(mStatusBarWindowState));
+ dumpBarTransitions(pw, "mStatusBarView", mStatusBarView.getBarTransitions());
+ if (mNavigationBarView != null) {
+ pw.print(" mNavigationBarWindowState=");
+ pw.println(windowStateToString(mNavigationBarWindowState));
+ dumpBarTransitions(pw, "mNavigationBarView", mNavigationBarView.getBarTransitions());
+ }
+
pw.print(" mNavigationBarView=");
if (mNavigationBarView == null) {
pw.println("null");
mNetworkController.dump(fd, pw, args);
}
+ private static void dumpBarTransitions(PrintWriter pw, String var, BarTransitions transitions) {
+ pw.print(" "); pw.print(var); pw.print(".BarTransitions.mMode=");
+ pw.println(BarTransitions.modeToString(transitions.getMode()));
+ }
+
@Override
public void createAndAddWindows() {
addStatusBarWindow();
* Controls state/behavior specific to a system bar window.
*/
public class BarController {
- private static final boolean DEBUG = false;
+ private static final boolean DEBUG = true;
private static final int TRANSIENT_BAR_NONE = 0;
private static final int TRANSIENT_BAR_SHOWING = 1;
private void updateState(final int state) {
if (state != mState) {
mState = state;
+ if (DEBUG) Slog.d(mTag, "mState: " + StatusBarManager.windowStateToString(state));
mHandler.post(new Runnable() {
@Override
public void run() {
statusbar.setWindowState(mStatusBarManagerId, state);
}
} catch (RemoteException e) {
+ if (DEBUG) Slog.w(mTag, "Error posting window state", e);
// re-acquire status bar service next time it is needed.
mStatusBarService = null;
}
mLastTransparent = SystemClock.uptimeMillis();
}
mTransientBarState = state;
- if (DEBUG) Slog.d(mTag, "New state: " + transientBarStateToString(state));
+ if (DEBUG) Slog.d(mTag, "mTransientBarState: " + transientBarStateToString(state));
}
}
public void dump(PrintWriter pw, String prefix) {
if (mWin != null) {
- pw.print(prefix); pw.print(mTag); pw.print(' ');
- pw.print("mTransientBar"); pw.print('=');
+ pw.print(prefix); pw.println(mTag);
+ pw.print(" "); pw.print("mState"); pw.print('=');
+ pw.println(StatusBarManager.windowStateToString(mState));
+ pw.print(" "); pw.print("mTransientBar"); pw.print('=');
pw.println(transientBarStateToString(mTransientBarState));
}
}