Fix measure performance of whole status bar window #2.

Change-Id: I4cbaa762d61e19016f925556c8e02720249dc22c
This commit is contained in:
Jorim Jaggi
2014-05-08 19:16:49 +02:00
parent ddc52285ca
commit 76aaef537a
8 changed files with 20 additions and 24 deletions

View File

@@ -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"
/>

View File

@@ -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"
>
@@ -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">

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -223,7 +223,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
int mNotificationPanelGravity;
int mNotificationPanelMarginBottomPx;
float mNotificationPanelMinHeightFrac;
boolean mNotificationPanelIsFullScreenWidth;
TextView mNotificationPanelDebugText;
// settings
@@ -553,8 +552,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
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(
@@ -647,11 +644,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
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);
@@ -727,11 +722,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
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,

View File

@@ -78,9 +78,8 @@ public class StatusBarWindowManager {
| 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();