From 0a8217f519ca36b4fc9c74a618b0917757251a02 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Tue, 9 Apr 2019 20:32:24 +0200 Subject: [PATCH] Catch all exceptions when calling startCheckpoint(). The existing code in vold throws exceptions based on errno, which can't be mapped to binder exceptions, and hence throw a RuntimeException instead. To prevent bringing system_server down with these, catch all exceptions for now. Bug: 130190815 Test: builds Change-Id: I3f5aaa12a01e4748ccb2b2467416c49645315cfb --- services/core/java/com/android/server/pm/StagingManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/pm/StagingManager.java b/services/core/java/com/android/server/pm/StagingManager.java index a0f0a3178d1b2..c5dd854852f6d 100644 --- a/services/core/java/com/android/server/pm/StagingManager.java +++ b/services/core/java/com/android/server/pm/StagingManager.java @@ -261,13 +261,13 @@ public class StagingManager { if (storageManager.supportsCheckpoint()) { storageManager.startCheckpoint(1 /* numRetries */); } - } catch (RemoteException e) { + } catch (Exception e) { // TODO(b/130190815) make a RemoteException again // While StorageManager lives in the same process, the native implementation // it calls through lives in 'vold'; so, this call can fail if 'vold' isn't // reachable. // Since we can live without filesystem checkpointing, just warn in this case // and continue. - Slog.w(TAG, "Could not start filesystem checkpoint."); + Slog.w(TAG, "Could not start filesystem checkpoint:", e); } session.setStagedSessionReady();