Merge "Set ACTION_REQUEST_SET_AUTOFILL_SERVICE to route to DefaultCombinedActivity" into main
This commit is contained in:
@@ -18,10 +18,10 @@ import android.os.Bundle;
|
|||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.SettingsActivity;
|
import com.android.settings.SettingsActivity;
|
||||||
import com.android.settings.applications.defaultapps.DefaultAutofillPicker;
|
import com.android.settings.applications.credentials.DefaultCombinedPicker;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standalone activity used to launch a {@link DefaultAutofillPicker} fragment from a
|
* Standalone activity used to launch a {@link DefaultCombinedPicker} fragment from a
|
||||||
* {@link android.provider.Settings#ACTION_REQUEST_SET_AUTOFILL_SERVICE} intent.
|
* {@link android.provider.Settings#ACTION_REQUEST_SET_AUTOFILL_SERVICE} intent.
|
||||||
*/
|
*/
|
||||||
public class AutofillPickerActivity extends SettingsActivity {
|
public class AutofillPickerActivity extends SettingsActivity {
|
||||||
@@ -30,15 +30,15 @@ public class AutofillPickerActivity extends SettingsActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
final Intent intent = getIntent();
|
final Intent intent = getIntent();
|
||||||
final String packageName = intent.getData().getSchemeSpecificPart();
|
final String packageName = intent.getData().getSchemeSpecificPart();
|
||||||
intent.putExtra(EXTRA_SHOW_FRAGMENT, DefaultAutofillPicker.class.getName());
|
intent.putExtra(EXTRA_SHOW_FRAGMENT, DefaultCombinedPicker.class.getName());
|
||||||
intent.putExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, R.string.autofill_app);
|
intent.putExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, R.string.credman_picker_title);
|
||||||
intent.putExtra(DefaultAutofillPicker.EXTRA_PACKAGE_NAME, packageName);
|
intent.putExtra(DefaultCombinedPicker.EXTRA_PACKAGE_NAME, packageName);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isValidFragment(String fragmentName) {
|
protected boolean isValidFragment(String fragmentName) {
|
||||||
return super.isValidFragment(fragmentName)
|
return super.isValidFragment(fragmentName)
|
||||||
|| DefaultAutofillPicker.class.getName().equals(fragmentName);
|
|| DefaultCombinedPicker.class.getName().equals(fragmentName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -18,11 +18,10 @@ import android.content.ComponentName;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.autofill.AutofillManager;
|
import android.view.autofill.AutofillManager;
|
||||||
|
import com.android.settings.applications.credentials.DefaultCombinedPicker;
|
||||||
import com.android.settings.applications.defaultapps.DefaultAutofillPicker;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standalone activity used to launch a {@link DefaultAutofillPicker} fragment from a
|
* Standalone activity used to launch a {@link DefaultCombinedPicker} fragment from a
|
||||||
* {@link android.provider.Settings#ACTION_REQUEST_SET_AUTOFILL_SERVICE} intent.
|
* {@link android.provider.Settings#ACTION_REQUEST_SET_AUTOFILL_SERVICE} intent.
|
||||||
*
|
*
|
||||||
* <p>It first check for cases that can fail fast, then forward to {@link AutofillPickerActivity}
|
* <p>It first check for cases that can fail fast, then forward to {@link AutofillPickerActivity}
|
||||||
|
Reference in New Issue
Block a user