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

Commit 6219daf7 authored by Roy Chou's avatar Roy Chou Committed by Android Build Coastguard Worker
Browse files

fix(magnification): catch the unregister failing exception to prevent system crash

For b/399282180, the context intent receiver unregistering is called
when the FullScreenMagnificationGestureHandler#onDestroy, which implies
the handler is not needed anymore. That is, the fail execption when
unregistering would not affect the user experience, and it should not
make the system crash too.

Therefore, we use try-catch to catch the exception to prevent system
crash. Besides, since we still need more clues to identify the root
cause for the exception, we also log the exception for future
investigations.

This fix should be low risk, since we only catch the exception to
prevent the crash, and no logic changes.

Bug: 399282180
Flag: EXEMPT bugfix
Test: manually
      atest FullScreenMagnificationGestureHandlerTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:782870d5a691b44837bc0b5308eb7c02a22cb483)
Merged-In: I916719958ce3954076a1ad240ffaf150d619cd16
Change-Id: I916719958ce3954076a1ad240ffaf150d619cd16
parent 8416f014
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment