Merge "Frameworks: Handle exceptions in SystemProperties callbacks"
am: af3dc4fc70
Change-Id: Ib7b56bb493be1053d2277a68a1d64010eb7d6033
This commit is contained in:
@@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user