<!--
  ~ 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.
  -->

<merge
    xmlns:android="http://schemas.android.com/apk/res/android"
    >

    <com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
        android:id="@+id/ongoing_activity_chip_background"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/ongoing_appops_chip_height"
        android:layout_gravity="center_vertical"
        android:gravity="center"
        android:background="@drawable/ongoing_activity_chip_bg"
        android:paddingStart="@dimen/ongoing_activity_chip_side_padding_legacy"
        android:paddingEnd="@dimen/ongoing_activity_chip_side_padding_legacy"
        android:minWidth="@dimen/min_clickable_item_size"
    >

        <ImageView
            android:src="@*android:drawable/ic_phone"
            android:id="@+id/ongoing_activity_chip_icon"
            android:contentDescription="@string/ongoing_call_content_description"
            android:layout_width="@dimen/ongoing_activity_chip_icon_size"
            android:layout_height="@dimen/ongoing_activity_chip_icon_size"
            android:tint="?android:attr/colorPrimary"
        />

        <!-- Only one of [ongoing_activity_chip_time, ongoing_activity_chip_text,
             ongoing_activity_chip_short_time_delta] will ever be shown at one time. -->

        <!-- Shows a timer, like 00:01. -->
        <com.android.systemui.statusbar.chips.ui.view.ChipChronometer
            android:id="@+id/ongoing_activity_chip_time"
            style="@style/StatusBar.Chip.Text"
        />

        <!-- Shows generic text. -->
        <com.android.systemui.statusbar.chips.ui.view.ChipTextView
            android:id="@+id/ongoing_activity_chip_text"
            style="@style/StatusBar.Chip.Text"
            android:visibility="gone"
            />

        <!-- Shows a time delta in short form, like "15min" or "1hr". -->
        <com.android.systemui.statusbar.chips.ui.view.ChipDateTimeView
            android:id="@+id/ongoing_activity_chip_short_time_delta"
            style="@style/StatusBar.Chip.Text"
            android:visibility="gone"
            />

    </com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer>
</merge>
