Merge "profcollet: Fix possible NPE" am: b57c42cb43 am: 699159eeea

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

Change-Id: I73853eb54d566b9e6e0d1a3bb773ce3818086ac2
This commit is contained in:
Treehugger Robot
2022-03-08 14:35:06 +00:00
committed by Automerger Merge Worker

View File

@@ -112,7 +112,7 @@ public final class ProfcollectForwardingService extends SystemService {
try { try {
mIProfcollect.registerProviderStatusCallback(mProviderStatusCallback); mIProfcollect.registerProviderStatusCallback(mProviderStatusCallback);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(LOG_TAG, e.getMessage()); Log.e(LOG_TAG, "Failed to register provider status callback: " + e.getMessage());
} }
} }
@@ -123,7 +123,7 @@ public final class ProfcollectForwardingService extends SystemService {
try { try {
return !mIProfcollect.get_supported_provider().isEmpty(); return !mIProfcollect.get_supported_provider().isEmpty();
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(LOG_TAG, e.getMessage()); Log.e(LOG_TAG, "Failed to get supported provider: " + e.getMessage());
return false; return false;
} }
} }
@@ -219,7 +219,8 @@ public final class ProfcollectForwardingService extends SystemService {
try { try {
sSelfService.mIProfcollect.process(); sSelfService.mIProfcollect.process();
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(LOG_TAG, e.getMessage()); Log.e(LOG_TAG, "Failed to process profiles in background: "
+ e.getMessage());
} }
}); });
return true; return true;
@@ -264,7 +265,7 @@ public final class ProfcollectForwardingService extends SystemService {
try { try {
mIProfcollect.trace_once("applaunch"); mIProfcollect.trace_once("applaunch");
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(LOG_TAG, e.getMessage()); Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage());
} }
}); });
} }
@@ -348,7 +349,7 @@ public final class ProfcollectForwardingService extends SystemService {
.putExtra("filename", reportName); .putExtra("filename", reportName);
context.sendBroadcast(intent); context.sendBroadcast(intent);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.e(LOG_TAG, e.getMessage()); Log.e(LOG_TAG, "Failed to upload report: " + e.getMessage());
} }
}); });
} }