OSDN Git Service

Eleven: Fix equalizer not pausing, action bar hiding and 1px equalizer on xxhdpi
authorlinus_lee <llee@cyngn.com>
Mon, 5 Jan 2015 22:01:36 +0000 (14:01 -0800)
committerlinus_lee <llee@cyngn.com>
Mon, 5 Jan 2015 22:01:36 +0000 (14:01 -0800)
1) Equalizer was not pausing because HomeActivity onSlide wasn't calling super.onSlide
2) Action bar hiding - the hiding/showing of the action bar was ripped out in materialize but was
missing in one spot so in some sceanrios we were hiding it and never showing it again
3) the 1px equalizer fuzz was really bothering me especially since it showed while paused

Change-Id: I47475e3ea724fa460125c753fb64ec2dd7f095d5

res/values-xxhdpi/equalizer_config.xml
src/com/cyanogenmod/eleven/ui/activities/HomeActivity.java
src/com/cyanogenmod/eleven/ui/activities/SlidingPanelActivity.java

index 63c0e1b..59aca03 100644 (file)
@@ -28,5 +28,5 @@
     <!-- fudge factors to tweak display for various configs
         ends up being dB = ((dB * fuzz_factor) + db_fuzz) -->
     <integer name="equalizer_db_fuzz_factor">35</integer>
-    <integer name="equalizer_db_fuzz">1</integer>
+    <integer name="equalizer_db_fuzz">0</integer>
 </resources>
\ No newline at end of file
index 6db3675..f3a796a 100644 (file)
@@ -164,6 +164,8 @@ public class HomeActivity extends SlidingPanelActivity {
 
     @Override
     protected void onSlide(float slideOffset) {
+        super.onSlide(slideOffset);
+
         boolean isInBrowser = getCurrentPanel() == Panel.Browse && slideOffset < 0.7f;
         if (isInBrowser != mBrowsePanelActive) {
             mBrowsePanelActive = isInBrowser;
index 5da768f..2a3665d 100644 (file)
@@ -171,27 +171,6 @@ public abstract class SlidingPanelActivity extends BaseActivity {
         super.onPause();
     }
 
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        // This is extremely hard to repro but after leaving the app for a long time and coming
-        // back to the app, the action bar can be out of sync with the panel we are looking at -
-        // this will resync the panels
-        if (mTargetNavigatePanel == Panel.None) {
-            switch (getCurrentPanel()) {
-                case Queue:
-                case MusicPlayer:
-                    getActionBar().hide();
-                    break;
-                case Browse:
-                default:
-                    getActionBar().show();
-                    break;
-            }
-        }
-    }
-
     /**
      * {@inheritDoc}
      */