diff options
author | wangqi <wangqi@google.com> | 2018-03-13 17:25:58 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-13 17:28:53 -0700 |
commit | f6c6f3befd928800dd5382eab106f6f2bab5cb08 (patch) | |
tree | a5725aea8e81b1a8efd7a9a46ecb718b03825490 /java/com/android/incallui/rtt/impl/RttChatFragment.java | |
parent | b271645d098252b36c1dac2752181b3bf56ab9c4 (diff) |
Fix full screen issue when switching between RTT and voice call.
Incall and answer screen is using transparent status and navigation bar, while RTT screen is using customized color. Switch between them require correct setting of system UI.
Bug: 67596257
Test: manually test to make RTT call and voice call, then switch between them.
PiperOrigin-RevId: 188956868
Change-Id: I3c17ff453be943f0b2ad28fe5cae434453fbe326
Diffstat (limited to 'java/com/android/incallui/rtt/impl/RttChatFragment.java')
-rw-r--r-- | java/com/android/incallui/rtt/impl/RttChatFragment.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/java/com/android/incallui/rtt/impl/RttChatFragment.java b/java/com/android/incallui/rtt/impl/RttChatFragment.java index e35ff4d73..3b943c431 100644 --- a/java/com/android/incallui/rtt/impl/RttChatFragment.java +++ b/java/com/android/incallui/rtt/impl/RttChatFragment.java @@ -152,6 +152,11 @@ public class RttChatFragment extends Fragment public View onCreateView( LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.frag_rtt_chat, container, false); + view.setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR); editText = view.findViewById(R.id.rtt_chat_input); editText.setOnEditorActionListener(this); editText.addTextChangedListener(this); @@ -278,11 +283,14 @@ public class RttChatFragment extends Fragment Window window = getActivity().getWindow(); window.setStatusBarColor(activity.getColor(R.color.rtt_status_bar_color)); window.setNavigationBarColor(activity.getColor(R.color.rtt_navigation_bar_color)); - window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR); } @Override public void onRttScreenStop() { + Activity activity = getActivity(); + Window window = getActivity().getWindow(); + window.setStatusBarColor(activity.getColor(android.R.color.transparent)); + window.setNavigationBarColor(activity.getColor(android.R.color.transparent)); rttCallScreenDelegate.onRttCallScreenUiUnready(); } |