Merge "USB: add help link config flag from Settings"

This commit is contained in:
TreeHugger Robot
2022-01-13 08:38:42 +00:00
committed by Android (Google) Code Review
4 changed files with 10 additions and 1 deletions

View File

@@ -5567,4 +5567,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>

View File

@@ -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" />

View File

@@ -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"

View File

@@ -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);