InlineFillService: Implement onSavedDatasetsInfoRequest.
Bug: 169455298 Test: manual Change-Id: I8a2d15350b08fc7fb8673114160cc14f6380c7f4
This commit is contained in:
@@ -26,6 +26,8 @@ import android.service.autofill.InlinePresentation;
|
|||||||
import android.service.autofill.SaveCallback;
|
import android.service.autofill.SaveCallback;
|
||||||
import android.service.autofill.SaveInfo;
|
import android.service.autofill.SaveInfo;
|
||||||
import android.service.autofill.SaveRequest;
|
import android.service.autofill.SaveRequest;
|
||||||
|
import android.service.autofill.SavedDatasetsInfo;
|
||||||
|
import android.service.autofill.SavedDatasetsInfoCallback;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.autofill.AutofillId;
|
import android.view.autofill.AutofillId;
|
||||||
@@ -35,6 +37,7 @@ import android.widget.RemoteViews;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -146,4 +149,11 @@ public class InlineFillService extends AutofillService {
|
|||||||
Helper.showMessage(getApplicationContext(), "InlineFillService doesn't support Save");
|
Helper.showMessage(getApplicationContext(), "InlineFillService doesn't support Save");
|
||||||
callback.onSuccess();
|
callback.onSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSavedDatasetsInfoRequest(@NonNull SavedDatasetsInfoCallback callback) {
|
||||||
|
callback.onSuccess(
|
||||||
|
Collections.singleton(
|
||||||
|
new SavedDatasetsInfo(SavedDatasetsInfo.TYPE_PASSWORDS, NUMBER_DATASETS)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user