Implement the Copyable interface to PhoneNumberPreferenceController
Change-Id: I70085cffe13047ac808d1bf08a467f693b1d8737 Fixes: 118398321 Test: manual and robotests
This commit is contained in:
@@ -19,7 +19,7 @@ package com.android.settings.slices;
|
||||
/**
|
||||
* Provide the copy ability for preference controller to copy the data to the clipboard.
|
||||
*/
|
||||
public interface CopyableSlice {
|
||||
public interface Copyable {
|
||||
/**
|
||||
* Copy the key slice information to the clipboard.
|
||||
* It is highly recommended to show the toast to notify users when implemented this function.
|
||||
@@ -185,7 +185,7 @@ public class SliceBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
final BasePreferenceController controller = getPreferenceController(context, key);
|
||||
|
||||
if (!(controller instanceof CopyableSlice)) {
|
||||
if (!(controller instanceof Copyable)) {
|
||||
throw new IllegalArgumentException(
|
||||
"Copyable action passed for a non-copyable key:" + key);
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class SliceBroadcastReceiver extends BroadcastReceiver {
|
||||
return;
|
||||
}
|
||||
|
||||
((CopyableSlice) controller).copy();
|
||||
((Copyable) controller).copy();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -94,7 +94,7 @@ public class SliceBuilderUtils {
|
||||
return buildUnavailableSlice(context, sliceData);
|
||||
}
|
||||
|
||||
if (controller instanceof CopyableSlice) {
|
||||
if (controller instanceof Copyable) {
|
||||
return buildCopyableSlice(context, sliceData, controller);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user