Fix the ongoing call chip animation. am: 7d51e5553a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14643391

Change-Id: I8324bbf7e1162e3a364feae9edd8481497031c82
This commit is contained in:
Jordan Demeulenaere
2021-05-25 17:55:01 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 3 deletions

View File

@@ -23,6 +23,7 @@
android:layout_gravity="center_vertical|start"
>
<LinearLayout
android:id="@+id/ongoing_call_chip_background"
android:layout_width="wrap_content"
android:layout_height="@dimen/ongoing_appops_chip_height"
android:layout_gravity="center_vertical"

View File

@@ -150,9 +150,11 @@ class OngoingCallController @Inject constructor(
val currentChipView = chipView
val timeView =
currentChipView?.findViewById<Chronometer>(R.id.ongoing_call_chip_time)
currentChipView?.findViewById<Chronometer>(R.id.ongoing_call_chip_time)
val backgroundView =
currentChipView?.findViewById<View>(R.id.ongoing_call_chip_background)
if (currentChipView != null && timeView != null) {
if (currentChipView != null && timeView != null && backgroundView != null) {
timeView.base = currentOngoingCallInfo.callStartTime -
System.currentTimeMillis() +
systemClock.elapsedRealtime()
@@ -162,7 +164,7 @@ class OngoingCallController @Inject constructor(
logger.logChipClicked()
activityStarter.postStartActivityDismissingKeyguard(
currentOngoingCallInfo.intent, 0,
ActivityLaunchAnimator.Controller.fromView(it))
ActivityLaunchAnimator.Controller.fromView(backgroundView))
}
setUpUidObserver(currentOngoingCallInfo)