Loading services/autofill/java/com/android/server/autofill/AutofillManagerService.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -144,6 +144,9 @@ public final class AutofillManagerService extends SystemService { final int userId = users.get(i).id; final int userId = users.get(i).id; final boolean disabled = umi.getUserRestriction(userId, UserManager.DISALLOW_AUTOFILL); final boolean disabled = umi.getUserRestriction(userId, UserManager.DISALLOW_AUTOFILL); if (disabled) { if (disabled) { if (disabled) { Slog.i(TAG, "Disabling Autofill for user " + userId); } mDisabledUsers.put(userId, disabled); mDisabledUsers.put(userId, disabled); } } } } Loading @@ -155,11 +158,12 @@ public final class AutofillManagerService extends SystemService { if (disabledBefore == disabledNow) { if (disabledBefore == disabledNow) { // Nothing changed, do nothing. // Nothing changed, do nothing. if (sDebug) { if (sDebug) { Slog.d(TAG, "Restriction not changed for user " + userId + ": " Slog.d(TAG, "Autofill restriction did not change for user " + userId + ": " + bundleToString(newRestrictions)); + bundleToString(newRestrictions)); return; return; } } } } Slog.i(TAG, "Updating Autofill for user " + userId + ": disabled=" + disabledNow); mDisabledUsers.put(userId, disabledNow); mDisabledUsers.put(userId, disabledNow); updateCachedServiceLocked(userId, disabledNow); updateCachedServiceLocked(userId, disabledNow); } } Loading Loading @@ -606,7 +610,7 @@ public final class AutofillManagerService extends SystemService { pw.println("Usage: dumpsys autofill [--ui-only|--no-history]"); pw.println("Usage: dumpsys autofill [--ui-only|--no-history]"); return; return; default: default: throw new IllegalArgumentException("Invalid dump arg: " + arg); Slog.w(TAG, "Ignoring invalid dump arg: " + arg); } } } } } } Loading services/autofill/java/com/android/server/autofill/Session.java +11 −3 Original line number Original line Diff line number Diff line Loading @@ -384,6 +384,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } } } } if (response == null) { if (response == null) { if (sVerbose) Slog.v(TAG, "canceling session " + id + " when server returned null"); if ((requestFlags & FLAG_MANUAL_REQUEST) != 0) { if ((requestFlags & FLAG_MANUAL_REQUEST) != 0) { getUiForShowing().showError(R.string.autofill_error_cannot_autofill, this); getUiForShowing().showError(R.string.autofill_error_cannot_autofill, this); } } Loading Loading @@ -906,7 +907,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState // If it's not, then check if it it should start a partition. // If it's not, then check if it it should start a partition. if (shouldStartNewPartitionLocked(id)) { if (shouldStartNewPartitionLocked(id)) { if (sDebug) Slog.d(TAG, "Starting partition for view id " + id); if (sDebug) { Slog.d(TAG, "Starting partition for view id " + id + ": " + viewState.getStateAsString()); } viewState.setState(ViewState.STATE_STARTED_PARTITION); viewState.setState(ViewState.STATE_STARTED_PARTITION); requestNewFillResponseLocked(flags); requestNewFillResponseLocked(flags); } } Loading Loading @@ -1344,15 +1348,19 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } } void dumpLocked(String prefix, PrintWriter pw) { void dumpLocked(String prefix, PrintWriter pw) { final String prefix2 = prefix + " "; pw.print(prefix); pw.print("id: "); pw.println(id); pw.print(prefix); pw.print("id: "); pw.println(id); pw.print(prefix); pw.print("uid: "); pw.println(uid); pw.print(prefix); pw.print("uid: "); pw.println(uid); pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken); pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken); pw.print(prefix); pw.print("mResponses: "); pw.println(mResponses); pw.print(prefix); pw.print("mResponses: "); pw.println(mResponses.size()); for (int i = 0; i < mResponses.size(); i++) { pw.print(prefix2); pw.print('#'); pw.print(i); pw.print(' '); pw.println(mResponses.valueAt(i)); } pw.print(prefix); pw.print("mCurrentViewId: "); pw.println(mCurrentViewId); pw.print(prefix); pw.print("mCurrentViewId: "); pw.println(mCurrentViewId); pw.print(prefix); pw.print("mViewStates size: "); pw.println(mViewStates.size()); pw.print(prefix); pw.print("mViewStates size: "); pw.println(mViewStates.size()); pw.print(prefix); pw.print("mDestroyed: "); pw.println(mDestroyed); pw.print(prefix); pw.print("mDestroyed: "); pw.println(mDestroyed); pw.print(prefix); pw.print("mIsSaving: "); pw.println(mIsSaving); pw.print(prefix); pw.print("mIsSaving: "); pw.println(mIsSaving); final String prefix2 = prefix + " "; for (Map.Entry<AutofillId, ViewState> entry : mViewStates.entrySet()) { for (Map.Entry<AutofillId, ViewState> entry : mViewStates.entrySet()) { pw.print(prefix); pw.print("State for id "); pw.println(entry.getKey()); pw.print(prefix); pw.print("State for id "); pw.println(entry.getKey()); entry.getValue().dump(prefix2, pw); entry.getValue().dump(prefix2, pw); Loading Loading
services/autofill/java/com/android/server/autofill/AutofillManagerService.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -144,6 +144,9 @@ public final class AutofillManagerService extends SystemService { final int userId = users.get(i).id; final int userId = users.get(i).id; final boolean disabled = umi.getUserRestriction(userId, UserManager.DISALLOW_AUTOFILL); final boolean disabled = umi.getUserRestriction(userId, UserManager.DISALLOW_AUTOFILL); if (disabled) { if (disabled) { if (disabled) { Slog.i(TAG, "Disabling Autofill for user " + userId); } mDisabledUsers.put(userId, disabled); mDisabledUsers.put(userId, disabled); } } } } Loading @@ -155,11 +158,12 @@ public final class AutofillManagerService extends SystemService { if (disabledBefore == disabledNow) { if (disabledBefore == disabledNow) { // Nothing changed, do nothing. // Nothing changed, do nothing. if (sDebug) { if (sDebug) { Slog.d(TAG, "Restriction not changed for user " + userId + ": " Slog.d(TAG, "Autofill restriction did not change for user " + userId + ": " + bundleToString(newRestrictions)); + bundleToString(newRestrictions)); return; return; } } } } Slog.i(TAG, "Updating Autofill for user " + userId + ": disabled=" + disabledNow); mDisabledUsers.put(userId, disabledNow); mDisabledUsers.put(userId, disabledNow); updateCachedServiceLocked(userId, disabledNow); updateCachedServiceLocked(userId, disabledNow); } } Loading Loading @@ -606,7 +610,7 @@ public final class AutofillManagerService extends SystemService { pw.println("Usage: dumpsys autofill [--ui-only|--no-history]"); pw.println("Usage: dumpsys autofill [--ui-only|--no-history]"); return; return; default: default: throw new IllegalArgumentException("Invalid dump arg: " + arg); Slog.w(TAG, "Ignoring invalid dump arg: " + arg); } } } } } } Loading
services/autofill/java/com/android/server/autofill/Session.java +11 −3 Original line number Original line Diff line number Diff line Loading @@ -384,6 +384,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } } } } if (response == null) { if (response == null) { if (sVerbose) Slog.v(TAG, "canceling session " + id + " when server returned null"); if ((requestFlags & FLAG_MANUAL_REQUEST) != 0) { if ((requestFlags & FLAG_MANUAL_REQUEST) != 0) { getUiForShowing().showError(R.string.autofill_error_cannot_autofill, this); getUiForShowing().showError(R.string.autofill_error_cannot_autofill, this); } } Loading Loading @@ -906,7 +907,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState // If it's not, then check if it it should start a partition. // If it's not, then check if it it should start a partition. if (shouldStartNewPartitionLocked(id)) { if (shouldStartNewPartitionLocked(id)) { if (sDebug) Slog.d(TAG, "Starting partition for view id " + id); if (sDebug) { Slog.d(TAG, "Starting partition for view id " + id + ": " + viewState.getStateAsString()); } viewState.setState(ViewState.STATE_STARTED_PARTITION); viewState.setState(ViewState.STATE_STARTED_PARTITION); requestNewFillResponseLocked(flags); requestNewFillResponseLocked(flags); } } Loading Loading @@ -1344,15 +1348,19 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } } void dumpLocked(String prefix, PrintWriter pw) { void dumpLocked(String prefix, PrintWriter pw) { final String prefix2 = prefix + " "; pw.print(prefix); pw.print("id: "); pw.println(id); pw.print(prefix); pw.print("id: "); pw.println(id); pw.print(prefix); pw.print("uid: "); pw.println(uid); pw.print(prefix); pw.print("uid: "); pw.println(uid); pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken); pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken); pw.print(prefix); pw.print("mResponses: "); pw.println(mResponses); pw.print(prefix); pw.print("mResponses: "); pw.println(mResponses.size()); for (int i = 0; i < mResponses.size(); i++) { pw.print(prefix2); pw.print('#'); pw.print(i); pw.print(' '); pw.println(mResponses.valueAt(i)); } pw.print(prefix); pw.print("mCurrentViewId: "); pw.println(mCurrentViewId); pw.print(prefix); pw.print("mCurrentViewId: "); pw.println(mCurrentViewId); pw.print(prefix); pw.print("mViewStates size: "); pw.println(mViewStates.size()); pw.print(prefix); pw.print("mViewStates size: "); pw.println(mViewStates.size()); pw.print(prefix); pw.print("mDestroyed: "); pw.println(mDestroyed); pw.print(prefix); pw.print("mDestroyed: "); pw.println(mDestroyed); pw.print(prefix); pw.print("mIsSaving: "); pw.println(mIsSaving); pw.print(prefix); pw.print("mIsSaving: "); pw.println(mIsSaving); final String prefix2 = prefix + " "; for (Map.Entry<AutofillId, ViewState> entry : mViewStates.entrySet()) { for (Map.Entry<AutofillId, ViewState> entry : mViewStates.entrySet()) { pw.print(prefix); pw.print("State for id "); pw.println(entry.getKey()); pw.print(prefix); pw.print("State for id "); pw.println(entry.getKey()); entry.getValue().dump(prefix2, pw); entry.getValue().dump(prefix2, pw); Loading