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:
@@ -19,16 +19,22 @@ package com.android.settings.panel;
|
||||
import static com.android.settingslib.media.MediaOutputSliceConstants.ACTION_MEDIA_OUTPUT;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
|
||||
public class PanelFeatureProviderImpl implements PanelFeatureProvider {
|
||||
|
||||
@Override
|
||||
public PanelContent getPanel(Context context, String panelType, String mediaPackageName) {
|
||||
public PanelContent getPanel(Context context, Bundle bundle) {
|
||||
if (context == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final String panelType =
|
||||
bundle.getString(SettingsPanelActivity.KEY_PANEL_TYPE_ARGUMENT);
|
||||
final String mediaPackageName =
|
||||
bundle.getString(SettingsPanelActivity.KEY_MEDIA_PACKAGE_NAME);
|
||||
|
||||
switch (panelType) {
|
||||
case Settings.Panel.ACTION_INTERNET_CONNECTIVITY:
|
||||
return InternetConnectivityPanel.create(context);
|
||||
|
Reference in New Issue
Block a user