summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hall Liu <hallliu@google.com> 2019-12-04 00:28:48 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-12-04 00:28:48 +0000
commitcebf7916764a86bee58d71308b2681c8e011abe2 (patch)
tree723b7a93628f5996f752ab3558801a896b62c227
parent2b65793cd6e118ad6412846d967ad9ab216e3dd1 (diff)
parent69554cff8de17c7d57cd12cce9f9afb07d3a6645 (diff)
Merge "Change name of setShouldScreenCallFurther"
-rw-r--r--api/system-current.txt2
-rw-r--r--api/test-current.txt2
-rw-r--r--telecomm/java/android/telecom/Call.java2
-rw-r--r--telecomm/java/android/telecom/CallScreeningService.java25
4 files changed, 15 insertions, 16 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index bc5500d10330..670752e9fdaf 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -7339,7 +7339,7 @@ package android.telecom {
}
public static class CallScreeningService.CallResponse.Builder {
- method public android.telecom.CallScreeningService.CallResponse.Builder setShouldScreenCallFurther(boolean);
+ method @NonNull public android.telecom.CallScreeningService.CallResponse.Builder setShouldScreenCallViaAudioProcessing(boolean);
}
public abstract class Conference extends android.telecom.Conferenceable {
diff --git a/api/test-current.txt b/api/test-current.txt
index db0e96e640c5..5d6f9418dee9 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -2801,7 +2801,7 @@ package android.telecom {
}
public static class CallScreeningService.CallResponse.Builder {
- method public android.telecom.CallScreeningService.CallResponse.Builder setShouldScreenCallFurther(boolean);
+ method @NonNull public android.telecom.CallScreeningService.CallResponse.Builder setShouldScreenCallViaAudioProcessing(boolean);
}
public abstract class Conference extends android.telecom.Conferenceable {
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 3ecf8d73d0a6..a0739c49fb76 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -1512,7 +1512,6 @@ public final class Call {
*/
@SystemApi
@TestApi
- //@RequiresPermission(android.Manifest.permission.BACKGROUND_CALL_AUDIO)
public void enterBackgroundAudioProcessing() {
if (mState != STATE_ACTIVE && mState != STATE_RINGING) {
throw new IllegalStateException("Call must be active or ringing");
@@ -1534,7 +1533,6 @@ public final class Call {
*/
@SystemApi
@TestApi
- //@RequiresPermission(android.Manifest.permission.BACKGROUND_CALL_AUDIO)
public void exitBackgroundAudioProcessing(boolean shouldRing) {
if (mState != STATE_AUDIO_PROCESSING) {
throw new IllegalStateException("Call must in the audio processing state");
diff --git a/telecomm/java/android/telecom/CallScreeningService.java b/telecomm/java/android/telecom/CallScreeningService.java
index b91787ccff83..f8722f4ea653 100644
--- a/telecomm/java/android/telecom/CallScreeningService.java
+++ b/telecomm/java/android/telecom/CallScreeningService.java
@@ -144,7 +144,7 @@ public abstract class CallScreeningService extends Service {
private final boolean mShouldSilenceCall;
private final boolean mShouldSkipCallLog;
private final boolean mShouldSkipNotification;
- private final boolean mShouldScreenCallFurther;
+ private final boolean mShouldScreenCallViaAudioProcessing;
private CallResponse(
boolean shouldDisallowCall,
@@ -152,13 +152,13 @@ public abstract class CallScreeningService extends Service {
boolean shouldSilenceCall,
boolean shouldSkipCallLog,
boolean shouldSkipNotification,
- boolean shouldScreenCallFurther) {
+ boolean shouldScreenCallViaAudioProcessing) {
if (!shouldDisallowCall
&& (shouldRejectCall || shouldSkipCallLog || shouldSkipNotification)) {
throw new IllegalStateException("Invalid response state for allowed call.");
}
- if (shouldDisallowCall && shouldScreenCallFurther) {
+ if (shouldDisallowCall && shouldScreenCallViaAudioProcessing) {
throw new IllegalStateException("Invalid response state for allowed call.");
}
@@ -167,7 +167,7 @@ public abstract class CallScreeningService extends Service {
mShouldSkipCallLog = shouldSkipCallLog;
mShouldSkipNotification = shouldSkipNotification;
mShouldSilenceCall = shouldSilenceCall;
- mShouldScreenCallFurther = shouldScreenCallFurther;
+ mShouldScreenCallViaAudioProcessing = shouldScreenCallViaAudioProcessing;
}
/*
@@ -211,8 +211,8 @@ public abstract class CallScreeningService extends Service {
* for further screening of the call.
* @hide
*/
- public boolean getShouldScreenCallFurther() {
- return mShouldScreenCallFurther;
+ public boolean getShouldScreenCallViaAudioProcessing() {
+ return mShouldScreenCallViaAudioProcessing;
}
public static class Builder {
@@ -221,7 +221,7 @@ public abstract class CallScreeningService extends Service {
private boolean mShouldSilenceCall;
private boolean mShouldSkipCallLog;
private boolean mShouldSkipNotification;
- private boolean mShouldScreenCallFurther;
+ private boolean mShouldScreenCallViaAudioProcessing;
/**
* Sets whether the incoming call should be blocked.
@@ -285,13 +285,14 @@ public abstract class CallScreeningService extends Service {
* This request will only be honored if the {@link CallScreeningService} shares the same
* uid as the default dialer app. Otherwise, the call will go through as usual.
*
- * @param shouldScreenCallFurther Whether to request further call screening.
+ * @param shouldScreenCallViaAudioProcessing Whether to request further call screening.
* @hide
*/
@SystemApi
@TestApi
- public Builder setShouldScreenCallFurther(boolean shouldScreenCallFurther) {
- mShouldScreenCallFurther = shouldScreenCallFurther;
+ public @NonNull Builder setShouldScreenCallViaAudioProcessing(
+ boolean shouldScreenCallViaAudioProcessing) {
+ mShouldScreenCallViaAudioProcessing = shouldScreenCallViaAudioProcessing;
return this;
}
@@ -302,7 +303,7 @@ public abstract class CallScreeningService extends Service {
mShouldSilenceCall,
mShouldSkipCallLog,
mShouldSkipNotification,
- mShouldScreenCallFurther);
+ mShouldScreenCallViaAudioProcessing);
}
}
}
@@ -380,7 +381,7 @@ public abstract class CallScreeningService extends Service {
new ComponentName(getPackageName(), getClass().getName()));
} else if (response.getSilenceCall()) {
mCallScreeningAdapter.silenceCall(callDetails.getTelecomCallId());
- } else if (response.getShouldScreenCallFurther()) {
+ } else if (response.getShouldScreenCallViaAudioProcessing()) {
mCallScreeningAdapter.screenCallFurther(callDetails.getTelecomCallId());
} else {
mCallScreeningAdapter.allowCall(callDetails.getTelecomCallId());