Dialog and chip for privacy showing
Creates a chip and a dialog to show the current apps using certain app
ops (location, microphone, camera).
Dimens are estimated. Settings button dismisses dialog for now.
Test: atest && visual
Bug: 117646163
Change-Id: Ida5b42acf331d6c9da06141379eadc0da5e72df2
diff --git a/packages/SystemUI/res/layout/ongoing_privacy_chip.xml b/packages/SystemUI/res/layout/ongoing_privacy_chip.xml
new file mode 100644
index 0000000..5e952e3
--- /dev/null
+++ b/packages/SystemUI/res/layout/ongoing_privacy_chip.xml
@@ -0,0 +1,44 @@
+<?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.
+-->
+
+<com.android.systemui.privacy.OngoingPrivacyChip
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/privacy_chip"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_margin="@dimen/ongoing_appops_chip_margin"
+ android:gravity="center_vertical|end"
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/ongoing_appops_chip_side_padding"
+ android:paddingEnd="@dimen/ongoing_appops_chip_side_padding"
+ android:background="@drawable/privacy_chip_bg"
+ android:focusable="true">
+
+ <LinearLayout
+ android:id="@+id/icons_container"
+ android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:gravity="center_vertical|start"
+ />
+
+ <TextView
+ android:id="@+id/app_name"
+ android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:gravity="center_vertical|end"
+ />
+</com.android.systemui.privacy.OngoingPrivacyChip>
\ No newline at end of file