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

Commit 97e150f8 authored by JW Wang's avatar JW Wang Committed by Chun-Wei Wang
Browse files

Don't persist APEX

Invalid UID will cause parsing error in libpackagelistparser
which in turn causes the 'run-as' command to fail.

APEX packages should never be used with 'run-as'.

Bug: 225756739
Fix: 233872653
Test: atest CtsJvmtiAttachingHostTestCases
Change-Id: I2a13768f114749f60f1f61a586674a71b84635ed
parent b539b724
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2699,6 +2699,11 @@ public final class Settings implements Watchable, Snappable {
                    }
                    continue;
                }
                if (pkg.getPkg().isApex()) {
                    // Don't persist APEX which doesn't have a valid app id and will cause parsing
                    // error in libpackagelistparser
                    continue;
                }

                final boolean isDebug = pkg.getPkg().isDebuggable();
                final IntArray gids = new IntArray();