From c02f41471297f31f08068a9e6aab3be8dd813a11 Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Mon, 11 May 2020 11:12:36 -0700 Subject: Do not throw RemoteException for notifyUserActivity PowerManager does not rely on TelephonyManager#notifyUserActivity to complete successfully since it is a oneway notification. If it fails, due to telephony not being alive, do not throw a RemoteException. Bug: 156203930 Test: manual Change-Id: I4c788fef5a887c45dbc3a20b7c8af40beed8d00a --- telephony/java/android/telephony/TelephonyManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 97a4f4e4f050..e85dfbefc752 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -13098,7 +13098,9 @@ public class TelephonyManager { service.userActivity(); } } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); + // one-way notification, if telephony is not available, it is okay to not throw + // exception here. + Log.w(TAG, "notifyUserActivity exception: " + e.getMessage()); } } -- cgit v1.2.3-59-g8ed1b