Warning / Info icon added for the VPN Preference

Within the Provider Model, we would like to show a warning icon if the
user is detected to be using an insecure vpn type. This adds an icon for
that warning, and an imageview containing that layout to settings

Icon: https://screenshot.googleplex.com/644ZsGtVDp6hgZq
Bug: 176821216
Test: atest SettingsUnitTests
Change-Id: I59fd7765876fe58fe2c55929f711c04a45abbe09
Merged-In: I59fd7765876fe58fe2c55929f711c04a45abbe09
(cherry picked from commit a7774a10e0)
This commit is contained in:
Jeremy Goldman
2021-03-12 15:25:10 +08:00
parent 006b8db0b6
commit 8deea775df
3 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="?android:attr/colorError"
android:pathData="M11,15h2v2h-2v-2zM11,7h2v6h-2L11,7zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
</vector>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Warning button -->
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/warning_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:paddingStart="?android:attr/listPreferredItemPaddingEnd"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:background="?android:attr/selectableItemBackground"
android:scaleType="center"
android:src="@drawable/ic_warning_circle_24dp"
android:contentDescription="@string/warning_button_text" />

View File

@@ -7498,6 +7498,8 @@
<string name="help_uri_nfc_and_payment_settings" translatable="false"></string> <string name="help_uri_nfc_and_payment_settings" translatable="false"></string>
<!-- url for battery page if battery is not present --> <!-- url for battery page if battery is not present -->
<string name="help_url_battery_missing" translatable="false"></string> <string name="help_url_battery_missing" translatable="false"></string>
<!-- url for vpn page if connected vpn is not a secure type -->
<string name="help_url_insecure_vpn" translatable="false"></string>
<!-- User account title [CHAR LIMIT=30] --> <!-- User account title [CHAR LIMIT=30] -->
<string name="user_account_title">Account for content</string> <string name="user_account_title">Account for content</string>
@@ -9570,6 +9572,9 @@
settings button --> settings button -->
<string name="notification_app_settings_button">Notification settings</string> <string name="notification_app_settings_button">Notification settings</string>
<!-- Content description for help icon button [CHAR LIMIT=20] -->
<string name="warning_button_text">Warning</string>
<!-- Generic label for suggestion card's ok button [CHAR LIMIT=20] --> <!-- Generic label for suggestion card's ok button [CHAR LIMIT=20] -->
<string name="suggestion_button_text">Ok</string> <string name="suggestion_button_text">Ok</string>