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

Commit a77d4702 authored by Isaac Katzenelson's avatar Isaac Katzenelson Committed by Android (Google) Code Review
Browse files

Merge "Hide fragements onPause" into jb-mr2-dev

parents 657825ba e2003548
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -354,11 +354,24 @@ public class StopwatchFragment extends DeskClockFragment
        }
        showLaps();
        ((DeskClock)getActivity()).registerPageChangedListener(this);
        // View was hidden in onPause, make sure it is visible now.
        View v = getView();
        if (v != null) {
            getView().setVisibility(View.VISIBLE);
        }
        super.onResume();
    }

    @Override
    public void onPause() {
        // This is called because the lock screen was activated, the window stay
        // active under it and when we unlock the screen, we see the old time for
        // a fraction of a second.
        View v = getView();
        if (v != null) {
            getView().setVisibility(View.INVISIBLE);
        }

        if (mState == Stopwatches.STOPWATCH_RUNNING) {
            stopUpdateThread();
        }
+12 −0
Original line number Diff line number Diff line
@@ -539,6 +539,11 @@ public class TimerFragment extends DeskClockFragment
        }
        mLastVisibleView = null;   // Force a non animation setting of the view
        setPage();
        // View was hidden in onPause, make sure it is visible now.
        View v = getView();
        if (v != null) {
            getView().setVisibility(View.VISIBLE);
        }
    }

    @Override
@@ -552,6 +557,13 @@ public class TimerFragment extends DeskClockFragment
            mAdapter.saveGlobalState ();
        }
        mPrefs.unregisterOnSharedPreferenceChangeListener(this);
        // This is called because the lock screen was activated, the window stay
        // active under it and when we unlock the screen, we see the old time for
        // a fraction of a second.
        View v = getView();
        if (v != null) {
            getView().setVisibility(View.INVISIBLE);
        }
    }

    @Override