Also removed obsolete 'cmd autofill save'
Bug:
2153814
Test: manual verification
Change-Id: I082e6bb098e9be5d9e26d0941efcf6f28ab01e1d
public static final int IMPORTANT_FOR_AUTOFILL_YES = 0x1;
/**
- * The view is not important for autofill, and its children (if any) will be traversed.
+ * The view is not important for autofill, but its children (if any) will be traversed.
*/
public static final int IMPORTANT_FOR_AUTOFILL_NO = 0x2;
return view;
}
- private boolean hasAutofillFeature() {
+ /** @hide */
+ public boolean hasAutofillFeature() {
return mService != null;
}
}
// Called by Shell command.
- void requestSaveForUser(int userId) {
- Slog.i(TAG, "requestSaveForUser(): " + userId);
- mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
- final IBinder activityToken = getTopActivityForUser();
- if (activityToken != null) {
- synchronized (mLock) {
- final AutofillManagerServiceImpl service = peekServiceForUserLocked(userId);
- if (service == null) {
- Log.w(TAG, "handleSaveForUser(): no cached service for userId " + userId);
- return;
- }
-
- service.requestSaveForUserLocked(activityToken);
- }
- }
- }
-
- // Called by Shell command.
void destroySessions(int userId, IResultReceiver receiver) {
Slog.i(TAG, "destroySessions() for userId " + userId);
mContext.enforceCallingPermission(MANAGE_AUTO_FILL, TAG);
}
final PrintWriter pw = getOutPrintWriter();
switch (cmd) {
- case "save":
- return requestSave();
case "list":
return requestList(pw);
case "destroy":
pw.println(" destroy sessions [--user USER_ID]");
pw.println(" Destroy all pending sessions.");
pw.println("");
- pw.println(" save [--user USER_ID]");
- pw.println(" Request provider to save contents of the top activity.");
- pw.println("");
pw.println(" reset");
pw.println(" Reset all pending sessions and cached service connections.");
pw.println("");
}
}
- private int requestSave() {
- final int userId = getUserIdFromArgsOrCurrentUser();
- mService.requestSaveForUser(userId);
- return 0;
- }
-
private int requestDestroy(PrintWriter pw) {
if (!isNextArgSessions(pw)) {
return -1;