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

Commit 7d51e555 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

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
parent 98d126ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@
    android:layout_gravity="center_vertical|start"
    android:layout_gravity="center_vertical|start"
>
>
    <LinearLayout
    <LinearLayout
        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"
        android:layout_gravity="center_vertical"
        android:layout_gravity="center_vertical"
+5 −3
Original line number Original line Diff line number Diff line
@@ -151,8 +151,10 @@ class OngoingCallController @Inject constructor(
        val currentChipView = chipView
        val currentChipView = chipView
        val timeView =
        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 -
            timeView.base = currentOngoingCallInfo.callStartTime -
                    System.currentTimeMillis() +
                    System.currentTimeMillis() +
                    systemClock.elapsedRealtime()
                    systemClock.elapsedRealtime()
@@ -162,7 +164,7 @@ class OngoingCallController @Inject constructor(
                logger.logChipClicked()
                logger.logChipClicked()
                activityStarter.postStartActivityDismissingKeyguard(
                activityStarter.postStartActivityDismissingKeyguard(
                        currentOngoingCallInfo.intent, 0,
                        currentOngoingCallInfo.intent, 0,
                        ActivityLaunchAnimator.Controller.fromView(it))
                        ActivityLaunchAnimator.Controller.fromView(backgroundView))
            }
            }


            setUpUidObserver(currentOngoingCallInfo)
            setUpUidObserver(currentOngoingCallInfo)