Porting old code for min alpha for items in recents
Change-Id: I68dce175b3a2c0263c5df1ef787c28d6c622e879
diff --git a/packages/SystemUI/res/values-sw720dp/config.xml b/packages/SystemUI/res/values-sw720dp/config.xml
index de63d9f..bf01a8d 100644
--- a/packages/SystemUI/res/values-sw720dp/config.xml
+++ b/packages/SystemUI/res/values-sw720dp/config.xml
@@ -29,5 +29,8 @@
<!-- Whether recents thumbnails should stretch in both x and y to fill their
ImageView -->
<bool name="config_recents_thumbnail_image_fits_to_xy">true</bool>
+
+ <!-- Min alpha % that recent items will fade to while being dismissed -->
+ <integer name="config_recent_item_min_alpha">0</integer>
</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 13622e6..34e58a3 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -78,5 +78,8 @@
<integer name="navigation_bar_deadzone_decay">333</integer>
<bool name="config_dead_zone_flash">false</bool>
+
+ <!-- Min alpha % that recent items will fade to while being dismissed -->
+ <integer name="config_recent_item_min_alpha">3</integer>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
index a4c8e64..baacde01 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
@@ -136,6 +136,8 @@
mRecentsPanel.setOnTouchListener(new TouchOutsideListener(mRecentsPanel));
mRecentsPanel.setRecentTasksLoader(recentTasksLoader);
recentTasksLoader.setRecentsPanel(mRecentsPanel, mRecentsPanel);
+ mRecentsPanel.setMinSwipeAlpha(
+ getResources().getInteger(R.integer.config_recent_item_min_alpha) / 100f);
handleIntent(getIntent());
mIntentFilter = new IntentFilter();
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 31bc8a0..8cdc51ae 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -510,19 +510,6 @@
return lp;
}
- /*
- protected void updateRecentsPanel() {
- super.updateRecentsPanel(R.layout.status_bar_recent_panel);
- // Make .03 alpha the minimum so you always see the item a bit-- slightly below
- // .03, the item disappears entirely (as if alpha = 0) and that discontinuity looks
- // a bit jarring
- mRecentsPanel.setMinSwipeAlpha(0.03f);
- if (mNavigationBarView != null) {
- mNavigationBarView.getRecentsButton().setOnTouchListener(mRecentsPanel);
- }
- }
- */
-
@Override
protected void updateSearchPanel() {
super.updateSearchPanel();