From 7d51e5553a7f3a6e161ce5ad7820f008e7823ad6 Mon Sep 17 00:00:00 2001 From: Jordan Demeulenaere Date: Wed, 19 May 2021 14:23:13 +0200 Subject: [PATCH] Fix the ongoing call chip animation. See b/183229367#comment22 for before/after videos. Bug: 183229367 Test: Click an ongoing call chip Change-Id: I685c602cfa92a12230af4a687e84428c7c725d77 --- packages/SystemUI/res/layout/ongoing_call_chip.xml | 1 + .../statusbar/phone/ongoingcall/OngoingCallController.kt | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/res/layout/ongoing_call_chip.xml b/packages/SystemUI/res/layout/ongoing_call_chip.xml index f8175d4766305..5389d9bbcc977 100644 --- a/packages/SystemUI/res/layout/ongoing_call_chip.xml +++ b/packages/SystemUI/res/layout/ongoing_call_chip.xml @@ -23,6 +23,7 @@ android:layout_gravity="center_vertical|start" > (R.id.ongoing_call_chip_time) + currentChipView?.findViewById(R.id.ongoing_call_chip_time) + val backgroundView = + currentChipView?.findViewById(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)