Loading packages/SystemUI/res/layout/privacy_dialog_item.xml +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ /> <ImageView android:id="@+id/chevron" android:layout_height="24dp" android:layout_width="24dp" android:layout_gravity="center_vertical" Loading packages/SystemUI/src/com/android/systemui/privacy/PrivacyDialog.kt +6 −1 Original line number Diff line number Diff line Loading @@ -128,10 +128,15 @@ class PrivacyDialog( ) } ?: firstLine newView.requireViewById<TextView>(R.id.text).text = finalText if (element.phoneCall) { newView.requireViewById<View>(R.id.chevron).visibility = View.GONE } newView.apply { setTag(element) if (!element.phoneCall) { setOnClickListener(clickListener) } } return newView } Loading packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyDialogTest.kt +21 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,27 @@ class PrivacyDialogTest : SysuiTestCase() { ) } @Test fun testPhoneCallNotClickable() { val element = PrivacyDialog.PrivacyElement( PrivacyType.TYPE_MICROPHONE, TEST_PACKAGE_NAME, TEST_USER_ID, "App", null, 0L, false, false, true ) val list = listOf(element) dialog = PrivacyDialog(context, list, starter) dialog.show() assertThat(dialog.requireViewById<View>(R.id.privacy_item).isClickable).isFalse() assertThat(dialog.requireViewById<View>(R.id.chevron).visibility).isEqualTo(View.GONE) } @Test fun testAttribution() { val element = PrivacyDialog.PrivacyElement( Loading Loading
packages/SystemUI/res/layout/privacy_dialog_item.xml +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ /> <ImageView android:id="@+id/chevron" android:layout_height="24dp" android:layout_width="24dp" android:layout_gravity="center_vertical" Loading
packages/SystemUI/src/com/android/systemui/privacy/PrivacyDialog.kt +6 −1 Original line number Diff line number Diff line Loading @@ -128,10 +128,15 @@ class PrivacyDialog( ) } ?: firstLine newView.requireViewById<TextView>(R.id.text).text = finalText if (element.phoneCall) { newView.requireViewById<View>(R.id.chevron).visibility = View.GONE } newView.apply { setTag(element) if (!element.phoneCall) { setOnClickListener(clickListener) } } return newView } Loading
packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyDialogTest.kt +21 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,27 @@ class PrivacyDialogTest : SysuiTestCase() { ) } @Test fun testPhoneCallNotClickable() { val element = PrivacyDialog.PrivacyElement( PrivacyType.TYPE_MICROPHONE, TEST_PACKAGE_NAME, TEST_USER_ID, "App", null, 0L, false, false, true ) val list = listOf(element) dialog = PrivacyDialog(context, list, starter) dialog.show() assertThat(dialog.requireViewById<View>(R.id.privacy_item).isClickable).isFalse() assertThat(dialog.requireViewById<View>(R.id.chevron).visibility).isEqualTo(View.GONE) } @Test fun testAttribution() { val element = PrivacyDialog.PrivacyElement( Loading