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

Commit 27e8c4c0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "presubmit-am-9b5e750ffe3a4cb798418c89d9e7f523" into tm-mainline-prod

* changes:
  [automerge] Re-land "Move rounded corner to provider" 2p: 43010349
  Re-land "Move rounded corner to provider"
parents 7f659181 88e14532
Loading
Loading
Loading
Loading
+0 −40
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2020, 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.
-->
<com.android.systemui.RegionInterceptingFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rounded_corners_bottom"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@+id/left"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:layout_gravity="left|bottom"
        android:tint="#ff000000"
        android:visibility="gone"
        android:src="@drawable/rounded_corner_bottom"/>

    <ImageView
        android:id="@+id/right"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:tint="#ff000000"
        android:visibility="gone"
        android:layout_gravity="right|bottom"
        android:src="@drawable/rounded_corner_bottom"/>

</com.android.systemui.RegionInterceptingFrameLayout>
+0 −40
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright 2020, 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.
-->
<com.android.systemui.RegionInterceptingFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rounded_corners_top"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@+id/left"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:layout_gravity="left|top"
        android:tint="#ff000000"
        android:visibility="gone"
        android:src="@drawable/rounded_corner_top"/>

    <ImageView
        android:id="@+id/right"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:tint="#ff000000"
        android:visibility="gone"
        android:layout_gravity="right|top"
        android:src="@drawable/rounded_corner_top"/>

</com.android.systemui.RegionInterceptingFrameLayout>
+6 −0
Original line number Original line Diff line number Diff line
@@ -170,5 +170,11 @@
    <item type="id" name="action_move_bottom_right"/>
    <item type="id" name="action_move_bottom_right"/>
    <item type="id" name="action_move_to_edge_and_hide"/>
    <item type="id" name="action_move_to_edge_and_hide"/>
    <item type="id" name="action_move_out_edge_and_show"/>
    <item type="id" name="action_move_out_edge_and_show"/>

    <!-- rounded corner view id -->
    <item type="id" name="rounded_corner_top_left"/>
    <item type="id" name="rounded_corner_top_right"/>
    <item type="id" name="rounded_corner_bottom_left"/>
    <item type="id" name="rounded_corner_bottom_right"/>
</resources>
</resources>
+144 −233

File changed.

Preview size limit exceeded, changes collapsed.

+13 −2
Original line number Original line Diff line number Diff line
@@ -15,8 +15,8 @@
 */
 */


package com.android.systemui.decor
package com.android.systemui.decor
import android.content.Context
import android.view.DisplayCutout
import android.view.DisplayCutout
import android.view.LayoutInflater
import android.view.Surface
import android.view.Surface
import android.view.View
import android.view.View
import android.view.ViewGroup
import android.view.ViewGroup
@@ -38,9 +38,20 @@ abstract class DecorProvider {
    /** The aligned bounds for the view which is created through inflateView() */
    /** The aligned bounds for the view which is created through inflateView() */
    abstract val alignedBounds: List<Int>
    abstract val alignedBounds: List<Int>


    /**
     * Called when res info changed.
     * Child provider needs to implement it if its view needs to be updated.
     */
    abstract fun onReloadResAndMeasure(
        view: View,
        reloadToken: Int,
        @Surface.Rotation rotation: Int,
        displayUniqueId: String? = null
    )

    /** Inflate view into parent as current rotation */
    /** Inflate view into parent as current rotation */
    abstract fun inflateView(
    abstract fun inflateView(
        inflater: LayoutInflater,
        context: Context,
        parent: ViewGroup,
        parent: ViewGroup,
        @Surface.Rotation rotation: Int
        @Surface.Rotation rotation: Int
    ): View
    ): View
Loading