Clean up unused Sliceable.copy()
Sliceable.isCopyableSlice() is not set to true for any controller, so this function is not used. Usage is removed in Change: I81474aed994678c42d73cc59e169573880de1378 Bug: 227722942 Test: robotest & manual Change-Id: I86e23aa8ad43f60b5017ff0a278e20e3f727706c
This commit is contained in:
@@ -19,7 +19,6 @@ package com.android.settings.slices;
|
||||
import static com.android.settings.bluetooth.BluetoothSliceBuilder.ACTION_BLUETOOTH_SLICE_CHANGED;
|
||||
import static com.android.settings.network.telephony.Enhanced4gLteSliceHelper.ACTION_ENHANCED_4G_LTE_CHANGED;
|
||||
import static com.android.settings.notification.zen.ZenModeSliceBuilder.ACTION_ZEN_MODE_SLICE_CHANGED;
|
||||
import static com.android.settings.slices.SettingsSliceProvider.ACTION_COPY;
|
||||
import static com.android.settings.slices.SettingsSliceProvider.ACTION_SLIDER_CHANGED;
|
||||
import static com.android.settings.slices.SettingsSliceProvider.ACTION_TOGGLE_CHANGED;
|
||||
import static com.android.settings.slices.SettingsSliceProvider.EXTRA_SLICE_KEY;
|
||||
@@ -100,9 +99,6 @@ public class SliceBroadcastReceiver extends BroadcastReceiver {
|
||||
.getNewWifiCallingSliceHelper(context)
|
||||
.handleWifiCallingPreferenceChanged(intent);
|
||||
break;
|
||||
case ACTION_COPY:
|
||||
handleCopyAction(context, sliceUri, key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,29 +167,6 @@ public class SliceBroadcastReceiver extends BroadcastReceiver {
|
||||
context.getContentResolver().notifyChange(sliceUri, null /* observer */);
|
||||
}
|
||||
|
||||
private void handleCopyAction(Context context, Uri sliceUri, String key) {
|
||||
if (TextUtils.isEmpty(key)) {
|
||||
throw new IllegalArgumentException("No key passed to Intent for controller");
|
||||
}
|
||||
|
||||
final BasePreferenceController controller = getPreferenceController(context, key);
|
||||
|
||||
if (!(controller instanceof Sliceable)) {
|
||||
throw new IllegalArgumentException(
|
||||
"Copyable action passed for a non-copyable key:" + key);
|
||||
}
|
||||
|
||||
if (!controller.isAvailable()) {
|
||||
Log.w(TAG, "Can't update " + key + " since the setting is unavailable");
|
||||
if (!controller.hasAsyncUpdate()) {
|
||||
context.getContentResolver().notifyChange(sliceUri, null /* observer */);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
controller.copy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Log Slice value update events into MetricsFeatureProvider. The logging schema generally
|
||||
* follows the pattern in SharedPreferenceLogger.
|
||||
|
||||
Reference in New Issue
Block a user