Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5f8ba69 authored by Becca Hughes's avatar Becca Hughes
Browse files

Add settings intent dialog

Add a dialog that can be launched via
an intent to prompt the user to enable
the provider for credman.

Test: make & atest & manual
Bug: 267816998
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9d74509888b7dd65b287bc68b9445d9e23809cce)
Merged-In: Id88cc7b3bf2829d075fbba87ea5dc0a245b9ae32

Change-Id: Id88cc7b3bf2829d075fbba87ea5dc0a245b9ae32
parent 40019f87
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4200,6 +4200,12 @@
                <action android:name="android.settings.SYNC_SETTINGS" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="package" />
            </intent-filter>
            <intent-filter android:priority="1">
                <action android:name="android.settings.CREDENTIAL_PROVIDER" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="package" />
            </intent-filter>
            <intent-filter android:priority="53">
                <action android:name="android.intent.action.MAIN" />
+9 −0
Original line number Diff line number Diff line
@@ -10229,6 +10229,15 @@
    <!-- Message of the warning dialog for disabling the credential provider. [CHAR_LIMIT=NONE] -->
    <string name="credman_confirmation_message">Saved info like addresses or payment methods won\'t be filled in when you sign in. To keep your saved info filled in, set enable a password, passkey and data/or service.</string>
    <!-- Title of the warning dialog for enabling the credential provider. [CHAR_LIMIT=NONE] -->
    <string name="credman_enable_confirmation_message_title">Turn on %1$s\?</string>
    <!-- Message of the warning dialog for enabling the credential provider. [CHAR_LIMIT=NONE] -->
    <string name="credman_enable_confirmation_message">Saved info like addresses or payment methods will be shared with this provider.</string>
    <!-- Positive button to turn on credential manager provider (confirmation). [CHAR LIMIT=60] -->
    <string name="credman_enable_confirmation_message_positive_button">Turn on</string>
    <!-- Title of the error dialog when too many credential providers are selected. [CHAR_LIMIT=NONE] -->
    <string name="credman_error_message_title">Passwords, passkeys and data services limit</string>
+3 −1
Original line number Diff line number Diff line
@@ -75,7 +75,9 @@ public class AccountDashboardFragment extends DashboardFragment {
        if (CredentialManager.isServiceEnabled(context)) {
            CredentialManagerPreferenceController cmpp =
                    use(CredentialManagerPreferenceController.class);
            cmpp.init(this, getFragmentManager());
            CredentialManagerPreferenceController.Delegate delegate =
                result -> getActivity().setResult(result);
            cmpp.init(this, getFragmentManager(), getIntent(), delegate);
        } else {
            getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class));
        }
+3 −1
Original line number Diff line number Diff line
@@ -69,7 +69,9 @@ public class AccountPersonalDashboardFragment extends DashboardFragment {
        if (CredentialManager.isServiceEnabled(context)) {
            CredentialManagerPreferenceController cmpp =
                    use(CredentialManagerPreferenceController.class);
            cmpp.init(this, getFragmentManager());
            CredentialManagerPreferenceController.Delegate delegate =
                result -> getActivity().setResult(result);
            cmpp.init(this, getFragmentManager(), getIntent(), delegate);
        } else {
            getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class));
        }
+3 −1
Original line number Diff line number Diff line
@@ -69,7 +69,9 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment {
        if (CredentialManager.isServiceEnabled(context)) {
            CredentialManagerPreferenceController cmpp =
                    use(CredentialManagerPreferenceController.class);
            cmpp.init(this, getFragmentManager());
            CredentialManagerPreferenceController.Delegate delegate =
                result -> getActivity().setResult(result);
            cmpp.init(this, getFragmentManager(), getIntent(), delegate);
        } else {
            getSettingsLifecycle().addObserver(use(PasswordsPreferenceController.class));
        }
Loading