Merge "Fix CDM dialog for accessibility" into tm-dev
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
android:launchMode="singleInstance"
|
||||
android:excludeFromRecents="true"
|
||||
android:permission="android.permission.BIND_COMPANION_DEVICE_MANAGER_SERVICE"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:theme="@style/ChooserActivity"/>
|
||||
|
||||
<service
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
~ 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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@android:color/system_accent1_200">
|
||||
<path
|
||||
android:pathData="M6.2529,18.5H16.2529V17.5H18.2529V21.5C18.2529,22.6 17.3529,23.5 16.2529,23.5H6.2529C5.1529,23.5 4.2529,22.6 4.2529,21.5V3.5C4.2529,2.4 5.1529,1.51 6.2529,1.51L16.2529,1.5C17.3529,1.5 18.2529,2.4 18.2529,3.5V7.5H16.2529V6.5H6.2529V18.5ZM16.2529,3.5H6.2529V4.5H16.2529V3.5ZM6.2529,21.5V20.5H16.2529V21.5H6.2529ZM12.6553,9.4049C12.6553,8.8526 13.103,8.4049 13.6553,8.4049H20.5254C21.0776,8.4049 21.5254,8.8526 21.5254,9.4049V14.6055C21.5254,15.1578 21.0776,15.6055 20.5254,15.6055H14.355L12.6553,17.0871V9.4049Z"
|
||||
android:fillColor="#3C4043"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
~ 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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@android:color/system_accent1_200">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M11,17H13V11H11ZM12,9Q12.425,9 12.713,8.712Q13,8.425 13,8Q13,7.575 12.713,7.287Q12.425,7 12,7Q11.575,7 11.288,7.287Q11,7.575 11,8Q11,8.425 11.288,8.712Q11.575,9 12,9ZM12,22Q9.925,22 8.1,21.212Q6.275,20.425 4.925,19.075Q3.575,17.725 2.788,15.9Q2,14.075 2,12Q2,9.925 2.788,8.1Q3.575,6.275 4.925,4.925Q6.275,3.575 8.1,2.787Q9.925,2 12,2Q14.075,2 15.9,2.787Q17.725,3.575 19.075,4.925Q20.425,6.275 21.212,8.1Q22,9.925 22,12Q22,14.075 21.212,15.9Q20.425,17.725 19.075,19.075Q17.725,20.425 15.9,21.212Q14.075,22 12,22ZM12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12ZM12,20Q15.325,20 17.663,17.663Q20,15.325 20,12Q20,8.675 17.663,6.337Q15.325,4 12,4Q8.675,4 6.338,6.337Q4,8.675 4,12Q4,15.325 6.338,17.663Q8.675,20 12,20Z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@android:color/system_accent1_200">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M4,19V17H6V10Q6,7.925 7.25,6.312Q8.5,4.7 10.5,4.2V3.5Q10.5,2.875 10.938,2.438Q11.375,2 12,2Q12.625,2 13.062,2.438Q13.5,2.875 13.5,3.5V4.2Q15.5,4.7 16.75,6.312Q18,7.925 18,10V17H20V19ZM12,11.5Q12,11.5 12,11.5Q12,11.5 12,11.5Q12,11.5 12,11.5Q12,11.5 12,11.5ZM12,22Q11.175,22 10.588,21.413Q10,20.825 10,20H14Q14,20.825 13.413,21.413Q12.825,22 12,22ZM8,17H16V10Q16,8.35 14.825,7.175Q13.65,6 12,6Q10.35,6 9.175,7.175Q8,8.35 8,10Z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
~ 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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="@android:color/system_accent1_200">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M6,17H18L14.25,12L11.25,16L9,13ZM5,21Q4.175,21 3.587,20.413Q3,19.825 3,19V5Q3,4.175 3.587,3.587Q4.175,3 5,3H19Q19.825,3 20.413,3.587Q21,4.175 21,5V19Q21,19.825 20.413,20.413Q19.825,21 19,21ZM5,19H19Q19,19 19,19Q19,19 19,19V5Q19,5 19,5Q19,5 19,5H5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19ZM5,5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19Q5,19 5,19Q5,19 5,19V5Q5,5 5,5Q5,5 5,5Z"/>
|
||||
</vector>
|
||||
@@ -18,6 +18,6 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/system_accent1_100"/>
|
||||
<corners android:topLeftRadius="16dp" android:topRightRadius="16dp"
|
||||
android:bottomLeftRadius="16dp" android:bottomRightRadius="16dp"/>
|
||||
<corners android:topLeftRadius="20dp" android:topRightRadius="20dp"
|
||||
android:bottomLeftRadius="20dp" android:bottomRightRadius="20dp"/>
|
||||
</shape>
|
||||
@@ -19,7 +19,8 @@
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
android:viewportHeight="24"
|
||||
android:tint="@android:color/system_accent1_600">
|
||||
<path
|
||||
android:pathData="M6.2529,18.5H16.2529V17.5H18.2529V21.5C18.2529,22.6 17.3529,23.5 16.2529,23.5H6.2529C5.1529,23.5 4.2529,22.6 4.2529,21.5V3.5C4.2529,2.4 5.1529,1.51 6.2529,1.51L16.2529,1.5C17.3529,1.5 18.2529,2.4 18.2529,3.5V7.5H16.2529V6.5H6.2529V18.5ZM16.2529,3.5H6.2529V4.5H16.2529V3.5ZM6.2529,21.5V20.5H16.2529V21.5H6.2529ZM12.6553,9.4049C12.6553,8.8526 13.103,8.4049 13.6553,8.4049H20.5254C21.0776,8.4049 21.5254,8.8526 21.5254,9.4049V14.6055C21.5254,15.1578 21.0776,15.6055 20.5254,15.6055H14.355L12.6553,17.0871V9.4049Z"
|
||||
android:fillColor="#3C4043"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:tint="@android:color/system_accent1_600">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M4,19V17H6V10Q6,7.925 7.25,6.312Q8.5,4.7 10.5,4.2V3.5Q10.5,2.875 10.938,2.438Q11.375,2 12,2Q12.625,2 13.062,2.438Q13.5,2.875 13.5,3.5V4.2Q15.5,4.7 16.75,6.312Q18,7.925 18,10V17H20V19ZM12,11.5Q12,11.5 12,11.5Q12,11.5 12,11.5Q12,11.5 12,11.5Q12,11.5 12,11.5ZM12,22Q11.175,22 10.588,21.413Q10,20.825 10,20H14Q14,20.825 13.413,21.413Q12.825,22 12,22ZM8,17H16V10Q16,8.35 14.825,7.175Q13.65,6 12,6Q10.35,6 9.175,7.175Q8,8.35 8,10Z"/>
|
||||
</vector>
|
||||
@@ -20,7 +20,7 @@
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
android:tint="@android:color/system_accent1_600">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M6,17H18L14.25,12L11.25,16L9,13ZM5,21Q4.175,21 3.587,20.413Q3,19.825 3,19V5Q3,4.175 3.587,3.587Q4.175,3 5,3H19Q19.825,3 20.413,3.587Q21,4.175 21,5V19Q21,19.825 20.413,20.413Q19.825,21 19,21ZM5,19H19Q19,19 19,19Q19,19 19,19V5Q19,5 19,5Q19,5 19,5H5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19ZM5,5Q5,5 5,5Q5,5 5,5V19Q5,19 5,19Q5,19 5,19Q5,19 5,19Q5,19 5,19V5Q5,5 5,5Q5,5 5,5Z"/>
|
||||
</vector>
|
||||
@@ -12,135 +12,142 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_confirmation"
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:minWidth="340dp">
|
||||
android:layout_height="match_parent"
|
||||
style="@style/ScrollViewStyle">
|
||||
|
||||
<LinearLayout android:id="@+id/association_confirmation"
|
||||
style="@style/ContainerLayout">
|
||||
|
||||
<!-- A header for selfManaged devices only. -->
|
||||
<include layout="@layout/vendor_header" />
|
||||
|
||||
<!-- Do NOT change the ID of the root LinearLayout above: it's referenced in CTS tests. -->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/profile_icon"
|
||||
<LinearLayout
|
||||
android:id="@+id/activity_confirmation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="18dp"
|
||||
android:tint="@android:color/system_accent1_600"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false">
|
||||
|
||||
<LinearLayout style="@style/Description">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/DescriptionTitle" />
|
||||
<LinearLayout android:id="@+id/association_confirmation"
|
||||
style="@style/ContainerLayout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summary"
|
||||
style="@style/DescriptionSummary" />
|
||||
<!-- A header for selfManaged devices only. -->
|
||||
<include layout="@layout/vendor_header" />
|
||||
|
||||
<!-- Do NOT change the ID of the root LinearLayout above:
|
||||
it's referenced in CTS tests. -->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/profile_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="18dp"
|
||||
android:tint="@android:color/system_accent1_600"/>
|
||||
|
||||
<LinearLayout style="@style/Description">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/DescriptionTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summary"
|
||||
style="@style/DescriptionSummary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/multiple_device_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<View
|
||||
android:id="@+id/border_top"
|
||||
style="@style/DeviceListBorder" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/device_list"
|
||||
android:layout_width="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_height="200dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/border_bottom"
|
||||
style="@style/DeviceListBorder" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/permission_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/spinner_multiple_device"
|
||||
android:visibility="gone"
|
||||
style="@style/Spinner" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<!-- Do NOT change the IDs of the buttons: they are referenced in CTS tests. -->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_positive"
|
||||
style="@style/PositiveButton"
|
||||
android:text="@string/consent_yes" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_negative"
|
||||
android:layout_marginBottom="12dp"
|
||||
style="@style/NegativeButton"
|
||||
android:text="@string/consent_no" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="bottom|end"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<!-- Do NOT change the IDs of the buttons: they are referenced in CTS tests. -->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_negative_multiple_devices"
|
||||
style="@style/NegativeButtonMultipleDevices"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:visibility="gone"
|
||||
android:text="@string/consent_no" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/multiple_device_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<View
|
||||
android:id="@+id/border_top"
|
||||
style="@style/DeviceListBorder" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/device_list"
|
||||
android:layout_width="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_height="200dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/border_bottom"
|
||||
style="@style/DeviceListBorder" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/permission_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/spinner_multiple_device"
|
||||
android:id="@+id/spinner_single_device"
|
||||
android:visibility="gone"
|
||||
style="@style/Spinner" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<!-- Do NOT change the IDs of the buttons: they are referenced in CTS tests. -->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_positive"
|
||||
style="@style/PositiveButton"
|
||||
android:text="@string/consent_yes" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_negative"
|
||||
android:layout_marginBottom="12dp"
|
||||
style="@style/NegativeButton"
|
||||
android:text="@string/consent_no" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="bottom|right"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<!-- Do NOT change the IDs of the buttons: they are referenced in CTS tests. -->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_negative_multiple_devices"
|
||||
style="@style/NegativeButtonMultipleDevices"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:visibility="gone"
|
||||
android:text="@string/consent_no" />
|
||||
</LinearLayout>
|
||||
style="@style/Spinner" />
|
||||
</RelativeLayout>>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/spinner_single_device"
|
||||
android:visibility="gone"
|
||||
style="@style/Spinner" />
|
||||
</RelativeLayout>>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -15,54 +15,67 @@
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/helper_confirmation"
|
||||
android:theme="@style/ChooserActivity"
|
||||
android:padding="12dp"
|
||||
style="@style/ContainerLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helper_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helper_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:gravity="center"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/ScrollViewStyle">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="end">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_back"
|
||||
style="@style/VendorHelperBackButton"
|
||||
android:text="@string/consent_back" />
|
||||
<LinearLayout
|
||||
android:id="@+id/helper_confirmation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/ChooserActivity"
|
||||
android:padding="12dp"
|
||||
style="@style/ContainerLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helper_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/helper_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:gravity="center"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:gravity="end">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_back"
|
||||
style="@style/VendorHelperBackButton"
|
||||
android:text="@string/consent_back" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -28,14 +28,15 @@
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:tint="@android:color/system_accent1_600"/>
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"/>
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="32dp"
|
||||
android:paddingRight="32dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingBottom="14dp">
|
||||
|
||||
<ImageView
|
||||
@@ -30,7 +30,6 @@
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:tint="@android:color/system_accent1_600"
|
||||
android:contentDescription="Permission Icon"/>
|
||||
|
||||
<LinearLayout
|
||||
@@ -51,7 +50,6 @@
|
||||
android:id="@+id/permission_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="24dp"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
|
||||
@@ -24,28 +24,32 @@
|
||||
android:layout_gravity="center"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:visibility="gone" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/vendor_header_image"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="32dp" />
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="@string/vendor_icon_description" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/vendor_header_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@+id/header_image" />
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textSize="16sp"
|
||||
android:layout_toEndOf="@+id/vendor_header_image"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/vendor_header_button"
|
||||
android:background="@drawable/ic_info"
|
||||
android:layout_width="31dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_alignParentRight="true" />
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="@string/vendor_header_button_description"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -116,4 +116,10 @@
|
||||
apps installed on your watch during setup will use the same permissions as your phone.\n\n
|
||||
These permissions may include access to your watch\u2019s microphone and location.</string>
|
||||
|
||||
<!--Description for vendor icon [CHAR LIMIT=30]-->
|
||||
<string name="vendor_icon_description">App Icon</string>
|
||||
|
||||
<!--Description for information icon [CHAR LIMIT=30]-->
|
||||
<string name="vendor_header_button_description">More Information Button</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -59,9 +59,8 @@
|
||||
|
||||
<style name="VendorHelperBackButton"
|
||||
parent="@android:style/Widget.Material.Button.Borderless.Colored">
|
||||
<item name="android:layout_width">60dp</item>
|
||||
<item name="android:layout_height">36dp</item>
|
||||
<item name="android:layout_marginTop">20dp</item>
|
||||
<item name="android:layout_width">70dp</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textColor">@android:color/system_neutral1_900</item>
|
||||
<item name="android:background">@drawable/helper_back_button</item>
|
||||
@@ -71,8 +70,6 @@
|
||||
parent="@android:style/Widget.Material.Button.Borderless.Colored">
|
||||
<item name="android:layout_width">300dp</item>
|
||||
<item name="android:layout_height">56dp</item>
|
||||
<item name="android:layout_marginLeft">24dp</item>
|
||||
<item name="android:layout_marginRight">24dp</item>
|
||||
<item name="android:layout_marginBottom">2dp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
@@ -84,8 +81,6 @@
|
||||
parent="@android:style/Widget.Material.Button.Borderless.Colored">
|
||||
<item name="android:layout_width">300dp</item>
|
||||
<item name="android:layout_height">56dp</item>
|
||||
<item name="android:layout_marginLeft">24dp</item>
|
||||
<item name="android:layout_marginRight">24dp</item>
|
||||
<item name="android:layout_marginTop">2dp</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
@@ -115,4 +110,10 @@
|
||||
<item name="android:indeterminate">true</item>
|
||||
<item name="android:layout_centerInParent">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ScrollViewStyle">
|
||||
<item name="android:scrollbars">none</item>
|
||||
<item name="android:fillViewport">true</item>
|
||||
<item name="android:clipChildren">false</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
<style name="ChooserActivity"
|
||||
parent="@android:style/Theme.DeviceDefault.Light.Dialog.NoActionBar">
|
||||
<item name="*android:windowFixedHeightMajor">100%</item>
|
||||
<item name="*android:windowFixedHeightMinor">100%</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ import android.companion.CompanionDeviceManager;
|
||||
import android.companion.IAssociationRequestCallback;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.MacAddress;
|
||||
import android.os.Bundle;
|
||||
@@ -411,17 +412,19 @@ public class CompanionDeviceActivity extends FragmentActivity implements
|
||||
final Drawable vendorIcon;
|
||||
final CharSequence vendorName;
|
||||
final Spanned title;
|
||||
int nightModeFlags = getResources().getConfiguration().uiMode
|
||||
& Configuration.UI_MODE_NIGHT_MASK;
|
||||
|
||||
mPermissionTypes = new ArrayList<>();
|
||||
|
||||
try {
|
||||
vendorIcon = getVendorHeaderIcon(this, packageName, userId);
|
||||
vendorName = getVendorHeaderName(this, packageName, userId);
|
||||
|
||||
mVendorHeaderImage.setImageDrawable(vendorIcon);
|
||||
if (hasVendorIcon(this, packageName, userId)) {
|
||||
mVendorHeaderImage.setColorFilter(getResources().getColor(
|
||||
android.R.color.system_accent1_600, /* Theme= */null));
|
||||
int color = nightModeFlags == Configuration.UI_MODE_NIGHT_YES
|
||||
? android.R.color.system_accent1_200 : android.R.color.system_accent1_600;
|
||||
mVendorHeaderImage.setColorFilter(getResources().getColor(color, /* Theme= */null));
|
||||
}
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e(TAG, "Package u" + userId + "/" + packageName + " not found.");
|
||||
|
||||
Reference in New Issue
Block a user