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

Commit cb473052 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

Change-Id: Ic73dbe9bf5fe1f5b711ee24adbc72c1b066a63a4
parents cfbc2491 e705e267
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -344,6 +344,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");
@@ -361,7 +366,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);