Remove some unused ongoing usage dialog artifacts.
Bug: 128690096
Test: Open ongoing usage dialog.
Change-Id: Ib41472bbe3f11812cc0ebd65addeac1c20e38817
diff --git a/packages/SystemUI/res/layout/ongoing_privacy_dialog_content.xml b/packages/SystemUI/res/layout/ongoing_privacy_dialog_content.xml
deleted file mode 100644
index 665fc3f..0000000
--- a/packages/SystemUI/res/layout/ongoing_privacy_dialog_content.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 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.
--->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fillViewport ="true"
- android:orientation="vertical">
-
- <LinearLayout
- android:id="@+id/dialog_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
- <TextView
- android:id="@+id/title"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:textDirection="locale"
- android:textAppearance="@style/TextAppearance.AppOpsDialog.Title"
- android:textColor="@*android:color/text_color_primary"
- android:layout_marginStart="@dimen/ongoing_appops_dialog_title_margin_sides"
- android:layout_marginEnd="@dimen/ongoing_appops_dialog_title_margin_sides"
- android:layout_marginBottom="@dimen/ongoing_appops_dialog_title_margin_top_bottom"
- android:layout_marginTop="@dimen/ongoing_appops_dialog_title_margin_top_bottom"
- />
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/ongoing_appops_dialog_items_bottom_margin" >
-
- <LinearLayout
- android:id="@+id/items_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="start"
- />
- </LinearLayout>
-
- </LinearLayout>
-
-</ScrollView>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/ongoing_privacy_dialog_item.xml b/packages/SystemUI/res/layout/ongoing_privacy_dialog_item.xml
deleted file mode 100644
index c8e0845..0000000
--- a/packages/SystemUI/res/layout/ongoing_privacy_dialog_item.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2018 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="@dimen/ongoing_appops_dialog_line_height"
- android:layout_marginStart="@dimen/ongoing_appops_dialog_text_padding"
- android:layout_marginEnd="@dimen/ongoing_appops_dialog_text_padding"
- android:fillViewport="true"
- android:orientation="horizontal"
- android:focusable="true"
- android:layout_gravity="center_vertical">
-
- <FrameLayout
- android:layout_height="@dimen/ongoing_appops_dialog_app_icon_size"
- android:layout_width="@dimen/ongoing_appops_dialog_app_icon_size"
- android:layout_gravity="start|center_vertical">
-
- <ImageView
- android:id="@+id/app_icon"
- android:layout_height="@dimen/ongoing_appops_dialog_app_icon_size"
- android:layout_width="@dimen/ongoing_appops_dialog_app_icon_size"
- android:layout_gravity="center"
- />
- </FrameLayout>
-
- <TextView
- android:id="@+id/app_name"
- android:layout_height="match_parent"
- android:layout_width="0dp"
- android:layout_weight="1"
- android:gravity="start|center_vertical"
- android:textDirection="locale"
- android:textAppearance="@style/TextAppearance.AppOpsDialog.Item"
- android:textColor="@*android:color/text_color_primary"
- android:layout_marginStart="@dimen/ongoing_appops_dialog_text_padding"
- />
-
- <LinearLayout
- android:id="@+id/icons"
- android:layout_height="match_parent"
- android:layout_width="wrap_content"
- android:gravity="end"
- android:layout_gravity="end|center_vertical"
- android:visibility="gone"
- />
-</LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 03b6a52..0411d01 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2345,18 +2345,6 @@
<!-- Content description for ongoing privacy chip. Use with multiple apps [CHAR LIMIT=NONE]-->
<string name="ongoing_privacy_chip_content_multiple_apps">Applications are using your <xliff:g id="types_list" example="camera, location">%s</xliff:g>.</string>
- <!-- Action for accepting the Ongoing privacy dialog [CHAR LIMIT=10]-->
- <string name="ongoing_privacy_dialog_ok">Got it</string>
-
- <!-- Action on Ongoing Privacy Dialog to open privacy hub [CHAR LIMIT=23]-->
- <string name="ongoing_privacy_dialog_open_settings">Privacy settings</string>
-
- <!-- Text for item in Ongoing Privacy Dialog title when only one app is using app ops [CHAR LIMIT=NONE] -->
- <string name="ongoing_privacy_dialog_single_app_title">App using your <xliff:g id="types_list" example="camera( and location)">%s</xliff:g></string>
-
- <!-- Text for item in Ongoing Privacy Dialog title when multiple apps is using app ops [CHAR LIMIT=NONE] -->
- <string name="ongoing_privacy_dialog_multiple_apps_title">Apps using your <xliff:g id="types_list" example="camera( and location)">%s</xliff:g></string>
-
<!-- Separator for types. Include spaces before and after if needed [CHAR LIMIT=10] -->
<string name="ongoing_privacy_dialog_separator">,\u0020</string>
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyDialogBuilder.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyDialogBuilder.kt
index 59b3c34..d08a373 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyDialogBuilder.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyDialogBuilder.kt
@@ -53,9 +53,4 @@
else -> types.map { it.getName(context) }.joinWithAnd().toString()
}
}
-
- fun getDialogTitle(): String {
- return context.getString(R.string.ongoing_privacy_dialog_multiple_apps_title,
- joinTypes())
- }
}