Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18e99c12 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

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
parent e59b7ce2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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(