summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Felipe Leme <felipeal@google.com> 2017-06-22 03:16:42 +0000
committer android-build-merger <android-build-merger@google.com> 2017-06-22 03:16:42 +0000
commit95e074dab3aa34195c9b67bf259e554fb6564f13 (patch)
tree1fe689fd506fa466c04cf387a03e7eb4efe6f371
parent5d45ac6e68d87c59aeb18bda2922cb2db1a61ab8 (diff)
parent6358cdcd28ab3b76d640541abc93b19a28114226 (diff)
Merge "Autofill fixes for secondary users:" into oc-dev
am: 6358cdcd28 Change-Id: I57f715b886515d53c25104b9952597a961fb3ca2
-rw-r--r--services/autofill/java/com/android/server/autofill/AutofillManagerService.java6
-rw-r--r--services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java3
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/SaveUi.java1
3 files changed, 8 insertions, 2 deletions
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
index e85f96be3160..cb91f9308b03 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
@@ -270,6 +270,12 @@ public final class AutofillManagerService extends SystemService {
}
@Override
+ public void onSwitchUser(int userHandle) {
+ if (sDebug) Slog.d(TAG, "Hiding UI when user switched");
+ mUi.hideAll(null);
+ }
+
+ @Override
public void onCleanupUser(int userId) {
synchronized (mLock) {
removeCachedServiceLocked(userId);
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
index 1a02e8d8eb97..751c0547afd6 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
@@ -360,8 +360,7 @@ final class AutofillManagerServiceImpl {
}
void disableOwnedAutofillServicesLocked(int uid) {
- if (mInfo == null || mInfo.getServiceInfo().applicationInfo.uid
- != UserHandle.getAppId(uid)) {
+ if (mInfo == null || mInfo.getServiceInfo().applicationInfo.uid != uid) {
return;
}
final long identity = Binder.clearCallingIdentity();
diff --git a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
index d1fbbf9ceda1..c9e2a928dee0 100644
--- a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
@@ -191,6 +191,7 @@ final class SaveUi {
| WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);
+ window.addPrivateFlags(WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS);
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
window.setGravity(Gravity.BOTTOM | Gravity.CENTER);
window.setCloseOnTouchOutside(true);