Merge "Update Instrumentation.newActivity to pass non-null application." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
850c6662b0
@@ -1182,6 +1182,10 @@ public class Instrumentation {
|
||||
IllegalAccessException {
|
||||
Activity activity = (Activity)clazz.newInstance();
|
||||
ActivityThread aThread = null;
|
||||
// Activity.attach expects a non-null Application Object.
|
||||
if (application == null) {
|
||||
application = new Application();
|
||||
}
|
||||
activity.attach(context, aThread, this, token, 0 /* ident */, application, intent,
|
||||
info, title, parent, id,
|
||||
(Activity.NonConfigurationInstances)lastNonConfigurationInstance,
|
||||
|
||||
Reference in New Issue
Block a user