Add strings for bullet permissions
Also add call logs permission icon Bug: 253644212 Test: CTS Change-Id: Id9dc013e27e9e5db5825481601f7af3f690e2f1e
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2022 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:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@android:color/system_accent1_200">
|
||||
<path android:pathData="M16.01 14.48L13.39 17.1C10.64 15.61 8.38 13.35 6.89 10.6L9.51 7.98C9.75 7.74 9.85 7.4 9.78 7.08L9.13 3.82C9.04 3.35 8.63 3.02 8.15 3.02L4 3.01c-0.56 0 -1.03 0.47 -1 1.03 0.17 2.91 1.04 5.63 2.43 8.01 1.57 2.69 3.81 4.93 6.5 6.5 2.38 1.39 5.1 2.26 8.01 2.43 0.56 0.03 1.03 -0.44 1.03 -1l0 -4.15c0 -0.48 -0.34 -0.89 -0.8 -0.98L16.91 14.2c-0.33 -0.06 -0.67 0.04 -0.9 0.28z"
|
||||
android:fillColor="#ffffff" />
|
||||
<path android:pathData="M12 8l10 0 0 -2 -10 0 0 2zm0 -4l10 0 0 -2 -10 0 0 2zm10 6l-10 0 0 2 10 0 0 -2z"
|
||||
android:fillColor="#ffffff" />
|
||||
</vector>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2022 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:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@android:color/system_accent1_600">
|
||||
<path android:pathData="M16.01 14.48L13.39 17.1C10.64 15.61 8.38 13.35 6.89 10.6L9.51 7.98C9.75 7.74 9.85 7.4 9.78 7.08L9.13 3.82C9.04 3.35 8.63 3.02 8.15 3.02L4 3.01c-0.56 0 -1.03 0.47 -1 1.03 0.17 2.91 1.04 5.63 2.43 8.01 1.57 2.69 3.81 4.93 6.5 6.5 2.38 1.39 5.1 2.26 8.01 2.43 0.56 0.03 1.03 -0.44 1.03 -1l0 -4.15c0 -0.48 -0.34 -0.89 -0.8 -0.98L16.91 14.2c-0.33 -0.06 -0.67 0.04 -0.9 0.28z"
|
||||
android:fillColor="#ffffff" />
|
||||
<path android:pathData="M12 8l10 0 0 -2 -10 0 0 2zm0 -4l10 0 0 -2 -10 0 0 2zm10 6l-10 0 0 2 10 0 0 -2z"
|
||||
android:fillColor="#ffffff" />
|
||||
</vector>
|
||||
@@ -143,7 +143,10 @@
|
||||
<!-- Microphone permission will be granted to corresponding profile [CHAR LIMIT=30] -->
|
||||
<string name="permission_microphone">Microphone</string>
|
||||
|
||||
<!-- Nearby devices permission will be granted of corresponding profile [CHAR LIMIT=30] -->
|
||||
<!-- Call logs permission will be granted to the corresponding profile [CHAR LIMIT=30] -->
|
||||
<string name="permission_call_logs">Call logs</string>
|
||||
|
||||
<!-- Nearby devices' permission will be granted of corresponding profile [CHAR LIMIT=30] -->
|
||||
<string name="permission_nearby_devices">Nearby devices</string>
|
||||
|
||||
<!-- Storage permission will be granted of corresponding profile [CHAR LIMIT=30] -->
|
||||
@@ -159,26 +162,26 @@
|
||||
<string name="permission_nearby_device_streaming">Nearby Device Streaming</string>
|
||||
|
||||
<!-- Description of phone permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<string name="permission_phone_summary">Can access your phone number and network info. Required for making calls and VoIP, voicemail, call redirect, and editing call logs</string>
|
||||
<string name="permission_phone_summary">Can make and manage phone calls</string>
|
||||
|
||||
<!-- Description of Call logs permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<string name="permission_call_logs_summary">Can read and write phone call log</string>
|
||||
|
||||
<!-- Description of SMS permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<!-- TODO(b/253644212) Need the description for sms permission -->
|
||||
<string name="permission_sms_summary"></string>
|
||||
<string name="permission_sms_summary">Can send and view SMS messages</string>
|
||||
|
||||
<!-- Description of contacts permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<string name="permission_contacts_summary">Can read, create, or edit our contact list, as well as access the list of all accounts used on your device</string>
|
||||
<string name="permission_contacts_summary">Can access your contacts</string>
|
||||
|
||||
<!-- Description of calendar permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<!-- TODO(b/253644212) Need the description for calendar permission -->
|
||||
<string name="permission_calendar_summary"></string>
|
||||
<string name="permission_calendar_summary">Can access your calendar</string>
|
||||
|
||||
<!-- Description of microphone permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<!-- TODO(b/256140614) Need the description for microphone permission -->
|
||||
<string name="permission_microphone_summary">Can record audio using the microphone</string>
|
||||
|
||||
<!-- Description of nearby devices' permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<!-- TODO(b/253644212) Need the description for nearby devices' permission -->
|
||||
<string name="permission_nearby_devices_summary"></string>
|
||||
<string name="permission_nearby_devices_summary">Can find, connect to, and determine the relative position of nearby devices</string>
|
||||
|
||||
<!-- Description of notification permission of corresponding profile [CHAR LIMIT=NONE] -->
|
||||
<string name="permission_notification_summary">Can read all notifications, including information like contacts, messages, and photos</string>
|
||||
|
||||
@@ -25,6 +25,7 @@ import static android.companion.AssociationRequest.DEVICE_PROFILE_WATCH;
|
||||
|
||||
import static com.android.companiondevicemanager.PermissionListAdapter.PERMISSION_APP_STREAMING;
|
||||
import static com.android.companiondevicemanager.PermissionListAdapter.PERMISSION_CALENDAR;
|
||||
import static com.android.companiondevicemanager.PermissionListAdapter.PERMISSION_CALL_LOGS;
|
||||
import static com.android.companiondevicemanager.PermissionListAdapter.PERMISSION_CONTACTS;
|
||||
import static com.android.companiondevicemanager.PermissionListAdapter.PERMISSION_MICROPHONE;
|
||||
import static com.android.companiondevicemanager.PermissionListAdapter.PERMISSION_NEARBY_DEVICES;
|
||||
@@ -73,7 +74,7 @@ final class CompanionDeviceResources {
|
||||
map.put(DEVICE_PROFILE_NEARBY_DEVICE_STREAMING,
|
||||
Arrays.asList(PERMISSION_NEARBY_DEVICE_STREAMING));
|
||||
map.put(DEVICE_PROFILE_WATCH, Arrays.asList(PERMISSION_NOTIFICATION, PERMISSION_PHONE,
|
||||
PERMISSION_SMS, PERMISSION_CONTACTS, PERMISSION_CALENDAR,
|
||||
PERMISSION_CALL_LOGS, PERMISSION_SMS, PERMISSION_CONTACTS, PERMISSION_CALENDAR,
|
||||
PERMISSION_NEARBY_DEVICES));
|
||||
map.put(DEVICE_PROFILE_GLASSES, Arrays.asList(PERMISSION_NOTIFICATION, PERMISSION_PHONE,
|
||||
PERMISSION_SMS, PERMISSION_CONTACTS, PERMISSION_MICROPHONE,
|
||||
@@ -103,7 +104,6 @@ final class CompanionDeviceResources {
|
||||
}
|
||||
|
||||
static final Map<String, Integer> PROFILES_NAME;
|
||||
|
||||
static {
|
||||
final Map<String, Integer> map = new ArrayMap<>();
|
||||
map.put(DEVICE_PROFILE_WATCH, R.string.profile_name_watch);
|
||||
|
||||
@@ -52,6 +52,7 @@ class PermissionListAdapter extends RecyclerView.Adapter<PermissionListAdapter.V
|
||||
static final int PERMISSION_NEARBY_DEVICES = 7;
|
||||
static final int PERMISSION_NEARBY_DEVICE_STREAMING = 8;
|
||||
static final int PERMISSION_MICROPHONE = 9;
|
||||
static final int PERMISSION_CALL_LOGS = 10;
|
||||
|
||||
private static final Map<Integer, Integer> sTitleMap;
|
||||
static {
|
||||
@@ -66,6 +67,7 @@ class PermissionListAdapter extends RecyclerView.Adapter<PermissionListAdapter.V
|
||||
map.put(PERMISSION_NEARBY_DEVICES, R.string.permission_nearby_devices);
|
||||
map.put(PERMISSION_NEARBY_DEVICE_STREAMING, R.string.permission_nearby_device_streaming);
|
||||
map.put(PERMISSION_MICROPHONE, R.string.permission_microphone);
|
||||
map.put(PERMISSION_CALL_LOGS, R.string.permission_call_logs);
|
||||
sTitleMap = unmodifiableMap(map);
|
||||
}
|
||||
|
||||
@@ -83,6 +85,7 @@ class PermissionListAdapter extends RecyclerView.Adapter<PermissionListAdapter.V
|
||||
map.put(PERMISSION_NEARBY_DEVICE_STREAMING,
|
||||
R.string.permission_nearby_device_streaming_summary);
|
||||
map.put(PERMISSION_MICROPHONE, R.string.permission_microphone_summary);
|
||||
map.put(PERMISSION_CALL_LOGS, R.string.permission_call_logs_summary);
|
||||
sSummaryMap = unmodifiableMap(map);
|
||||
}
|
||||
|
||||
@@ -100,6 +103,7 @@ class PermissionListAdapter extends RecyclerView.Adapter<PermissionListAdapter.V
|
||||
map.put(PERMISSION_NEARBY_DEVICE_STREAMING,
|
||||
R.drawable.ic_permission_nearby_device_streaming);
|
||||
map.put(PERMISSION_MICROPHONE, R.drawable.ic_permission_microphone);
|
||||
map.put(PERMISSION_CALL_LOGS, R.drawable.ic_permission_call_logs);
|
||||
sIconMap = unmodifiableMap(map);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user