Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f79d1cbb authored by linyuh's avatar linyuh Committed by Copybara-Service
Browse files

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
parent ba44ee32
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
    }