From 0397e7fb233bbf76f7ea30ab3e447f74d7c6bcce Mon Sep 17 00:00:00 2001 From: Anthony Lee Date: Mon, 25 Aug 2014 14:12:16 -0700 Subject: [PATCH] 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 --- src/com/android/email/service/EmailServiceUtils.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/android/email/service/EmailServiceUtils.java b/src/com/android/email/service/EmailServiceUtils.java index a2cda8d50..3532689c4 100644 --- a/src/com/android/email/service/EmailServiceUtils.java +++ b/src/com/android/email/service/EmailServiceUtils.java @@ -543,6 +543,12 @@ public class EmailServiceUtils { } final ImmutableMap.Builder 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();