summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/preferredsim/suggestion
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/preferredsim/suggestion')
-rw-r--r--java/com/android/dialer/preferredsim/suggestion/SuggestionProvider.java15
-rw-r--r--java/com/android/dialer/preferredsim/suggestion/stub/StubSuggestionProvider.java3
2 files changed, 16 insertions, 2 deletions
diff --git a/java/com/android/dialer/preferredsim/suggestion/SuggestionProvider.java b/java/com/android/dialer/preferredsim/suggestion/SuggestionProvider.java
index 61a831b5e..c1114b3f3 100644
--- a/java/com/android/dialer/preferredsim/suggestion/SuggestionProvider.java
+++ b/java/com/android/dialer/preferredsim/suggestion/SuggestionProvider.java
@@ -32,17 +32,25 @@ public interface SuggestionProvider {
// The SIM has the same carrier as the callee.
INTRA_CARRIER,
// The user has selected the SIM for the callee multiple times.
- FREQUENT
+ FREQUENT,
+ // The user has select the SIM for this category of calls (contacts from certain accounts,
+ // etc.).
+ USER_SET,
}
/** The suggestion. */
class Suggestion {
@NonNull public final PhoneAccountHandle phoneAccountHandle;
@NonNull public final Reason reason;
+ public final boolean shouldAutoSelect;
- public Suggestion(@NonNull PhoneAccountHandle phoneAccountHandle, @NonNull Reason reason) {
+ public Suggestion(
+ @NonNull PhoneAccountHandle phoneAccountHandle,
+ @NonNull Reason reason,
+ boolean shouldAutoSelect) {
this.phoneAccountHandle = Assert.isNotNull(phoneAccountHandle);
this.reason = Assert.isNotNull(reason);
+ this.shouldAutoSelect = shouldAutoSelect;
}
}
@@ -55,4 +63,7 @@ public interface SuggestionProvider {
@NonNull Context context,
@NonNull String number,
@NonNull PhoneAccountHandle phoneAccountHandle);
+
+ @WorkerThread
+ void reportIncorrectSuggestion(@NonNull Context context, @NonNull String number);
}
diff --git a/java/com/android/dialer/preferredsim/suggestion/stub/StubSuggestionProvider.java b/java/com/android/dialer/preferredsim/suggestion/stub/StubSuggestionProvider.java
index e3240448d..6fb73ac5d 100644
--- a/java/com/android/dialer/preferredsim/suggestion/stub/StubSuggestionProvider.java
+++ b/java/com/android/dialer/preferredsim/suggestion/stub/StubSuggestionProvider.java
@@ -41,4 +41,7 @@ public class StubSuggestionProvider implements SuggestionProvider {
@NonNull Context context,
@NonNull String number,
@NonNull PhoneAccountHandle phoneAccountHandle) {}
+
+ @Override
+ public void reportIncorrectSuggestion(@NonNull Context context, @NonNull String number) {}
}