Fix UsbResolverActivity SuperNotCalledException (pt2)
Instead of calling the normal path, this change creates
a path to call Activity#onCreate directly and avoid
initializing state when the activity is about to self
finish()
Bug: 201719995
Test: adb shell am start -n
com.android.systemui/com.android.systemui.usb.UsbResolverActivity
Change-Id: I40ee792e341b828a3e288b1fc713f6df13728b4a
This commit is contained in:
@@ -314,6 +314,15 @@ public class ResolverActivity extends Activity implements
|
||||
return intent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call {@link Activity#onCreate} without initializing anything further. This should
|
||||
* only be used when the activity is about to be immediately finished to avoid wasting
|
||||
* initializing steps and leaking resources.
|
||||
*/
|
||||
protected void super_onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// Use a specialized prompt when we're handling the 'Home' app startActivity()
|
||||
|
||||
Reference in New Issue
Block a user