Change Panels creation interface to take a bundle

Fixes: 124399577
Test: robolectric
adb shell am start -a android.settings.panel.action.WIFI
adb shell am start -a android.settings.panel.action.VOLUME

Change-Id: I9e13357444e4ebeee50fb8cc68fbc974ce5fffb6
This commit is contained in:
Raff Tsai
2019-10-18 12:51:28 +08:00
parent 4b4b7e76c4
commit dfba9a0f6d
7 changed files with 31 additions and 25 deletions

View File

@@ -38,7 +38,6 @@ import com.android.settings.testutils.FakeFeatureFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
@@ -63,7 +62,7 @@ public class PanelFragmentTest {
mFakeFeatureFactory = FakeFeatureFactory.setupForTest();
mFakeFeatureFactory.panelFeatureProvider = mPanelFeatureProvider;
mFakePanelContent = new FakePanelContent();
doReturn(mFakePanelContent).when(mPanelFeatureProvider).getPanel(any(), any(), any());
doReturn(mFakePanelContent).when(mPanelFeatureProvider).getPanel(any(), any());
mActivity = spy(Robolectric.buildActivity(FakeSettingsPanelActivity.class).setup().get());
@@ -83,7 +82,7 @@ public class PanelFragmentTest {
new LinearLayout(mContext), null);
PanelSlicesLoaderCountdownLatch countdownLatch =
mPanelFragment.mPanelSlicesLoaderCountdownLatch;
for (Uri sliecUri: mFakePanelContent.getSlices()) {
for (Uri sliecUri : mFakePanelContent.getSlices()) {
countdownLatch.markSliceLoaded(sliecUri);
}