Merge "Move some base launchable views to the animation library." into tm-qpr-dev am: 3fb52a6322
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21150132 Change-Id: I9164d62ea6da14e40861122b647b7b94a05af653 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.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
@@ -23,6 +23,7 @@ import android.widget.ImageView
|
|||||||
import com.android.systemui.animation.LaunchableView
|
import com.android.systemui.animation.LaunchableView
|
||||||
import com.android.systemui.animation.LaunchableViewDelegate
|
import com.android.systemui.animation.LaunchableViewDelegate
|
||||||
|
|
||||||
|
/** An [ImageView] that also implements [LaunchableView]. */
|
||||||
class LaunchableImageView : ImageView, LaunchableView {
|
class LaunchableImageView : ImageView, LaunchableView {
|
||||||
private val delegate =
|
private val delegate =
|
||||||
LaunchableViewDelegate(
|
LaunchableViewDelegate(
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.systemui.common.ui.view
|
package com.android.systemui.animation.view
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
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
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
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"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/qs_security_footer_single_line_height"
|
android:layout_height="@dimen/qs_security_footer_single_line_height"
|
||||||
@@ -63,4 +63,4 @@
|
|||||||
android:src="@*android:drawable/ic_chevron_end"
|
android:src="@*android:drawable/ic_chevron_end"
|
||||||
android:autoMirrored="true"
|
android:autoMirrored="true"
|
||||||
android:tint="?android:attr/textColorSecondary" />
|
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:layout_width="wrap_content"
|
||||||
android:paddingVertical="@dimen/dream_overlay_complication_home_controls_padding">
|
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:id="@+id/home_controls_chip"
|
||||||
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
||||||
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.android.systemui.common.ui.view.LaunchableImageView
|
<com.android.systemui.animation.view.LaunchableImageView
|
||||||
android:id="@+id/start_button"
|
android:id="@+id/start_button"
|
||||||
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
||||||
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset"
|
android:layout_marginBottom="@dimen/keyguard_affordance_vertical_offset"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<com.android.systemui.common.ui.view.LaunchableImageView
|
<com.android.systemui.animation.view.LaunchableImageView
|
||||||
android:id="@+id/end_button"
|
android:id="@+id/end_button"
|
||||||
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
android:layout_height="@dimen/keyguard_affordance_fixed_height"
|
||||||
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
android:layout_width="@dimen/keyguard_affordance_fixed_width"
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
app:layout_constraintWidth_min="@dimen/min_clickable_item_size"
|
app:layout_constraintWidth_min="@dimen/min_clickable_item_size"
|
||||||
app:layout_constraintHeight_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:id="@+id/media_seamless_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:lineHeight="16sp" />
|
android:lineHeight="16sp" />
|
||||||
</com.android.systemui.common.ui.view.LaunchableLinearLayout>
|
</com.android.systemui.animation.view.LaunchableLinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Song name -->
|
<!-- Song name -->
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
android:layout_gravity="center_vertical|start"
|
android:layout_gravity="center_vertical|start"
|
||||||
android:layout_marginStart="5dp"
|
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:id="@+id/ongoing_call_chip_background"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/ongoing_appops_chip_height"
|
android:layout_height="@dimen/ongoing_appops_chip_height"
|
||||||
@@ -55,5 +55,5 @@
|
|||||||
android:textColor="?android:attr/colorPrimary"
|
android:textColor="?android:attr/colorPrimary"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</com.android.systemui.common.ui.view.LaunchableLinearLayout>
|
</com.android.systemui.animation.view.LaunchableLinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import android.util.AttributeSet
|
|||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.android.systemui.R
|
import com.android.systemui.R
|
||||||
import com.android.systemui.common.ui.view.LaunchableLinearLayout
|
import com.android.systemui.animation.view.LaunchableLinearLayout
|
||||||
|
|
||||||
class StatusBarUserSwitcherContainer(
|
class StatusBarUserSwitcherContainer(
|
||||||
context: Context?,
|
context: Context?,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import androidx.test.filters.SmallTest;
|
|||||||
import com.android.internal.logging.UiEventLogger;
|
import com.android.internal.logging.UiEventLogger;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.SysuiTestCase;
|
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.ControlsServiceInfo;
|
||||||
import com.android.systemui.controls.controller.ControlsController;
|
import com.android.systemui.controls.controller.ControlsController;
|
||||||
import com.android.systemui.controls.controller.StructureInfo;
|
import com.android.systemui.controls.controller.StructureInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user