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

Commit a571c371 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[ADI][69/N] Add Learn More link with relevant URL" into main

parents 163f2715 0f5847a5
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -151,10 +151,13 @@
    <!-- Message presented in a dialog box when the verifier blocked an app from being installed. [CHAR LIMIT=none]-->
    <string name="cannot_install_app_blocked_summary">&lt;p>This app was blocked. To help keep your
        device and data safe, only apps from verified developers can be installed.&lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>
    <!-- Message presented in a dialog box when the verifier blocked an app from being updated. [CHAR LIMIT=none]-->
    <string name="cannot_update_app_blocked_summary">&lt;p>This app was not updated. To help keep your
        device and data safe, only updates from verified developers can be installed.&lt;/p>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a>
    </string>
    <!-- Message presented in a dialog box when verification failed due to problems with the network during installation. [CHAR LIMIT=none]-->
    <string name="cannot_install_verification_no_internet_summary">&lt;p>This app was not installed.
@@ -162,35 +165,41 @@
        &lt;p>An internet connection is required to verify the app developer.
            Check your connection, then try installing again.
        &lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>
    <!-- Message presented in a dialog box when verification failed due to problems with the network during update. [CHAR LIMIT=none]-->
    <string name="cannot_update_verification_no_internet_summary">&lt;p>This app was not updated.
        Updates from unverified developers may be unsafe.&lt;/p>
        &lt;p>An internet connection is required to verify the app developer.
            Check your connection, then try updating again.
        &lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>

    <!-- Message presented in a dialog box when verification failed due to internal failures during installation. [CHAR LIMIT=none]-->
    <string name="cannot_install_verification_unavailable_summary">&lt;p>There was a problem verifying
        this app\'s developer. Apps from unverified developers may be unsafe,
        so the app was not installed.&lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>
    <!-- Message presented in a dialog box when verification failed due to problems with the network during update. [CHAR LIMIT=none]-->
    <string name="cannot_update_verification_unavailable_summary">&lt;p>There was a problem verifying
        this app\'s developer. Updates from unverified developers may be unsafe,
        so the app was not updated.&lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>
    <!-- Message presented in a dialog box when verification failed due to internal failures during installation for fail closed policy. [CHAR LIMIT=none]-->
    <string name="cannot_install_verification_unavailable_fail_closed_summary">&lt;p>This app was blocked
        because there was a problem verifying the developer. To help keep your device and data safe,
        only apps from verified developers can be installed.&lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>
    <!-- Message presented in a dialog box when verification failed due to internal failures during update for fail closed policy. [CHAR LIMIT=none]-->
    <string name="cannot_update_verification_unavailable_fail_closed_summary">&lt;p>This app was not updated
        because there was a problem verifying the developer. To help keep your device and data safe,
        only updates from verified developers can be installed.&lt;/p>
    </string>
        &lt;a href="https://g.co/android/developer">Learn more about developer
        verification&lt;/a></string>

    <string name="more_details_expanded_install_summary">If you install without verifying, keep in
        mind apps from unverified developers may put your device and data at risk.</string>
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.content.pm.ResolveInfo;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.View;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -204,6 +205,9 @@ public class InstallationFragment extends DialogFragment {
        mCustomViewPanel.setPadding(paddingHorizontal, paddingTop,
                paddingHorizontal, paddingBottom);

        // Reset the movement method to avoid unexpected issue
        mCustomMessageTextView.setMovementMethod(null);

        switch (installStage.getStageCode()) {
            case InstallStage.STAGE_ABORTED -> {
                updateInstallAbortedUI(mDialog, (InstallAborted) installStage);
@@ -713,6 +717,7 @@ public class InstallationFragment extends DialogFragment {
        dialog.setTitle(titleResId);
        mCustomMessageTextView.setText(
                Html.fromHtml(getString(msgResId), Html.FROM_HTML_MODE_LEGACY));
        mCustomMessageTextView.setMovementMethod(LinkMovementMethod.getInstance());

        // Set negative button
        Button negativeButton = UiUtil.getAlertDialogNegativeButton(dialog);
@@ -763,6 +768,7 @@ public class InstallationFragment extends DialogFragment {
        dialog.setTitle(titleResId);
        mCustomMessageTextView.setText(
                Html.fromHtml(getString(msgResId), Html.FROM_HTML_MODE_LEGACY));
        mCustomMessageTextView.setMovementMethod(LinkMovementMethod.getInstance());

        // Set negative button
        Button negativeButton = UiUtil.getAlertDialogNegativeButton(dialog);