summaryrefslogtreecommitdiffstats
path: root/java/com/android/incallui/InCallActivity.java
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2017-12-15 17:49:56 -0800
committerCopybara-Service <copybara-piper@google.com>2017-12-15 17:51:55 -0800
commitf79d1cbb3c77f4a9d4ae5659805c0f3ed4e115d6 (patch)
tree73347555092004d88b68a3193a718196b434a4a3 /java/com/android/incallui/InCallActivity.java
parentba44ee32b2d99e5ddc67f7037a519f305279cb85 (diff)
downloadandroid_packages_apps_Dialer-f79d1cbb3c77f4a9d4ae5659805c0f3ed4e115d6.tar.gz
android_packages_apps_Dialer-f79d1cbb3c77f4a9d4ae5659805c0f3ed4e115d6.tar.bz2
android_packages_apps_Dialer-f79d1cbb3c77f4a9d4ae5659805c0f3ed4e115d6.zip
Turning on the screen when audio stream of an incoming call is directed through Bluetooth.
Bug: 70638560 Test: InCallActivityTest PiperOrigin-RevId: 179261692 Change-Id: I269c8573592e6ff6083efc201e6bede74a01ee06
Diffstat (limited to 'java/com/android/incallui/InCallActivity.java')
-rw-r--r--java/com/android/incallui/InCallActivity.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index 47b5986a0..c4c365afa 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -261,10 +261,11 @@ public class InCallActivity extends TransactionSafeFragmentActivity
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES;
- // When the audio stream is not directed through Bluetooth, turn the screen on once the
- // activity is shown.
+ // When the audio stream is not via Bluetooth, turn on the screen once the activity is shown.
+ // When the audio stream is via Bluetooth, turn on the screen only for an incoming call.
final int audioRoute = getAudioRoute();
- if (audioRoute != CallAudioState.ROUTE_BLUETOOTH) {
+ if (audioRoute != CallAudioState.ROUTE_BLUETOOTH
+ || CallList.getInstance().getIncomingCall() != null) {
flags |= WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON;
}