InlineFillService: Implement onSavedDatasetsInfoRequest.

Bug: 169455298
Test: manual
Change-Id: I8a2d15350b08fc7fb8673114160cc14f6380c7f4
This commit is contained in:
Ahaan Ugale
2021-03-07 21:29:49 -08:00
parent 24b8e8f996
commit 38ff291ca0

View File

@@ -26,6 +26,8 @@ import android.service.autofill.InlinePresentation;
import android.service.autofill.SaveCallback;
import android.service.autofill.SaveInfo;
import android.service.autofill.SaveRequest;
import android.service.autofill.SavedDatasetsInfo;
import android.service.autofill.SavedDatasetsInfoCallback;
import android.util.ArrayMap;
import android.util.Log;
import android.view.autofill.AutofillId;
@@ -35,6 +37,7 @@ import android.widget.RemoteViews;
import androidx.annotation.NonNull;
import java.util.Collection;
import java.util.Collections;
import java.util.Optional;
/**
@@ -146,4 +149,11 @@ public class InlineFillService extends AutofillService {
Helper.showMessage(getApplicationContext(), "InlineFillService doesn't support Save");
callback.onSuccess();
}
@Override
public void onSavedDatasetsInfoRequest(@NonNull SavedDatasetsInfoCallback callback) {
callback.onSuccess(
Collections.singleton(
new SavedDatasetsInfo(SavedDatasetsInfo.TYPE_PASSWORDS, NUMBER_DATASETS)));
}
}