Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1263824a authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

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
parent 07e8416f
Loading
Loading
Loading
Loading
+22 −0
Original line number Original line Diff line number Diff line
<?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.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#bbbbbb" />
    <padding android:padding="@dimen/ongoing_appops_chip_bg_padding" />
    <corners android:radius="@dimen/ongoing_appops_chip_bg_corner_radius" />
</shape>
 No newline at end of file
+44 −0
Original line number Original line Diff line number Diff line
<?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
+50 −0
Original line number Original line Diff line number Diff line
<?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"
        android:padding="@dimen/ongoing_appops_dialog_content_padding">

        <LinearLayout
            android:id="@+id/icons_container"
            android:layout_width="match_parent"
            android:layout_height="@dimen/ongoing_appops_dialog_icon_height"
            android:orientation="horizontal"
            android:gravity="center"
            android:importantForAccessibility="no"
        />

        <LinearLayout
            android:id="@+id/text_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="start"
        />
    </LinearLayout>

</ScrollView>
 No newline at end of file
+24 −0
Original line number Original line Diff line number Diff line
<?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.
-->

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textDirection="locale"
    android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"
/>
 No newline at end of file
+2 −0
Original line number Original line Diff line number Diff line
@@ -46,6 +46,8 @@
        android:layout_weight="1"
        android:layout_weight="1"
        android:gravity="center_vertical|center_horizontal" />
        android:gravity="center_vertical|center_horizontal" />


    <include layout="@layout/ongoing_privacy_chip" />

    <com.android.systemui.BatteryMeterView
    <com.android.systemui.BatteryMeterView
        android:id="@+id/battery"
        android:id="@+id/battery"
        android:layout_height="match_parent"
        android:layout_height="match_parent"
Loading