Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ff35e31 authored by linus_lee's avatar linus_lee
Browse files

Eleven: Fix equalizer not pausing, action bar hiding and 1px equalizer on xxhdpi

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
parent 6a7b8d8f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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;
+0 −21
Original line number Diff line number Diff line
@@ -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}
     */