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

Commit 01e76fc2 authored by Ryan Mitchell's avatar Ryan Mitchell Committed by android-build-merger
Browse files

Merge "Check intent action in OMS.PackageReceiver for secure coding" am: e705e267 am: cb473052

am: 9676da6a

Change-Id: I8aa0242fd82c224f8daa0ccd520aaf2da3de5116
parents 00568892 9676da6a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -320,6 +320,11 @@ public final class OverlayManagerService extends SystemService {
    private final class PackageReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(@NonNull final Context context, @NonNull final Intent intent) {
            final String action = intent.getAction();
            if (action == null) {
                Slog.e(TAG, "Cannot handle package broadcast with null action");
                return;
            }
            final Uri data = intent.getData();
            if (data == null) {
                Slog.e(TAG, "Cannot handle package broadcast with null data");
@@ -337,7 +342,7 @@ public final class OverlayManagerService extends SystemService {
                userIds = new int[] { UserHandle.getUserId(extraUid) };
            }

            switch (intent.getAction()) {
            switch (action) {
                case ACTION_PACKAGE_ADDED:
                    if (replacing) {
                        onPackageUpgraded(packageName, userIds);