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

Commit 503e56e8 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Implement the new Privacy indicators dialog

Dialog implemented to current mocks.

Missing:
- Design
- Some a11y implementation
- Color palette for circle in icons

Test: manual
Test: SystemUITests
Fixes: 177422611
Bug: 178093014

Change-Id: Iaca8b90e4e6a2d422c46521f116b01c4b049acf1
parent a8786df7
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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"
       android:shape="rectangle">
    <solid android:color="?android:attr/colorBackground" />
    <corners android:radius="@dimen/ongoing_appops_dialog_bg_corner_radius" />
</shape>
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@id/background"
          android:gravity="center"
          >
        <shape android:shape="oval">
            <size
                android:height="28dp"
                android:width="28dp"
            />
            <solid android:color="@color/privacy_circle_camera" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="20dp"
          android:height="20dp"
          android:drawable="@*android:drawable/perm_group_camera"
    />
</layer-list>
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@id/background"
          android:gravity="center"
          >
        <shape android:shape="oval">
            <size
                android:height="28dp"
                android:width="28dp"
            />
            <solid android:color="@color/privacy_circle_microphone_location" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="20dp"
          android:height="20dp"
          android:drawable="@*android:drawable/perm_group_microphone"
    />
</layer-list>
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@id/background"
          android:gravity="center"
          >
        <shape android:shape="oval">
            <size
                android:height="28dp"
                android:width="28dp"
            />
            <solid android:color="@color/privacy_circle_microphone_location" />
        </shape>
    </item>
    <item android:id="@id/icon"
          android:gravity="center"
          android:width="20dp"
          android:height="20dp"
          android:drawable="@*android:drawable/perm_group_microphone"
    />
</layer-list>
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="@dimen/ongoing_appops_dialog_side_margins"
    android:layout_marginEnd="@dimen/ongoing_appops_dialog_side_margins"
    android:orientation="vertical"
    android:padding = "8dp"
    android:background="@drawable/privacy_dialog_bg"
/>
 No newline at end of file
Loading