diff options
author | Andreas Gampe <agampe@google.com> | 2015-03-06 15:29:06 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-03-07 00:18:15 +0000 |
commit | 18e99c128848d1467205222fc97f76056da54159 (patch) | |
tree | 13e9c83c333c7d8d37fea2026adf030f43d4b716 | |
parent | e59b7ce2564a916240e561b36f4476f2d72a65c5 (diff) | |
download | frameworks_base-18e99c128848d1467205222fc97f76056da54159.zip frameworks_base-18e99c128848d1467205222fc97f76056da54159.tar.gz frameworks_base-18e99c128848d1467205222fc97f76056da54159.tar.bz2 |
Frameworks/base: Remove unnecessary Pattern instance
Using a static Pattern in ActivityThread prevents compile-time
initialization of ActivityThread and GestureDetector, which depends
on the former.
It is also not efficient, as String.split has a fast path for simple
splits.
Bug: 19542228
Change-Id: I5bb843c08c81e0d259bb8afafa87a8467bb1730e
-rw-r--r-- | core/java/android/app/ActivityThread.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index bffe395..561a029 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -117,7 +117,6 @@ import java.util.Locale; import java.util.Map; import java.util.Objects; import java.util.TimeZone; -import java.util.regex.Pattern; import libcore.io.DropBox; import libcore.io.EventLogger; @@ -156,7 +155,6 @@ public final class ActivityThread { private static final boolean DEBUG_MEMORY_TRIM = false; private static final boolean DEBUG_PROVIDER = false; private static final long MIN_TIME_BETWEEN_GCS = 5*1000; - private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";"); private static final int SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003; private static final int LOG_ON_PAUSE_CALLED = 30021; private static final int LOG_ON_RESUME_CALLED = 30022; @@ -4918,7 +4916,7 @@ public final class ActivityThread { private ProviderClientRecord installProviderAuthoritiesLocked(IContentProvider provider, ContentProvider localProvider, IActivityManager.ContentProviderHolder holder) { - final String auths[] = PATTERN_SEMICOLON.split(holder.info.authority); + final String auths[] = holder.info.authority.split(";"); final int userId = UserHandle.getUserId(holder.info.applicationInfo.uid); final ProviderClientRecord pcr = new ProviderClientRecord( |