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

Commit 724172b7 authored by Milton Wu's avatar Milton Wu
Browse files

Move Privacy dots to new DecorProvider

Provide privacy dot information as DecorProvider, and we can reduce the
dependency to privacy dot, and let ScreenDecorations focus on
interactions between DecorProvider and related views life cycle.

Bug: 213291394
Test: atest ScreenDecorationsTest
            PrivacyDotDecorProviderFactoryTest
            OverlayWindowTest

Change-Id: I2ecab3f145fbb5c72114455054763b5db614a003
parent ce65b04d
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2022, 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/privacy_dot_bottom_left_container"
    android:layout_height="@dimen/status_bar_height"
    android:layout_width="wrap_content"
    android:layout_gravity="bottom|left"
    android:paddingTop="@dimen/status_bar_padding_top"
    android:visibility="invisible" >
    <ImageView
        android:id="@+id/privacy_dot"
        android:contentDescription="@null"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center_vertical|right"
        android:src="@drawable/system_animation_ongoing_dot"
        android:visibility="visible" />
</FrameLayout>
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2022, 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/privacy_dot_bottom_right_container"
    android:layout_height="@dimen/status_bar_height"
    android:layout_width="wrap_content"
    android:layout_gravity="bottom|right"
    android:paddingTop="@dimen/status_bar_padding_top"
    android:visibility="invisible" >
    <ImageView
        android:id="@+id/privacy_dot"
        android:contentDescription="@null"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center_vertical|left"
        android:src="@drawable/system_animation_ongoing_dot"
        android:visibility="visible" />
</FrameLayout>
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2022, 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/privacy_dot_top_left_container"
    android:layout_height="@dimen/status_bar_height"
    android:layout_width="wrap_content"
    android:layout_gravity="top|left"
    android:paddingTop="@dimen/status_bar_padding_top"
    android:visibility="invisible" >
    <ImageView
        android:id="@+id/privacy_dot"
        android:contentDescription="@null"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center_vertical|right"
        android:src="@drawable/system_animation_ongoing_dot"
        android:visibility="visible" />
</FrameLayout>
 No newline at end of file
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2022, 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.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/privacy_dot_top_right_container"
    android:layout_height="@dimen/status_bar_height"
    android:layout_width="wrap_content"
    android:layout_gravity="top|right"
    android:paddingTop="@dimen/status_bar_padding_top"
    android:visibility="invisible" >
    <ImageView
        android:id="@+id/privacy_dot"
        android:contentDescription="@null"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center_vertical|left"
        android:src="@drawable/system_animation_ongoing_dot"
        android:visibility="visible" />
</FrameLayout>
 No newline at end of file
+0 −32
Original line number Diff line number Diff line
@@ -27,22 +27,6 @@
        android:tint="#ff000000"
        android:src="@drawable/rounded_corner_bottom"/>

    <FrameLayout
        android:id="@+id/privacy_dot_left_container"
        android:layout_height="@dimen/status_bar_height"
        android:layout_width="wrap_content"
        android:paddingTop="@dimen/status_bar_padding_top"
        android:layout_gravity="left|bottom"
        android:visibility="invisible" >
        <ImageView
            android:id="@+id/privacy_dot"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center_vertical|right"
            android:src="@drawable/system_animation_ongoing_dot"
            android:visibility="visible" />
    </FrameLayout>

    <ImageView
        android:id="@+id/right"
        android:layout_width="12dp"
@@ -51,20 +35,4 @@
        android:layout_gravity="right|bottom"
        android:src="@drawable/rounded_corner_bottom"/>

    <FrameLayout
        android:id="@+id/privacy_dot_right_container"
        android:layout_height="@dimen/status_bar_height"
        android:layout_width="wrap_content"
        android:paddingTop="@dimen/status_bar_padding_top"
        android:layout_gravity="right|bottom"
        android:visibility="invisible" >
        <ImageView
            android:id="@+id/privacy_dot"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_gravity="center_vertical|left"
            android:src="@drawable/system_animation_ongoing_dot"
            android:visibility="visible" />
    </FrameLayout>

</com.android.systemui.RegionInterceptingFrameLayout>
Loading