summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2013-02-15 13:01:16 -0800
committerFabrice Di Meglio <fdimeglio@google.com>2013-02-15 13:10:38 -0800
commitb5fe52b389d92c067b19217429a2812a9d0ea9dd (patch)
tree2d9d2bac3739aa3060ad5169c6ce4537e9db5c63 /packages
parent2977a30ef422f2be4a5ef74dd1a5a32a6a8f994b (diff)
downloadframeworks_base-b5fe52b389d92c067b19217429a2812a9d0ea9dd.zip
frameworks_base-b5fe52b389d92c067b19217429a2812a9d0ea9dd.tar.gz
frameworks_base-b5fe52b389d92c067b19217429a2812a9d0ea9dd.tar.bz2
SystemUI optimization - rely on inheritance for layout direction
- this CL purpose is to fully rely on inheritance for setting the SystemUI views layout direction. This is the default case for layout direction and should stay like that. Change-Id: I8efb6ab6e5bd10f519c7a27e8837efb69631940e
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java11
3 files changed, 0 insertions, 24 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index f941f89..4599dd4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -462,7 +462,6 @@ public abstract class BaseStatusBar extends SystemUI implements
mSearchPanelView.setOnTouchListener(
new TouchOutsideListener(MSG_CLOSE_SEARCH_PANEL, mSearchPanelView));
mSearchPanelView.setVisibility(View.GONE);
- mSearchPanelView.setLayoutDirection(mLayoutDirection);
WindowManager.LayoutParams lp = getSearchLayoutParams(mSearchPanelView.getLayoutParams());
@@ -739,7 +738,6 @@ public abstract class BaseStatusBar extends SystemUI implements
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false);
- row.setLayoutDirection(mLayoutDirection);
// for blaming (see SwipeHelper.setLongPressListener)
row.setTag(sbn.pkg);
@@ -787,7 +785,6 @@ public abstract class BaseStatusBar extends SystemUI implements
params.minHeight = minHeight;
params.maxHeight = minHeight;
adaptive.addView(expandedOneU, params);
- expandedOneU.setLayoutDirection(mLayoutDirection);
}
if (expandedLarge != null) {
SizeAdaptiveLayout.LayoutParams params =
@@ -795,7 +792,6 @@ public abstract class BaseStatusBar extends SystemUI implements
params.minHeight = minHeight+1;
params.maxHeight = maxHeight;
adaptive.addView(expandedLarge, params);
- expandedLarge.setLayoutDirection(mLayoutDirection);
}
row.setDrawingCacheEnabled(true);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 9b1c1db..024faf7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -348,7 +348,6 @@ public class PhoneStatusBar extends BaseStatusBar {
}
return mStatusBarWindow.onTouchEvent(event);
}});
- mStatusBarWindow.setLayoutDirection(mLayoutDirection);
mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar);
mStatusBarView.setBar(this);
@@ -380,7 +379,6 @@ public class PhoneStatusBar extends BaseStatusBar {
mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
mIntruderAlertView.setVisibility(View.GONE);
mIntruderAlertView.setBar(this);
- mIntruderAlertView.setLayoutDirection(mLayoutDirection);
}
if (MULTIUSER_DEBUG) {
mNotificationPanelDebugText = (TextView) mNotificationPanel.findViewById(R.id.header_debug_info);
@@ -398,7 +396,6 @@ public class PhoneStatusBar extends BaseStatusBar {
mNavigationBarView.setDisabledFlags(mDisabled);
mNavigationBarView.setBar(this);
- mNavigationBarView.setLayoutDirection(mLayoutDirection);
}
} catch (RemoteException ex) {
// no window manager? good luck with that
@@ -963,11 +960,6 @@ public class PhoneStatusBar extends BaseStatusBar {
@Override
protected void refreshLayout(int layoutDirection) {
- mStatusBarWindow.setLayoutDirection(layoutDirection);
- if (ENABLE_INTRUDERS) {
- mIntruderAlertView.setLayoutDirection(layoutDirection);
- }
-
if (mNavigationBarView != null) {
mNavigationBarView.setLayoutDirection(layoutDirection);
}
@@ -1030,7 +1022,6 @@ public class PhoneStatusBar extends BaseStatusBar {
View v = toShow.get(i);
if (v.getParent() == null) {
mPile.addView(v, i);
- v.setLayoutDirection(mLayoutDirection);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index ccd87f7..3d6bfe7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -247,7 +247,6 @@ public class TabletStatusBar extends BaseStatusBar implements
mNotificationPanel.show(false, false);
mNotificationPanel.setOnTouchListener(
new TouchOutsideListener(MSG_CLOSE_NOTIFICATION_PANEL, mNotificationPanel));
- mNotificationPanel.setLayoutDirection(mLayoutDirection);
// the battery icon
mBatteryController.addIconView((ImageView)mNotificationPanel.findViewById(R.id.battery));
@@ -313,7 +312,6 @@ public class TabletStatusBar extends BaseStatusBar implements
mInputMethodsPanel.setOnTouchListener(new TouchOutsideListener(
MSG_CLOSE_INPUT_METHODS_PANEL, mInputMethodsPanel));
mInputMethodsPanel.setImeSwitchButton(mInputMethodSwitchButton);
- mInputMethodsPanel.setLayoutDirection(mLayoutDirection);
mStatusBarView.setIgnoreChildren(2, mInputMethodSwitchButton, mInputMethodsPanel);
lp = new WindowManager.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
@@ -337,7 +335,6 @@ public class TabletStatusBar extends BaseStatusBar implements
MSG_CLOSE_COMPAT_MODE_PANEL, mCompatModePanel));
mCompatModePanel.setTrigger(mCompatModeButton);
mCompatModePanel.setVisibility(View.GONE);
- mCompatModePanel.setLayoutDirection(mLayoutDirection);
mStatusBarView.setIgnoreChildren(3, mCompatModeButton, mCompatModePanel);
lp = new WindowManager.LayoutParams(
250,
@@ -395,13 +392,7 @@ public class TabletStatusBar extends BaseStatusBar implements
@Override
protected void refreshLayout(int layoutDirection) {
- mStatusBarView.setLayoutDirection(layoutDirection);
- if (mCompatibilityHelpDialog != null) {
- mCompatibilityHelpDialog.setLayoutDirection(layoutDirection);
- }
mNotificationPanel.refreshLayout(layoutDirection);
- mInputMethodsPanel.setLayoutDirection(layoutDirection);
- mCompatModePanel.setLayoutDirection(layoutDirection);
}
protected void loadDimens() {
@@ -463,7 +454,6 @@ public class TabletStatusBar extends BaseStatusBar implements
final TabletStatusBarView sb = (TabletStatusBarView)View.inflate(
context, R.layout.system_bar, null);
mStatusBarView = sb;
- mStatusBarView.setLayoutDirection(mLayoutDirection);
sb.setHandler(mHandler);
@@ -1134,7 +1124,6 @@ public class TabletStatusBar extends BaseStatusBar implements
}
mCompatibilityHelpDialog = View.inflate(mContext, R.layout.compat_mode_help, null);
- mCompatibilityHelpDialog.setLayoutDirection(mLayoutDirection);
View button = mCompatibilityHelpDialog.findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {