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

This commit is contained in:
TreeHugger Robot
2017-08-17 03:07:02 +00:00
committed by Android (Google) Code Review
5 changed files with 1 additions and 44 deletions

View File

@@ -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);

View File

@@ -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.
*/

View File

@@ -49,5 +49,4 @@ interface IAutoFillManager {
void disableOwnedAutofillServices(int userId);
boolean isServiceSupported(int userId);
boolean isServiceEnabled(int userId, String packageName);
void dismissUi();
}

View File

@@ -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;

View File

@@ -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;