Loading java/com/android/incallui/CallCardPresenter.java +19 −12 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class CallCardPresenter // Showing the location may have been skipped if the UI wasn't ready during previous layout. if (shouldShowLocation()) { updatePrimaryDisplayInfo(); mInCallScreen.showLocationUi(getLocationFragment()); // Log location impressions if (!hasLocationPermission()) { Loading Loading @@ -801,40 +801,47 @@ public class CallCardPresenter } private Fragment getLocationFragment() { if (!shouldShowLocation()) { return null; } LogUtil.i("CallCardPresenter.getLocationFragment", "returning location fragment"); return callLocation.getLocationFragment(mContext); } private boolean shouldShowLocation() { if (!ConfigProviderBindings.get(mContext) .getBoolean(CONFIG_ENABLE_EMERGENCY_LOCATION, CONFIG_ENABLE_EMERGENCY_LOCATION_DEFAULT)) { LogUtil.i("CallCardPresenter.getLocationFragment", "disabled by config."); return null; return false; } if (!shouldShowLocation()) { if (!isPotentialEmergencyCall()) { LogUtil.i("CallCardPresenter.getLocationFragment", "shouldn't show location"); return null; return false; } if (!hasLocationPermission()) { LogUtil.i("CallCardPresenter.getLocationFragment", "no location permission."); return null; return false; } if (isBatteryTooLowForEmergencyLocation()) { LogUtil.i("CallCardPresenter.getLocationFragment", "low battery."); return null; return false; } if (ActivityCompat.isInMultiWindowMode(mInCallScreen.getInCallScreenFragment().getActivity())) { LogUtil.i("CallCardPresenter.getLocationFragment", "in multi-window mode"); return null; return false; } if (mPrimary.isVideoCall()) { LogUtil.i("CallCardPresenter.getLocationFragment", "emergency video calls not supported"); return null; return false; } if (!callLocation.canGetLocation(mContext)) { LogUtil.i("CallCardPresenter.getLocationFragment", "can't get current location"); return null; return false; } LogUtil.i("CallCardPresenter.getLocationFragment", "returning location fragment"); return callLocation.getLocationFragment(mContext); return true; } private boolean shouldShowLocation() { private boolean isPotentialEmergencyCall() { if (isOutgoingEmergencyCall(mPrimary)) { LogUtil.i("CallCardPresenter.shouldShowLocation", "new emergency call"); return true; Loading java/com/android/incallui/answer/impl/AnswerFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -694,6 +694,8 @@ public class AnswerFragment extends Fragment updateImportanceBadgeVisibility(); contactGridManager = new ContactGridManager(view, null, 0, false /* showAnonymousAvatar */); boolean isInMultiWindowMode = ActivityCompat.isInMultiWindowMode(getActivity()); contactGridManager.onMultiWindowModeChanged(isInMultiWindowMode); Fragment answerMethod = getChildFragmentManager().findFragmentById(R.id.answer_method_container); Loading @@ -712,7 +714,7 @@ public class AnswerFragment extends Fragment initSecondaryButton(); int flags = View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; if (!ActivityCompat.isInMultiWindowMode(getActivity()) if (!isInMultiWindowMode && (getActivity().checkSelfPermission(permission.STATUS_BAR) == PackageManager.PERMISSION_GRANTED)) { LogUtil.i("AnswerFragment.onCreateView", "STATUS_BAR permission granted, disabling nav bar"); Loading java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml +5 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content"/> <include layout="@layout/device_number_row" android:layout_width="match_parent" android:layout_height="wrap_content"/> <FrameLayout android:id="@+id/incall_data_container" android:layout_width="match_parent" Loading java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml +90 −91 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" android:background="@drawable/bg_location_card" android:elevation="2dp" android:inAnimation="@android:anim/fade_in" Loading java/com/android/incallui/contactgrid/BottomRow.java +0 −4 Original line number Diff line number Diff line Loading @@ -97,10 +97,6 @@ public class BottomRow { if (TextUtils.isEmpty(label)) { label = context.getString(R.string.incall_call_ended); } } else if (!TextUtils.isEmpty(state.callbackNumber)) { // This is used for carriers like Project Fi to show the callback number for emergency calls. label = context.getString(R.string.contact_grid_callback_number, state.callbackNumber); isTimerVisible = false; } else { label = getLabelForPhoneNumber(primaryInfo); shouldPopulateAccessibilityEvent = primaryInfo.nameIsNumber; Loading Loading
java/com/android/incallui/CallCardPresenter.java +19 −12 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class CallCardPresenter // Showing the location may have been skipped if the UI wasn't ready during previous layout. if (shouldShowLocation()) { updatePrimaryDisplayInfo(); mInCallScreen.showLocationUi(getLocationFragment()); // Log location impressions if (!hasLocationPermission()) { Loading Loading @@ -801,40 +801,47 @@ public class CallCardPresenter } private Fragment getLocationFragment() { if (!shouldShowLocation()) { return null; } LogUtil.i("CallCardPresenter.getLocationFragment", "returning location fragment"); return callLocation.getLocationFragment(mContext); } private boolean shouldShowLocation() { if (!ConfigProviderBindings.get(mContext) .getBoolean(CONFIG_ENABLE_EMERGENCY_LOCATION, CONFIG_ENABLE_EMERGENCY_LOCATION_DEFAULT)) { LogUtil.i("CallCardPresenter.getLocationFragment", "disabled by config."); return null; return false; } if (!shouldShowLocation()) { if (!isPotentialEmergencyCall()) { LogUtil.i("CallCardPresenter.getLocationFragment", "shouldn't show location"); return null; return false; } if (!hasLocationPermission()) { LogUtil.i("CallCardPresenter.getLocationFragment", "no location permission."); return null; return false; } if (isBatteryTooLowForEmergencyLocation()) { LogUtil.i("CallCardPresenter.getLocationFragment", "low battery."); return null; return false; } if (ActivityCompat.isInMultiWindowMode(mInCallScreen.getInCallScreenFragment().getActivity())) { LogUtil.i("CallCardPresenter.getLocationFragment", "in multi-window mode"); return null; return false; } if (mPrimary.isVideoCall()) { LogUtil.i("CallCardPresenter.getLocationFragment", "emergency video calls not supported"); return null; return false; } if (!callLocation.canGetLocation(mContext)) { LogUtil.i("CallCardPresenter.getLocationFragment", "can't get current location"); return null; return false; } LogUtil.i("CallCardPresenter.getLocationFragment", "returning location fragment"); return callLocation.getLocationFragment(mContext); return true; } private boolean shouldShowLocation() { private boolean isPotentialEmergencyCall() { if (isOutgoingEmergencyCall(mPrimary)) { LogUtil.i("CallCardPresenter.shouldShowLocation", "new emergency call"); return true; Loading
java/com/android/incallui/answer/impl/AnswerFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -694,6 +694,8 @@ public class AnswerFragment extends Fragment updateImportanceBadgeVisibility(); contactGridManager = new ContactGridManager(view, null, 0, false /* showAnonymousAvatar */); boolean isInMultiWindowMode = ActivityCompat.isInMultiWindowMode(getActivity()); contactGridManager.onMultiWindowModeChanged(isInMultiWindowMode); Fragment answerMethod = getChildFragmentManager().findFragmentById(R.id.answer_method_container); Loading @@ -712,7 +714,7 @@ public class AnswerFragment extends Fragment initSecondaryButton(); int flags = View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; if (!ActivityCompat.isInMultiWindowMode(getActivity()) if (!isInMultiWindowMode && (getActivity().checkSelfPermission(permission.STATUS_BAR) == PackageManager.PERMISSION_GRANTED)) { LogUtil.i("AnswerFragment.onCreateView", "STATUS_BAR permission granted, disabling nav bar"); Loading
java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml +5 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content"/> <include layout="@layout/device_number_row" android:layout_width="match_parent" android:layout_height="wrap_content"/> <FrameLayout android:id="@+id/incall_data_container" android:layout_width="match_parent" Loading
java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml +90 −91 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" android:background="@drawable/bg_location_card" android:elevation="2dp" android:inAnimation="@android:anim/fade_in" Loading
java/com/android/incallui/contactgrid/BottomRow.java +0 −4 Original line number Diff line number Diff line Loading @@ -97,10 +97,6 @@ public class BottomRow { if (TextUtils.isEmpty(label)) { label = context.getString(R.string.incall_call_ended); } } else if (!TextUtils.isEmpty(state.callbackNumber)) { // This is used for carriers like Project Fi to show the callback number for emergency calls. label = context.getString(R.string.contact_grid_callback_number, state.callbackNumber); isTimerVisible = false; } else { label = getLabelForPhoneNumber(primaryInfo); shouldPopulateAccessibilityEvent = primaryInfo.nameIsNumber; Loading