Merge "Deprecate Settings panels and its infrastructure" into main
This commit is contained in:
@@ -28,7 +28,10 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the data class needed to create a Settings Panel. See {@link PanelFragment}.
|
* Represents the data class needed to create a Settings Panel. See {@link PanelFragment}.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public interface PanelContent extends Instrumentable {
|
public interface PanelContent extends Instrumentable {
|
||||||
|
|
||||||
int VIEW_TYPE_SLIDER = 1;
|
int VIEW_TYPE_SLIDER = 1;
|
||||||
|
@@ -18,7 +18,10 @@ package com.android.settings.panel;
|
|||||||
/**
|
/**
|
||||||
* PanelContentCallback provides a callback interface for {@link PanelFragment} to receive
|
* PanelContentCallback provides a callback interface for {@link PanelFragment} to receive
|
||||||
* events from {@link PanelContent}.
|
* events from {@link PanelContent}.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public interface PanelContentCallback {
|
public interface PanelContentCallback {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -19,6 +19,7 @@ package com.android.settings.panel;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public interface PanelFeatureProvider {
|
public interface PanelFeatureProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -27,6 +27,7 @@ import androidx.annotation.Nullable;
|
|||||||
import com.android.settings.Utils;
|
import com.android.settings.Utils;
|
||||||
import com.android.settings.flags.Flags;
|
import com.android.settings.flags.Flags;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class PanelFeatureProviderImpl implements PanelFeatureProvider {
|
public class PanelFeatureProviderImpl implements PanelFeatureProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -66,6 +66,7 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class PanelFragment extends Fragment {
|
public class PanelFragment extends Fragment {
|
||||||
|
|
||||||
private static final String TAG = "PanelFragment";
|
private static final String TAG = "PanelFragment";
|
||||||
@@ -519,6 +520,7 @@ public class PanelFragment extends Fragment {
|
|||||||
return mPanel.getViewType();
|
return mPanel.getViewType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
class LocalPanelCallback implements PanelContentCallback {
|
class LocalPanelCallback implements PanelContentCallback {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -21,7 +21,10 @@ package com.android.settings.panel;
|
|||||||
* <p>
|
* <p>
|
||||||
* Constants should only be removed if underlying panel, or use case is removed.
|
* Constants should only be removed if underlying panel, or use case is removed.
|
||||||
* </p>
|
* </p>
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class PanelLoggingContract {
|
public class PanelLoggingContract {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -48,7 +48,10 @@ import java.util.Map;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* RecyclerView adapter for Slices in Settings Panels.
|
* RecyclerView adapter for Slices in Settings Panels.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class PanelSlicesAdapter
|
public class PanelSlicesAdapter
|
||||||
extends RecyclerView.Adapter<PanelSlicesAdapter.SliceRowViewHolder> {
|
extends RecyclerView.Adapter<PanelSlicesAdapter.SliceRowViewHolder> {
|
||||||
|
|
||||||
@@ -112,7 +115,10 @@ public class PanelSlicesAdapter
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ViewHolder for binding Slices to SliceViews.
|
* ViewHolder for binding Slices to SliceViews.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class SliceRowViewHolder extends RecyclerView.ViewHolder
|
public class SliceRowViewHolder extends RecyclerView.ViewHolder
|
||||||
implements DividerItemDecoration.DividedViewHolder {
|
implements DividerItemDecoration.DividedViewHolder {
|
||||||
|
|
||||||
|
@@ -36,7 +36,10 @@ import java.util.concurrent.CountDownLatch;
|
|||||||
* {@link Uri}. Then check if all of the Slices have loaded with
|
* {@link Uri}. Then check if all of the Slices have loaded with
|
||||||
* {@link #isPanelReadyToLoad()}, which will return {@code true} the first time after all
|
* {@link #isPanelReadyToLoad()}, which will return {@code true} the first time after all
|
||||||
* Slices have loaded.
|
* Slices have loaded.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class PanelSlicesLoaderCountdownLatch {
|
public class PanelSlicesLoaderCountdownLatch {
|
||||||
private final Set<Uri> mLoadedSlices;
|
private final Set<Uri> mLoadedSlices;
|
||||||
private final CountDownLatch mCountDownLatch;
|
private final CountDownLatch mCountDownLatch;
|
||||||
|
@@ -42,7 +42,10 @@ import com.android.settingslib.core.lifecycle.HideNonSystemOverlayMixin;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialog Activity to host Settings Slices.
|
* Dialog Activity to host Settings Slices.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class SettingsPanelActivity extends FragmentActivity {
|
public class SettingsPanelActivity extends FragmentActivity {
|
||||||
|
|
||||||
private static final String TAG = "SettingsPanelActivity";
|
private static final String TAG = "SettingsPanelActivity";
|
||||||
|
@@ -29,7 +29,10 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake PanelContent for testing.
|
* Fake PanelContent for testing.
|
||||||
|
*
|
||||||
|
* @deprecated this is no longer used after V and will be removed.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class FakePanelContent implements PanelContent {
|
public class FakePanelContent implements PanelContent {
|
||||||
|
|
||||||
public static final String FAKE_ACTION = "fake_action";
|
public static final String FAKE_ACTION = "fake_action";
|
||||||
|
@@ -19,6 +19,7 @@ package com.android.settings.panel;
|
|||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
public class FakeSettingsPanelActivity extends SettingsPanelActivity {
|
public class FakeSettingsPanelActivity extends SettingsPanelActivity {
|
||||||
@Override
|
@Override
|
||||||
public ComponentName getCallingActivity() {
|
public ComponentName getCallingActivity() {
|
||||||
|
@@ -54,6 +54,7 @@ import org.robolectric.annotation.Config;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
@Ignore("b/313576125")
|
@Ignore("b/313576125")
|
||||||
@RunWith(RobolectricTestRunner.class)
|
@RunWith(RobolectricTestRunner.class)
|
||||||
@Config(shadows = {
|
@Config(shadows = {
|
||||||
|
@@ -67,6 +67,7 @@ import org.robolectric.annotation.Implements;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
@RunWith(RobolectricTestRunner.class)
|
@RunWith(RobolectricTestRunner.class)
|
||||||
@Config(shadows = PanelSlicesAdapterTest.ShadowLayoutInflater.class)
|
@Config(shadows = PanelSlicesAdapterTest.ShadowLayoutInflater.class)
|
||||||
public class PanelSlicesAdapterTest {
|
public class PanelSlicesAdapterTest {
|
||||||
|
@@ -59,6 +59,7 @@ import org.robolectric.android.controller.ActivityController;
|
|||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
import org.robolectric.util.ReflectionHelpers;
|
import org.robolectric.util.ReflectionHelpers;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
@RunWith(RobolectricTestRunner.class)
|
@RunWith(RobolectricTestRunner.class)
|
||||||
@Config(shadows = {
|
@Config(shadows = {
|
||||||
com.android.settings.testutils.shadow.ShadowFragment.class,
|
com.android.settings.testutils.shadow.ShadowFragment.class,
|
||||||
|
@@ -29,6 +29,7 @@ import org.junit.Before;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class PanelSlicesLoaderCountdownLatchTest {
|
public class PanelSlicesLoaderCountdownLatchTest {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user