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

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

Merge "Revert "Dismiss Autofill Save UI when a new Activity is launched."" into oc-mr1-dev

parents f2a70fc1 cf1ff6ca
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -1006,11 +1006,6 @@ public class Activity extends ContextThemeWrapper
            Parcelable p = savedInstanceState.getParcelable(FRAGMENTS_TAG);
            mFragments.restoreAllState(p, mLastNonConfigurationInstances != null
                    ? mLastNonConfigurationInstances.fragments : null);
        } else {
            AutofillManager afm = getAutofillManager();
            if (afm != null) {
                afm.dismissUi();
            }
        }
        mFragments.dispatchCreate();
        getApplication().dispatchActivityCreated(this, savedInstanceState);
+0 −19
Original line number Diff line number Diff line
@@ -1338,25 +1338,6 @@ public final class AutofillManager {
        client.runOnUiThread(runnable);
    }

    /**
     * Dismiss the Autofill UI, even if associated with other sessions.
     *
     * <p>Typically called when a new activity starts so it can hide the existing Save UI (if any).
     *
     * @hide
     */
    public void dismissUi() {
        if (sVerbose) Log.v(TAG, "dismissUi()");

        if (mService == null) return;

        try {
            mService.dismissUi();
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
    }

    /**
     * View tracking information. Once all tracked views become invisible the session is finished.
     */
+0 −1
Original line number Diff line number Diff line
@@ -49,5 +49,4 @@ interface IAutoFillManager {
    void disableOwnedAutofillServices(int userId);
    boolean isServiceSupported(int userId);
    boolean isServiceEnabled(int userId, String packageName);
    void dismissUi();
}
+0 −13
Original line number Diff line number Diff line
@@ -654,19 +654,6 @@ public final class AutofillManagerService extends SystemService {
            }
        }

        @Override
        public void dismissUi() {
            final UserHandle user = getCallingUserHandle();

            synchronized (mLock) {
                final AutofillManagerServiceImpl service = peekServiceForUserLocked(
                        user.getIdentifier());
                if (service != null) {
                    service.dismissUi();
                }
            }
        }

        @Override
        public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
+1 −6
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import android.os.IBinder;
import android.os.Looper;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.service.autofill.AutofillService;
@@ -634,12 +635,6 @@ final class AutofillManagerServiceImpl {
        }
    }

    void dismissUi() {
        if (sVerbose) Slog.v(TAG, "dismissUi()");

        mUi.hideAll(null);
    }

    private void sendStateToClients(boolean resetClient) {
        final RemoteCallbackList<IAutoFillManagerClient> clients;
        final int userClientCount;