b/17209397. NOOP getServiceMap() if we are in the tombstone app.

If this is the Email Tombstone app, we throw an ISE when
we launch the app after resetting data because certain
services do not exist in this version of the app.

Change-Id: I01d88ac2b745d45c1835354b36837f8aaaf378d8
This commit is contained in:
Anthony Lee 2014-08-25 14:12:16 -07:00
parent 65c217943a
commit 0397e7fb23
1 changed files with 6 additions and 0 deletions

View File

@ -543,6 +543,12 @@ public class EmailServiceUtils {
}
final ImmutableMap.Builder<String, EmailServiceInfo> builder = ImmutableMap.builder();
if (!context.getResources().getBoolean(R.bool.enable_services)) {
// Return an empty map if services have been disabled because this is the Email
// Tombstone app.
sServiceMap = builder.build();
return sServiceMap;
}
try {
final Resources res = context.getResources();