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

Commit 90f3876f authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Fixed OneTimeListener so AUTOFILL_SAVE_UI metric is properly saved." into pi-dev

am: 14c6b42b

Change-Id: I0e6d4cfdb68c4915607bd65d408d8c2caed27dfb
parents 794d736b 14c6b42b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -81,6 +81,13 @@ final class SaveUi {
        void onDestroy();
    }

    /**
     * Wrapper that guarantees that only one callback is triggered by ignoring further calls after
     * it's destroyed.
     *
     * <p>It's needed becase {@link #onCancel(IntentSender)} is always called when the Save UI
     * dialog is dismissed.
     */
    private class OneTimeListener implements OnSaveListener {

        private final OnSaveListener mRealListener;
@@ -96,7 +103,6 @@ final class SaveUi {
            if (mDone) {
                return;
            }
            mDone = true;
            mRealListener.onSave();
        }

@@ -106,7 +112,6 @@ final class SaveUi {
            if (mDone) {
                return;
            }
            mDone = true;
            mRealListener.onCancel(listener);
        }