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

Commit 9676da6a 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

Change-Id: I147617ce86448735cc7e686f809ac9280c8e1c5b
parents 80ba1ad2 cb473052
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);