diff options
| author | 2019-11-11 17:44:09 -0800 | |
|---|---|---|
| committer | 2019-11-11 17:44:09 -0800 | |
| commit | 69554cff8de17c7d57cd12cce9f9afb07d3a6645 (patch) | |
| tree | 3ede61b57e36b1cf05a8c2dece5f8d556e08a835 | |
| parent | 9eba10e17fd00dba92bc145ee4ea12396cd0ff5e (diff) | |
Change name of setShouldScreenCallFurther
Change the name of the method to setShouldScreenCallViaAudioProcessing
Also remove some commented out lines
Fixes: 143564665
Test: CTS
Change-Id: Ib163e3dad49ad2301238256339be9bb3ba5fec3a
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | api/test-current.txt | 2 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/Call.java | 2 | ||||
| -rw-r--r-- | telecomm/java/android/telecom/CallScreeningService.java | 25 |
4 files changed, 15 insertions, 16 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 33931122d0f3..943be956e4d7 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -6952,7 +6952,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 293ca55cf606..06dd70d43e51 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -2750,7 +2750,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 60290e3b785d..364c72ab368b 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -1507,7 +1507,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"); @@ -1529,7 +1528,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 ef1c790dcc83..7a3befe35cd7 100644 --- a/telecomm/java/android/telecom/CallScreeningService.java +++ b/telecomm/java/android/telecom/CallScreeningService.java @@ -138,7 +138,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, @@ -146,13 +146,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."); } @@ -161,7 +161,7 @@ public abstract class CallScreeningService extends Service { mShouldSkipCallLog = shouldSkipCallLog; mShouldSkipNotification = shouldSkipNotification; mShouldSilenceCall = shouldSilenceCall; - mShouldScreenCallFurther = shouldScreenCallFurther; + mShouldScreenCallViaAudioProcessing = shouldScreenCallViaAudioProcessing; } /* @@ -205,8 +205,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 { @@ -215,7 +215,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. @@ -279,13 +279,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; } @@ -296,7 +297,7 @@ public abstract class CallScreeningService extends Service { mShouldSilenceCall, mShouldSkipCallLog, mShouldSkipNotification, - mShouldScreenCallFurther); + mShouldScreenCallViaAudioProcessing); } } } @@ -374,7 +375,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()); |