Loading core/res/res/values-xlarge/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,5 +23,6 @@ <!-- Component to be used as the status bar service. Must implement the IStatusBar interface. This name is in the ComponentName flattened format (package/class) --> <string name="config_statusBarComponent">com.android.systemui/com.android.systemui.statusbar.tablet.TabletStatusBarService</string> <bool name="config_statusBarCanHide">false</bool> </resources> core/res/res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ <!-- Component to be used as the status bar service. Must implement the IStatusBar interface. This name is in the ComponentName flattened format (package/class) --> <string name="config_statusBarComponent">com.android.systemui/com.android.systemui.statusbar.PhoneStatusBarService</string> <bool name="config_statusBarCanHide">true</bool> <!-- Do not translate. Defines the slots for the right-hand side icons. That is to say, the icons in the status bar that are not notifications. --> Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +19 −6 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean mSafeMode; WindowState mStatusBar = null; boolean mStatusBarCanHide; final ArrayList<WindowState> mStatusBarPanels = new ArrayList<WindowState>(); WindowState mKeyguard = null; KeyguardViewMediator mKeyguardMediator; Loading Loading @@ -546,6 +547,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { com.android.internal.R.array.config_safeModeDisabledVibePattern); mSafeModeEnabledVibePattern = getLongIntArray(mContext.getResources(), com.android.internal.R.array.config_safeModeEnabledVibePattern); // Note: the Configuration is not stable here, so we cannot load mStatusBarCanHide from // config_statusBarCanHide because the latter depends on the screen size } public void updateSettings() { Loading Loading @@ -954,6 +958,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { return WindowManagerImpl.ADD_MULTIPLE_SINGLETON; } mStatusBar = win; // The Configuration will be stable by now, so we can load this mStatusBarCanHide = mContext.getResources().getBoolean( com.android.internal.R.bool.config_statusBarCanHide); break; case TYPE_STATUS_BAR_PANEL: mContext.enforceCallingOrSelfPermission( Loading Loading @@ -1212,7 +1221,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void getContentInsetHintLw(WindowManager.LayoutParams attrs, Rect contentInset) { final int fl = attrs.flags; if ((fl & if (mStatusBarCanHide && (fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR)) == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) { contentInset.set(mCurLeft, mCurTop, mW - mCurRight, mH - mCurBottom); Loading Loading @@ -1340,7 +1349,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { attrs.gravity = Gravity.BOTTOM; mDockLayer = win.getSurfaceLayer(); } else { if ((fl & if (mStatusBarCanHide && (fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR)) == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) { // This is the case for a normal activity window: we want it Loading Loading @@ -1372,7 +1381,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { vf.right = mCurRight; vf.bottom = mCurBottom; } } else if ((fl & FLAG_LAYOUT_IN_SCREEN) != 0) { } else if (mStatusBarCanHide && (fl & FLAG_LAYOUT_IN_SCREEN) != 0) { // A window that has requested to fill the entire screen just // gets everything, period. pf.left = df.left = cf.left = 0; Loading Loading @@ -1516,9 +1525,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean hideStatusBar = (lp.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0; if (hideStatusBar) { if (mStatusBarCanHide) { if (DEBUG_LAYOUT) Log.v(TAG, "Hiding status bar"); if (mStatusBar.hideLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT; hiding = true; } else if (localLOGV) { Log.v(TAG, "Preventing status bar from hiding by policy"); } } else { if (DEBUG_LAYOUT) Log.v(TAG, "Showing status bar"); if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT; Loading Loading
core/res/res/values-xlarge/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,5 +23,6 @@ <!-- Component to be used as the status bar service. Must implement the IStatusBar interface. This name is in the ComponentName flattened format (package/class) --> <string name="config_statusBarComponent">com.android.systemui/com.android.systemui.statusbar.tablet.TabletStatusBarService</string> <bool name="config_statusBarCanHide">false</bool> </resources>
core/res/res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ <!-- Component to be used as the status bar service. Must implement the IStatusBar interface. This name is in the ComponentName flattened format (package/class) --> <string name="config_statusBarComponent">com.android.systemui/com.android.systemui.statusbar.PhoneStatusBarService</string> <bool name="config_statusBarCanHide">true</bool> <!-- Do not translate. Defines the slots for the right-hand side icons. That is to say, the icons in the status bar that are not notifications. --> Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +19 −6 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean mSafeMode; WindowState mStatusBar = null; boolean mStatusBarCanHide; final ArrayList<WindowState> mStatusBarPanels = new ArrayList<WindowState>(); WindowState mKeyguard = null; KeyguardViewMediator mKeyguardMediator; Loading Loading @@ -546,6 +547,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { com.android.internal.R.array.config_safeModeDisabledVibePattern); mSafeModeEnabledVibePattern = getLongIntArray(mContext.getResources(), com.android.internal.R.array.config_safeModeEnabledVibePattern); // Note: the Configuration is not stable here, so we cannot load mStatusBarCanHide from // config_statusBarCanHide because the latter depends on the screen size } public void updateSettings() { Loading Loading @@ -954,6 +958,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { return WindowManagerImpl.ADD_MULTIPLE_SINGLETON; } mStatusBar = win; // The Configuration will be stable by now, so we can load this mStatusBarCanHide = mContext.getResources().getBoolean( com.android.internal.R.bool.config_statusBarCanHide); break; case TYPE_STATUS_BAR_PANEL: mContext.enforceCallingOrSelfPermission( Loading Loading @@ -1212,7 +1221,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void getContentInsetHintLw(WindowManager.LayoutParams attrs, Rect contentInset) { final int fl = attrs.flags; if ((fl & if (mStatusBarCanHide && (fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR)) == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) { contentInset.set(mCurLeft, mCurTop, mW - mCurRight, mH - mCurBottom); Loading Loading @@ -1340,7 +1349,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { attrs.gravity = Gravity.BOTTOM; mDockLayer = win.getSurfaceLayer(); } else { if ((fl & if (mStatusBarCanHide && (fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR)) == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) { // This is the case for a normal activity window: we want it Loading Loading @@ -1372,7 +1381,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { vf.right = mCurRight; vf.bottom = mCurBottom; } } else if ((fl & FLAG_LAYOUT_IN_SCREEN) != 0) { } else if (mStatusBarCanHide && (fl & FLAG_LAYOUT_IN_SCREEN) != 0) { // A window that has requested to fill the entire screen just // gets everything, period. pf.left = df.left = cf.left = 0; Loading Loading @@ -1516,9 +1525,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean hideStatusBar = (lp.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0; if (hideStatusBar) { if (mStatusBarCanHide) { if (DEBUG_LAYOUT) Log.v(TAG, "Hiding status bar"); if (mStatusBar.hideLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT; hiding = true; } else if (localLOGV) { Log.v(TAG, "Preventing status bar from hiding by policy"); } } else { if (DEBUG_LAYOUT) Log.v(TAG, "Showing status bar"); if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT; Loading