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

Commit 8e49d1bb authored by Tsung-Mao Fang's avatar Tsung-Mao Fang
Browse files

USB: add help link config flag from Settings

Note: This cl is copied from the aosp/1783637 since
merge conflict issue.

Move the flag for the indication of the validity of help links to
the framework, as it is required here as well.

Set the visibility of help text in SystemUI for USB contamination
under this newly introduced flag.

Bug: 195448626
Test: adb shell dumpsys usb add-port "matrix" ufp
adb shell dumpsys usb set-contaminant-status "matrix" true

Change-Id: I50b7b447616f6b84fa170091c4e4a9dbf7ce6e45
parent 63706247
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5557,4 +5557,7 @@

    <!-- Determines whether SafetyCenter feature is enabled. -->
    <bool name="config_enableSafetyCenter">true</bool>

    <!-- Flag indicating if help links for Settings app should be enabled. -->
    <bool name="config_settingsHelpLinksEnabled">false</bool>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -2338,6 +2338,7 @@
  <java-symbol type="string" name="nas_upgrade_notification_disable_action" />
  <java-symbol type="string" name="nas_upgrade_notification_learn_more_action" />
  <java-symbol type="string" name="nas_upgrade_notification_learn_more_content" />
  <java-symbol type="bool" name="config_settingsHelpLinksEnabled" />

  <!-- ImfTest -->
  <java-symbol type="layout" name="auto_complete_list" />
+2 −1
Original line number Diff line number Diff line
@@ -63,7 +63,8 @@

        <TextView
            android:id="@+id/learnMore"
            style="@style/USBContaminant.UserAction" />
            style="@style/USBContaminant.UserAction"
            android:visibility="gone" />

        <View
            android:layout_width="match_parent"
+4 −0
Original line number Diff line number Diff line
@@ -70,6 +70,10 @@ public class UsbContaminantActivity extends Activity implements View.OnClickList
        mEnableUsb.setText(getString(R.string.usb_disable_contaminant_detection));
        mGotIt.setText(getString(R.string.got_it));
        mLearnMore.setText(getString(R.string.learn_more));
        if (getResources().getBoolean(
                com.android.internal.R.bool.config_settingsHelpLinksEnabled)) {
            mLearnMore.setVisibility(View.VISIBLE);
        }

        mEnableUsb.setOnClickListener(this);
        mGotIt.setOnClickListener(this);