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

Commit 1ba1dd34 authored by Caitlin Cassidy's avatar Caitlin Cassidy Committed by Android (Google) Code Review
Browse files

Merge "[Ongoing Call Chip] Add an ongoing call chip in the status bar." into sc-dev

parents 5b6504f6 2cbafc19
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
<!--
  ~ 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">
    <solid android:color="?android:attr/colorAccent" />
    <corners android:radius="@dimen/ongoing_call_chip_corner_radius" />
</shape>
 No newline at end of file
+50 −0
Original line number Diff line number Diff line
<!--
  ~ 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/ongoing_call_chip"
    android:layout_width="wrap_content"
    android:layout_height="@dimen/ongoing_appops_chip_height"
    android:layout_gravity="center_vertical|start"
    android:gravity="center_vertical"
    android:background="@drawable/ongoing_call_chip_bg"
    android:paddingStart="@dimen/ongoing_call_chip_side_padding"
    android:paddingEnd="@dimen/ongoing_call_chip_side_padding"
    android:visibility="gone"
>

    <ImageView
        android:src="@*android:drawable/ic_phone"
        android:layout_width="@dimen/ongoing_call_chip_icon_size"
        android:layout_height="@dimen/ongoing_call_chip_icon_size"
        android:paddingEnd="@dimen/ongoing_call_chip_icon_text_padding"
        android:tint="?android:attr/colorPrimary"
    />

    <!-- TODO(b/183229367): The text in this view isn't quite centered within the chip. -->
    <!-- TODO(b/183229367): This text view's width shouldn't change as the time increases. -->
    <Chronometer
        android:id="@+id/ongoing_call_chip_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:gravity="center"
        android:textAppearance="@android:style/TextAppearance.Material.Small"
        android:fontFamily="@*android:string/config_headlineFontFamily"
        android:textColor="?android:attr/colorPrimary"
    />

</LinearLayout>
+2 −0
Original line number Diff line number Diff line
@@ -82,6 +82,8 @@
                    android:gravity="center_vertical|start"
                />

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

                <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
                    android:id="@+id/notification_icon_area"
                    android:layout_width="0dp"
+7 −0
Original line number Diff line number Diff line
@@ -1442,4 +1442,11 @@
    <dimen name="wallet_empty_state_corner_radius">24dp</dimen>
    <dimen name="wallet_tile_card_view_height">32dp</dimen>
    <dimen name="wallet_tile_card_view_width">50dp</dimen>

    <!-- Ongoing call chip -->
    <dimen name="ongoing_call_chip_side_padding">12dp</dimen>
    <dimen name="ongoing_call_chip_icon_size">16dp</dimen>
    <!-- The padding between the icon and the text. -->
    <dimen name="ongoing_call_chip_icon_text_padding">4dp</dimen>
    <dimen name="ongoing_call_chip_corner_radius">28dp</dimen>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@

    <bool name="flag_charging_ripple">false</bool>

    <bool name="flag_ongoing_call_status_bar_chip">false</bool>
    <bool name="flag_ongoing_call_status_bar_chip">true</bool>

    <bool name="flag_smartspace">false</bool>
</resources>
Loading