Fix collectExtraIntentKeys for nested LazyValue who is of custom class
collectExtraIntentKeys calls BaseBundle.get(key) method to try to find out if the intent contains extra intent. But if the Bundle contains a LazyValue of custom class, and the bundle's classLoader is not PathClassLoader (points to the custom class's path), then it would fail - a BadParcelableException would throw. ActivityThread only sets the intent's mExtra's classLoader correctly. This leaves nested intents (1+ levels deep) with default bootClassLoader. This could also happen if the bundle comes from other IPC methods (not as a starting intent's extra bundle). This CL fixed this issue by handling The BadParcelableException. This skips collectExtraIntentKeys method for custom and nested class objects. See go/prevent-intent-redirect-customclass for details. Bug: 375969761 Test: Manual Flag: android.security.prevent_intent_redirect Change-Id: I8a1ad2030e28e4e69740d97cbd1366a874f3a2fc
Loading
Please register or sign in to comment