Remove unused variable

-remove VIEW_TYPE_SLIDER_LARGE_ICON
-remove MEDIA_OUTPUT_GROUP_SLICE_URI
-remove MEDIA_OUTPUT_SLICE_URI

Bug: 175850711
Test: build pass
Change-Id: Iecf987cc91934a7598762523814f5f575302dde2
This commit is contained in:
timhypeng
2020-12-17 16:43:32 +08:00
committed by tim peng
parent deb93069c3
commit 7c86980bf3
6 changed files with 3 additions and 126 deletions

View File

@@ -31,7 +31,6 @@ import java.util.List;
public interface PanelContent extends Instrumentable {
int VIEW_TYPE_SLIDER = 1;
int VIEW_TYPE_SLIDER_LARGE_ICON = 2;
/**
* @return a icon for the title of the Panel.

View File

@@ -240,7 +240,7 @@ public class PanelFragment extends Fragment {
final IconCompat icon = mPanel.getIcon();
final CharSequence title = mPanel.getTitle();
if (icon != null || mPanel.getViewType() == PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON) {
if (icon != null) {
enablePanelHeader(icon, title);
} else {
mTitleView.setVisibility(View.VISIBLE);
@@ -248,11 +248,7 @@ public class PanelFragment extends Fragment {
mTitleView.setText(title);
}
if (mPanel.getViewType() == PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON) {
mFooterDivider.setVisibility(View.VISIBLE);
} else {
mFooterDivider.setVisibility(View.GONE);
}
mFooterDivider.setVisibility(View.GONE);
mSeeMoreButton.setOnClickListener(getSeeMoreListener());
mDoneButton.setOnClickListener(getCloseListener());

View File

@@ -16,9 +16,7 @@
package com.android.settings.panel;
import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_GROUP_SLICE_URI;
import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_INDICATOR_SLICE_URI;
import static com.android.settings.slices.CustomSliceRegistry.MEDIA_OUTPUT_SLICE_URI;
import android.app.settings.SettingsEnums;
import android.content.Context;
@@ -75,8 +73,6 @@ public class PanelSlicesAdapter
View view;
if (viewType == PanelContent.VIEW_TYPE_SLIDER) {
view = inflater.inflate(R.layout.panel_slice_slider_row, viewGroup, false);
} else if (viewType == PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON) {
view = inflater.inflate(R.layout.panel_slice_slider_row_large_icon, viewGroup, false);
} else {
view = inflater.inflate(R.layout.panel_slice_row, viewGroup, false);
}
@@ -142,15 +138,6 @@ public class PanelSlicesAdapter
final Slice slice = sliceLiveData.getValue();
if (slice == null || slice.getUri().equals(MEDIA_OUTPUT_INDICATOR_SLICE_URI)) {
mDividerAllowedAbove = false;
} else if (position == 0 && (slice.getUri().equals(MEDIA_OUTPUT_SLICE_URI)
|| slice.getUri().equals(MEDIA_OUTPUT_GROUP_SLICE_URI))) {
sliceView.setClickable(false);
// Customize output switcher slice padding
final int padding = mPanelFragment.getResources().getDimensionPixelSize(
R.dimen.output_switcher_slice_padding_top);
mSliceSliderLayout.setPadding(mSliceSliderLayout.getPaddingLeft(), padding,
mSliceSliderLayout.getPaddingRight(),
padding);
}
// Log Panel interaction
@@ -175,7 +162,7 @@ public class PanelSlicesAdapter
@Override
public boolean isDividerAllowedBelow() {
return mPanelFragment.getPanelViewType() != PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON;
return true;
}
}
}

View File

@@ -253,26 +253,6 @@ public class CustomSliceRegistry {
.appendPath(ZenModeButtonPreferenceController.KEY)
.build();
/**
* Backing Uri for the Media output Slice.
*/
public static Uri MEDIA_OUTPUT_SLICE_URI = new Uri.Builder()
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(SettingsSliceProvider.SLICE_AUTHORITY)
.appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
.appendPath(MediaOutputSliceConstants.KEY_MEDIA_OUTPUT)
.build();
/**
* Backing Uri for the Media output group Slice.
*/
public static Uri MEDIA_OUTPUT_GROUP_SLICE_URI = new Uri.Builder()
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(SettingsSliceProvider.SLICE_AUTHORITY)
.appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
.appendPath(MediaOutputSliceConstants.KEY_MEDIA_OUTPUT_GROUP)
.build();
/**
* Backing Uri for the Media output indicator Slice.
*/