Skip to content

Commit

Permalink
am 1fc9180b: Fix measure performance of whole status bar window #2.
Browse files Browse the repository at this point in the history
* commit '1fc9180b3437a028085d165de54d0ff8a15919af':
  Fix measure performance of whole status bar window #2.
  • Loading branch information
XSJoJo authored and Android Git Automerger committed May 11, 2014
2 parents fd7d1ae + 76aaef5 commit 80d0756
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packages/SystemUI/res/layout/heads_up.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<com.android.systemui.statusbar.policy.HeadsUpNotificationView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="@dimen/notification_panel_width"
android:layout_width="match_parent"
android:id="@+id/content_holder"
android:background="@drawable/notification_panel_bg"
/>
4 changes: 2 additions & 2 deletions packages/SystemUI/res/layout/status_bar_expanded.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:id="@+id/notification_panel"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

Expand Down Expand Up @@ -52,7 +52,7 @@
<com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer
android:id="@+id/notification_container_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:clipToPadding="false"
android:clipChildren="false">

Expand Down
4 changes: 1 addition & 3 deletions packages/SystemUI/res/layout/super_status_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
<include layout="@layout/status_bar_expanded"
android:layout_width="@dimen/notification_panel_width"
android:layout_height="match_parent"
android:layout_gravity="start|top"
style="@style/StatusBarExpanded"
android:visibility="gone" />
</com.android.systemui.statusbar.phone.PanelHolder>

Expand Down
6 changes: 6 additions & 0 deletions packages/SystemUI/res/values-sw600dp/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@
<style name="BrightnessDialogContainer" parent="@style/BaseBrightnessDialogContainer">
<item name="android:layout_width">480dp</item>
</style>

<style name="StatusBarExpanded">
<item name="android:layout_width">@dimen/notification_panel_width</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">start|top</item>
</style>
</resources>
3 changes: 0 additions & 3 deletions packages/SystemUI/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@
<!-- Quick Settings CA Cert Warning tile geometry: gap between icon and text -->
<dimen name="qs_cawarn_tile_margin_below_icon">3dp</dimen>

<!-- The width of the notification panel window: match_parent below sw600dp -->
<dimen name="notification_panel_width">-1dp</dimen>

<!-- used by DessertCase -->
<dimen name="dessert_case_cell_size">192dp</dimen>

Expand Down
6 changes: 6 additions & 0 deletions packages/SystemUI/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,10 @@

<style name="systemui_theme" parent="@android:style/Theme.DeviceDefault" />

<style name="StatusBarExpanded">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">start|top</item>
</style>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
int mNotificationPanelGravity;
int mNotificationPanelMarginBottomPx;
float mNotificationPanelMinHeightFrac;
boolean mNotificationPanelIsFullScreenWidth;
TextView mNotificationPanelDebugText;

// settings
Expand Down Expand Up @@ -553,8 +552,6 @@ public boolean onTouch(View v, MotionEvent event) {
mNotificationPanel = (NotificationPanelView) mStatusBarWindow.findViewById(
R.id.notification_panel);
mNotificationPanel.setStatusBar(this);
mNotificationPanelIsFullScreenWidth =
(mNotificationPanel.getLayoutParams().width == ViewGroup.LayoutParams.MATCH_PARENT);

// make the header non-responsive to clicks
mNotificationPanel.findViewById(R.id.header).setOnTouchListener(
Expand Down Expand Up @@ -647,11 +644,9 @@ public boolean onTouch(View v, MotionEvent event) {
mDateTimeView.setEnabled(true);
}

if (!mNotificationPanelIsFullScreenWidth) {
mNotificationPanel.setSystemUiVisibility(
View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS |
View.STATUS_BAR_DISABLE_CLOCK);
}
mNotificationPanel.setSystemUiVisibility(
View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS |
View.STATUS_BAR_DISABLE_CLOCK);

mTicker = new MyTicker(context, mStatusBarView);

Expand Down Expand Up @@ -727,11 +722,6 @@ public boolean onTouch(View v, MotionEvent event) {
mFlipSettingsView = mSettingsContainer;
if (mSettingsContainer != null) {
mQS = new QuickSettings(mContext, mSettingsContainer);
if (!mNotificationPanelIsFullScreenWidth) {
mSettingsContainer.setSystemUiVisibility(
View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS
| View.STATUS_BAR_DISABLE_SYSTEM_INFO);
}
mQS.setService(this);
mQS.setBar(mStatusBarView);
mQS.setup(mNetworkController, mBluetoothController, mBatteryController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ public void add(View statusBarView, int barHeight) {
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
PixelFormat.TRANSLUCENT);

mLp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
mLp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
mLp.gravity = Gravity.TOP;
mLp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
mLp.setTitle("StatusBar");
mLp.packageName = mContext.getPackageName();
Expand Down

0 comments on commit 80d0756

Please sign in to comment.