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

Commit 843888e7 authored by Ricky Chow's avatar Ricky Chow Committed by Jerome Gaillard
Browse files

Added null check to fileobserver callback

Test: Manual
Bug: 139145421
Change-Id: I7eb87729217ceefcccab3f885eb9fe01dd2bfcc1
(cherry picked from commit dffecba3a2a0006f4a5ba452610ad973bbe175dc)
parent 6762470f
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -32,10 +32,12 @@ import android.os.RemoteException;
import android.util.ArrayMap;
import android.util.ArrayMap;
import android.util.Slog;
import android.util.Slog;
import android.util.Xml;
import android.util.Xml;

import com.android.internal.util.ArrayUtils;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.XmlUtils;
import com.android.internal.util.XmlUtils;
import com.android.server.EventLogTags;
import com.android.server.EventLogTags;
import com.android.server.IntentResolver;
import com.android.server.IntentResolver;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserException;


@@ -562,7 +564,7 @@ public class IntentFirewall {


        @Override
        @Override
        public void onEvent(int event, String path) {
        public void onEvent(int event, String path) {
            if (path.endsWith(".xml")) {
            if (path != null && path.endsWith(".xml")) {
                // we wait 250ms before taking any action on an event, in order to dedup multiple
                // we wait 250ms before taking any action on an event, in order to dedup multiple
                // events. E.g. a delete event followed by a create event followed by a subsequent
                // events. E.g. a delete event followed by a create event followed by a subsequent
                // write+close event
                // write+close event