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

Commit 9cb94837 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed OneTimeListener so AUTOFILL_SAVE_UI metric is properly saved."

parents 32a8335c 373d49eb
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);
        }