Merge "Move some base launchable views to the animation library." into tm-qpr-dev am: 3fb52a6322 am: 02c67d21a4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21150132 Change-Id: I451979e8e9f168d25f25722c69b4dce88727216e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package com.android.systemui.common.ui.view
|
||||
package com.android.systemui.animation.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
@@ -23,6 +23,7 @@ import android.widget.ImageView
|
||||
import com.android.systemui.animation.LaunchableView
|
||||
import com.android.systemui.animation.LaunchableViewDelegate
|
||||
|
||||
/** An [ImageView] that also implements [LaunchableView]. */
|
||||
class LaunchableImageView : ImageView, LaunchableView {
|
||||
private val delegate =
|
||||
LaunchableViewDelegate(
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.systemui.common.ui.view
|
||||
package com.android.systemui.animation.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2023 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.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.android.systemui.animation.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.TextView
|
||||
import com.android.systemui.animation.LaunchableView
|
||||
import com.android.systemui.animation.LaunchableViewDelegate
|
||||
|
||||
/** A [TextView] that also implements [LaunchableView]. */
|
||||
class LaunchableTextView : TextView, LaunchableView {
|
||||
private val delegate =
|
||||
LaunchableViewDelegate(
|
||||
this,
|
||||
superSetVisibility = { super.setVisibility(it) },
|
||||
)
|
||||
|
||||
constructor(context: Context?) : super(context)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
|
||||
constructor(
|
||||
context: Context?,
|
||||
attrs: AttributeSet?,
|
||||
defStyleAttr: Int,
|
||||
) : super(context, attrs, defStyleAttr)
|
||||
|
||||
override fun setShouldBlockVisibilityChanges(block: Boolean) {
|
||||
delegate.setShouldBlockVisibilityChanges(block)
|
||||
}
|
||||
|
||||
override fun setVisibility(visibility: Int) {
|
||||
delegate.setVisibility(visibility)
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<com.android.systemui.common.ui.view.LaunchableLinearLayout
|
||||
<com.android.systemui.animation.view.LaunchableLinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/qs_security_footer_single_line_height"
|
||||
@@ -63,4 +63,4 @@
|
||||
android:src="@*android:drawable/ic_chevron_end"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?android:attr/textColorSecondary" />
|
||||
</com.android.systemui.common.ui.view.LaunchableLinearLayout>
|
||||
</com.android.systemui.animation.view.LaunchableLinearLayout>
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingVertical="@dimen/dream_overlay_complication_home_controls_padding">
|
||||
|
||||
<com.android.systemui.common.ui.view.LaunchableImageView
|
||||
<com.android.systemui.animation.view.LaunchableImageView
|
||||
android:id="@+id/home_controls_chip"
|
||||
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
||||
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.systemui.common.ui.view.LaunchableImageView
|
||||
<com.android.systemui.animation.view.LaunchableImageView
|
||||
android:id="@+id/start_button"
|
||||
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
||||
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
||||
@@ -72,7 +72,7 @@
|
||||
android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.android.systemui.common.ui.view.LaunchableImageView
|
||||
<com.android.systemui.animation.view.LaunchableImageView
|
||||
android:id="@+id/end_button"
|
||||
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
||||
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintWidth_min="@dimen/min_clickable_item_size"
|
||||
app:layout_constraintHeight_min="@dimen/min_clickable_item_size">
|
||||
<com.android.systemui.common.ui.view.LaunchableLinearLayout
|
||||
<com.android.systemui.animation.view.LaunchableLinearLayout
|
||||
android:id="@+id/media_seamless_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -135,7 +135,7 @@
|
||||
android:textDirection="locale"
|
||||
android:textSize="12sp"
|
||||
android:lineHeight="16sp" />
|
||||
</com.android.systemui.common.ui.view.LaunchableLinearLayout>
|
||||
</com.android.systemui.animation.view.LaunchableLinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Song name -->
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:layout_marginStart="5dp"
|
||||
>
|
||||
<com.android.systemui.common.ui.view.LaunchableLinearLayout
|
||||
<com.android.systemui.animation.view.LaunchableLinearLayout
|
||||
android:id="@+id/ongoing_call_chip_background"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/ongoing_appops_chip_height"
|
||||
@@ -55,5 +55,5 @@
|
||||
android:textColor="?android:attr/colorPrimary"
|
||||
/>
|
||||
|
||||
</com.android.systemui.common.ui.view.LaunchableLinearLayout>
|
||||
</com.android.systemui.animation.view.LaunchableLinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -21,7 +21,7 @@ import android.util.AttributeSet
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.android.systemui.R
|
||||
import com.android.systemui.common.ui.view.LaunchableLinearLayout
|
||||
import com.android.systemui.animation.view.LaunchableLinearLayout
|
||||
|
||||
class StatusBarUserSwitcherContainer(
|
||||
context: Context?,
|
||||
|
||||
@@ -37,7 +37,7 @@ import androidx.test.filters.SmallTest;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.SysuiTestCase;
|
||||
import com.android.systemui.common.ui.view.LaunchableImageView;
|
||||
import com.android.systemui.animation.view.LaunchableImageView;
|
||||
import com.android.systemui.controls.ControlsServiceInfo;
|
||||
import com.android.systemui.controls.controller.ControlsController;
|
||||
import com.android.systemui.controls.controller.StructureInfo;
|
||||
|
||||
Reference in New Issue
Block a user