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

Commit 70908e55 authored by Tim Murray's avatar Tim Murray Committed by Automerger Merge Worker
Browse files

Merge "DynamicCodeLoggingService: avoid object churn" into sc-dev am: 01d09d21

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13420621

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I516e0b9043f055942322c7b5adf9e8cc3d07c492
parents 2687e684 01d09d21
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ public class DynamicCodeLoggingService extends JobService {

                List<EventLog.Event> events = new ArrayList<>();
                EventLog.readEvents(tags, events);

                Matcher matcher = EXECUTE_NATIVE_AUDIT_PATTERN.matcher("");
                for (int i = 0; i < events.size(); ++i) {
                    if (mAuditWatchingStopRequested) {
                        Log.w(TAG, "Stopping AuditWatchingJob run at scheduler request");
@@ -259,7 +259,9 @@ public class DynamicCodeLoggingService extends JobService {

                    // And then use a regular expression to verify it's one of the messages we're
                    // interested in and to extract the path of the file being loaded.
                    Matcher matcher = EXECUTE_NATIVE_AUDIT_PATTERN.matcher(message);
                    // Reuse the Matcher to avoid unnecessary string garbage caused by libcore's
                    // regex matching.
                    matcher.reset(message);
                    if (!matcher.matches()) {
                        continue;
                    }