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

Commit aff03ed8 authored by Robert Horvath's avatar Robert Horvath
Browse files

Move screen recording indicator icon into separate privacy chip

The new screen recording privacy indicator chip expands and collapses
together with the existing mic/camera chip.
When it collapses, it does not collapse into a dot like the mic/camera
chip, but the screen recording icon stays visible.

Bug: 184629645
Test: m SystemUI CarSystemUI ArcSystemUI
Test: Manual on TV, observe privacy indicators
Change-Id: I77745f9d202f03fb20e3ce5c77c3c50d0e00a153
parent 5ccead10
Loading
Loading
Loading
Loading
+6 −25
Original line number Diff line number Diff line
@@ -14,28 +14,9 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:ordering="together"
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:propertyName="collapseProgress"
    android:interpolator="@interpolator/tv_privacy_chip_collapse_interpolator"
     android:duration="@integer/privacy_chip_animation_millis">
    <objectAnimator
        android:propertyName="height"
        android:valueTo="@dimen/privacy_chip_dot_size"
        android:valueType="floatType"/>
    <objectAnimator
        android:propertyName="marginEnd"
        android:valueTo="@dimen/privacy_chip_dot_margin_horizontal"
        android:valueType="floatType"/>
    <objectAnimator
        android:propertyName="radius"
        android:valueTo="@dimen/privacy_chip_dot_radius"
        android:valueType="floatType"/>
    <objectAnimator
        android:propertyName="dotAlpha"
        android:valueTo="255"
        android:valueType="intType"/>
    <objectAnimator
        android:propertyName="bgAlpha"
        android:valueTo="255"
        android:valueType="intType"/>
</set>
 No newline at end of file
    android:valueTo="1"
    android:valueType="floatType"
    android:duration="@integer/privacy_chip_animation_millis" />
 No newline at end of file
+6 −25
Original line number Diff line number Diff line
@@ -14,28 +14,9 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:ordering="together"
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:propertyName="collapseProgress"
    android:interpolator="@interpolator/tv_privacy_chip_expand_interpolator"
     android:duration="@integer/privacy_chip_animation_millis">
    <objectAnimator
        android:propertyName="height"
        android:valueTo="@dimen/privacy_chip_height"
        android:valueType="floatType"/>
    <objectAnimator
        android:propertyName="marginEnd"
    android:valueTo="0"
        android:valueType="floatType"/>
    <objectAnimator
        android:propertyName="radius"
        android:valueTo="@dimen/privacy_chip_radius"
        android:valueType="floatType"/>
    <objectAnimator
        android:propertyName="dotAlpha"
        android:valueTo="255"
        android:valueType="intType"/>
    <objectAnimator
        android:propertyName="bgAlpha"
        android:valueTo="0"
        android:valueType="intType"/>
</set>
 No newline at end of file
    android:valueType="floatType"
    android:duration="@integer/privacy_chip_animation_millis" />
 No newline at end of file
+0 −29
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.
  -->
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:ordering="together"
     android:interpolator="@interpolator/tv_privacy_chip_collapse_interpolator"
     android:duration="@integer/privacy_chip_animation_millis">
    <objectAnimator
        android:propertyName="dotAlpha"
        android:valueTo="0"
        android:valueType="intType"/>
    <objectAnimator
        android:propertyName="bgAlpha"
        android:valueTo="0"
        android:valueType="intType"/>
</set>
 No newline at end of file
+9 −20
Original line number Diff line number Diff line
@@ -15,30 +15,19 @@
  ~ limitations under the License.
  -->


<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:animateLayoutChanges="false"
    android:padding="@dimen/privacy_chip_margin">

    <ImageView
        android:id="@+id/chip_drawable"
        android:layout_width="@dimen/privacy_chip_max_width"
    android:layout_height="@dimen/privacy_chip_height"
    android:minWidth="@dimen/privacy_chip_dot_bg_width"
        android:minHeight="@dimen/privacy_chip_dot_bg_height"
        android:layout_gravity="top|end" />

    android:gravity="center">
    <LinearLayout
        android:id="@+id/icons_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_height="@dimen/privacy_chip_height"
        android:minWidth="@dimen/privacy_chip_dot_bg_width"
        android:orientation="horizontal"
        android:layout_gravity="center_vertical|end"
        android:animateLayoutChanges="true"
        android:paddingHorizontal="@dimen/privacy_chip_padding_horizontal" />
        android:gravity="center"
        android:paddingHorizontal="@dimen/privacy_chip_padding_horizontal"
        android:clipToPadding="false" />
</FrameLayout>
+14 −10
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~ Copyright (C) 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.
@@ -14,12 +14,16 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<set xmlns:android="http://schemas.android.com/apk/res/android"
     android:ordering="together"
     android:interpolator="@interpolator/tv_privacy_chip_collapse_interpolator"
     android:duration="@integer/privacy_chip_animation_millis">
    <objectAnimator
        android:propertyName="dotAlpha"
        android:valueTo="255"
        android:valueType="intType"/>
</set>
 No newline at end of file
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:minWidth="@dimen/privacy_chips_max_width"
    android:orientation="horizontal"
    android:clipToPadding="false"
    android:gravity="end"
    android:padding="@dimen/privacy_chips_bar_padding">
    <Space
        android:layout_width="0dp"
        android:layout_height="@dimen/privacy_chip_height" />
</LinearLayout>
 No newline at end of file
Loading