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

Commit 52b0ce0f authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #4291805: Tap Fish crashes on launch

The activity manager got a little too aggressive about argument validation.

Change-Id: I3cca0cd3135b98e5c50d26db778ec4ec28a47ec1
parent 6bb8b0ec
Loading
Loading
Loading
Loading
+10 −11
Original line number Original line Diff line number Diff line
@@ -3914,9 +3914,7 @@ public final class ActivityManagerService extends ActivityManagerNative
            }
            }
            for (int i=0; i<intents.length; i++) {
            for (int i=0; i<intents.length; i++) {
                Intent intent = intents[i];
                Intent intent = intents[i];
                if (intent == null) {
                if (intent != null) {
                    throw new IllegalArgumentException("Null intent at index " + i);
                }
                    if (intent.hasFileDescriptors()) {
                    if (intent.hasFileDescriptors()) {
                        throw new IllegalArgumentException("File descriptors passed in Intent");
                        throw new IllegalArgumentException("File descriptors passed in Intent");
                    }
                    }
@@ -3927,6 +3925,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    }
                    }
                    intents[i] = new Intent(intent);
                    intents[i] = new Intent(intent);
                }
                }
            }
            if (resolvedTypes != null && resolvedTypes.length != intents.length) {
            if (resolvedTypes != null && resolvedTypes.length != intents.length) {
                throw new IllegalArgumentException(
                throw new IllegalArgumentException(
                        "Intent array length does not match resolvedTypes length");
                        "Intent array length does not match resolvedTypes length");