Merge "Frameworks: Handle exceptions in SystemProperties callbacks"

am: af3dc4fc70

Change-Id: Ib7b56bb493be1053d2277a68a1d64010eb7d6033
This commit is contained in:
Andreas Gampe
2018-03-19 21:24:24 +00:00
committed by android-build-merger
3 changed files with 59 additions and 1 deletions

View File

@@ -189,7 +189,12 @@ public class SystemProperties {
}
ArrayList<Runnable> callbacks = new ArrayList<Runnable>(sChangeCallbacks);
for (int i=0; i<callbacks.size(); i++) {
callbacks.get(i).run();
try {
callbacks.get(i).run();
} catch (Throwable t) {
Log.wtf(TAG, "Exception in SystemProperties change callback", t);
// Ignore and try to go on.
}
}
}
}