Added null check to fileobserver callback

Test: Manual
Bug: 139145421
Change-Id: I7eb87729217ceefcccab3f885eb9fe01dd2bfcc1
(cherry picked from commit dffecba3a2a0006f4a5ba452610ad973bbe175dc)
This commit is contained in:
Ricky Chow
2019-08-12 14:36:20 +10:00
committed by Jerome Gaillard
parent 6762470fc2
commit 843888e7ec

View File

@@ -32,10 +32,12 @@ import android.os.RemoteException;
import android.util.ArrayMap;
import android.util.Slog;
import android.util.Xml;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.XmlUtils;
import com.android.server.EventLogTags;
import com.android.server.IntentResolver;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -562,7 +564,7 @@ public class IntentFirewall {
@Override
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
// events. E.g. a delete event followed by a create event followed by a subsequent
// write+close event