Update testcases which failed due to the SupportLibrary changed
Fragment.oncreate() causes an IllegalStateException. We use a ShadowFragment to stop the calling sequence. Fixes: 135086559 Test: robotest Change-Id: I601e0f2513f826b0b7749cb2c013b7e4c0a94a33
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings.testutils.shadow;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import org.robolectric.annotation.Implementation;
|
||||
@@ -26,6 +28,11 @@ public class ShadowFragment {
|
||||
|
||||
private Fragment mTargetFragment;
|
||||
|
||||
@Implementation
|
||||
public void onCreate(Bundle icicle) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Implementation
|
||||
protected void setTargetFragment(Fragment fragment, int requestCode) {
|
||||
mTargetFragment = fragment;
|
||||
|
Reference in New Issue
Block a user