summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/enrichedcall/EnrichedCallManager.java
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-05-05 15:23:13 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-05 15:23:13 +0000
commit300a8683b9c28424fb0f0c571a0abe128c461f69 (patch)
tree3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/dialer/enrichedcall/EnrichedCallManager.java
parentd67f1627521b174f12e0c247f154c7c93c5e408e (diff)
parent10b34a5ebf12e97ecba0caf3c8e30b476b038a96 (diff)
Update Dialer to V10 RC16
am: 10b34a5ebf Change-Id: Iea3e96ccdeaf1fa796ceca702cace82ca20f298c
Diffstat (limited to 'java/com/android/dialer/enrichedcall/EnrichedCallManager.java')
-rw-r--r--java/com/android/dialer/enrichedcall/EnrichedCallManager.java28
1 files changed, 23 insertions, 5 deletions
diff --git a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java
index fa822a659..0d3ed9e43 100644
--- a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java
+++ b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java
@@ -158,7 +158,7 @@ public interface EnrichedCallManager {
/**
* Callback fired when state changes. Listeners should call {@link #getSession(long)} or {@link
- * #getSession(String, String)} to retrieve the new state.
+ * #getSession(String, String, Filter)} to retrieve the new state.
*/
void onEnrichedCallStateChanged();
}
@@ -172,16 +172,25 @@ public interface EnrichedCallManager {
@MainThread
void registerStateChangedListener(@NonNull StateChangedListener listener);
- /** Returns the {@link Session} for the given unique call id, falling back to the number. */
+ /**
+ * Returns the {@link Session} for the given unique call id, falling back to the number. If a
+ * filter is provided, it will be applied to both the uniqueCalId and number lookups.
+ */
@MainThread
@Nullable
- Session getSession(@NonNull String uniqueCallId, @NonNull String number);
+ Session getSession(@NonNull String uniqueCallId, @NonNull String number, @Nullable Filter filter);
/** Returns the {@link Session} for the given sessionId, or {@code null} if no session exists. */
@MainThread
@Nullable
Session getSession(long sessionId);
+ @NonNull
+ Filter createIncomingCallComposerFilter();
+
+ @NonNull
+ Filter createOutgoingCallComposerFilter();
+
/**
* Starts an asynchronous process to get all historical data for the given number and set of
* {@link CallDetailsEntries}.
@@ -265,9 +274,13 @@ public interface EnrichedCallManager {
@MainThread
void unregisterVideoShareListener(@NonNull VideoShareListener listener);
- /** Called when an incoming video share invite is received. */
+ /**
+ * Called when an incoming video share invite is received.
+ *
+ * @return whether or not the invite was accepted by the manager (rejected when disabled)
+ */
@MainThread
- void onIncomingVideoShareInvite(long sessionId, @NonNull String number);
+ boolean onIncomingVideoShareInvite(long sessionId, @NonNull String number);
/**
* Starts a video share session with the given remote number.
@@ -303,4 +316,9 @@ public interface EnrichedCallManager {
*/
@MainThread
void endVideoShareSession(long sessionId);
+
+ /** Interface for filtering sessions (compatible with Predicate from Java 8) */
+ interface Filter {
+ boolean test(Session session);
+ }
}