@@ -72,6 +72,8 @@ public class InCallActivity extends Activity {
7272 private boolean mShowDialpadRequested ;
7373 private boolean mConferenceManagerShown ;
7474
75+ private boolean mUseFullScreenCallerPhoto ;
76+
7577 // This enum maps to Phone.SuppService defined in telephony
7678 private enum SuppService {
7779 UNKNOWN , SWITCH , SEPARATE , TRANSFER , CONFERENCE , REJECT , HANGUP ;
@@ -507,15 +509,21 @@ public void onManageConferenceDoneClicked() {
507509 }
508510 }
509511
510- private void updateSystemBarTranslucency () {
511- final boolean doTranslucency = ! mConferenceManagerShown ;
512+ public void updateSystemBarTranslucency () {
513+ int flags = 0 ;
512514 final Window window = getWindow ();
515+ final InCallPresenter .InCallState inCallState =
516+ InCallPresenter .getInstance ().getInCallState ();
513517
514- if (doTranslucency ) {
515- window .addFlags (WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS );
516- } else {
517- window .clearFlags (WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS );
518+ if (!mConferenceManagerShown ) {
519+ flags |= WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS ;
520+ }
521+ if (mUseFullScreenCallerPhoto && inCallState == InCallPresenter .InCallState .INCOMING ) {
522+ flags |= WindowManager .LayoutParams .FLAG_TRANSLUCENT_NAVIGATION ;
518523 }
524+
525+ window .setFlags (flags , WindowManager .LayoutParams .FLAG_TRANSLUCENT_STATUS |
526+ WindowManager .LayoutParams .FLAG_TRANSLUCENT_NAVIGATION );
519527 window .getDecorView ().requestFitSystemWindows ();
520528 }
521529
@@ -819,10 +827,11 @@ private void updateSettings() {
819827 int incomingCallStyle = Settings .System .getInt (getContentResolver (),
820828 Settings .System .INCOMING_CALL_STYLE ,
821829 Settings .System .INCOMING_CALL_STYLE_FULLSCREEN_PHOTO );
822- boolean useFullscreenCallerPhoto =
830+ mUseFullScreenCallerPhoto =
823831 incomingCallStyle == Settings .System .INCOMING_CALL_STYLE_FULLSCREEN_PHOTO ;
824- mCallButtonFragment .setHideMode (useFullscreenCallerPhoto ? View .GONE : View .INVISIBLE );
825- mAnswerFragment .setUseTranslucentNavigationBar (useFullscreenCallerPhoto );
832+ mCallButtonFragment .setHideMode (mUseFullScreenCallerPhoto ? View .GONE : View .INVISIBLE );
833+ mCallButtonFragment .getPresenter ().setShowButtonsIfIdle (!mUseFullScreenCallerPhoto );
834+ updateSystemBarTranslucency ();
826835 }
827836
828837 private void log (String msg ) {
0 commit comments