diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-06-02 02:25:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-02 02:25:58 +0000 |
commit | 911e2871cfa01c80ee9603d3ab4f0bcaad65f564 (patch) | |
tree | 40c597ed4397c3687c807d21b30076c6c7d64fb1 /java/com/android/incallui | |
parent | 2c3d81eeac82472d06027bc65d661e16735c8608 (diff) | |
parent | a2aa5f3097fe3ca8e64a378095260448a29f5c5f (diff) |
Merge changes I380bc932,Ida32182c,I61636776,I7957078a,Id35c3ebf, ...
* changes:
Internal change
Remove @GenerateTestDaggerApp from RCG.
Fix color in RTT call screen.
Updating PhotoInfo and GlidePhotoManager to support conference calls.
Solve BiDi problem when phone number is concatenated with RTL-string
Fix color of primary text on incall screen.
Inlined ConfigProviderBindings.get() and removed ConfigProviderBindings.
Removed isUserUnlocked checks from ConfigProvider.
Add new spam API which can query additional data.
Fix color of name text in call log.
Removed static configProvider field in ConfigProviderBindings.
Change RTT transcript screen to use toolbar.
UI fixes for emergency numbers in the old call log.
Fix title and icon color of action bar.
Update speakEasy colors and use theme_dialer_light
Add new default interface.
Fix missing background color
Also check call configuration for disconnected call
Add toast message when RTT request failed.
Update button color.
Some minor tweaks to the UI.
Fix dialpad theme on incall screen.
Accommodate long call time text in call details.
Fix color of checked button on incall screen.
Use geocode as label for businesses.
Add inject method to generated component by RCG.
Diffstat (limited to 'java/com/android/incallui')
24 files changed, 112 insertions, 58 deletions
diff --git a/java/com/android/incallui/CallCardPresenter.java b/java/com/android/incallui/CallCardPresenter.java index 6614e7c74..91255cc7e 100644 --- a/java/com/android/incallui/CallCardPresenter.java +++ b/java/com/android/incallui/CallCardPresenter.java @@ -48,7 +48,7 @@ import com.android.contacts.common.preference.ContactsPreferences; import com.android.contacts.common.util.ContactDisplayUtils; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.multimedia.MultimediaData; @@ -768,7 +768,8 @@ public class CallCardPresenter } private boolean shouldShowLocation() { - if (!ConfigProviderBindings.get(context) + if (!ConfigProviderComponent.get(context) + .getConfigProvider() .getBoolean(CONFIG_ENABLE_EMERGENCY_LOCATION, CONFIG_ENABLE_EMERGENCY_LOCATION_DEFAULT)) { LogUtil.i("CallCardPresenter.getLocationFragment", "disabled by config."); return false; @@ -840,7 +841,8 @@ public class CallCardPresenter int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1); float batteryPercent = (100f * level) / scale; long threshold = - ConfigProviderBindings.get(context) + ConfigProviderComponent.get(context) + .getConfigProvider() .getLong( CONFIG_MIN_BATTERY_PERCENT_FOR_EMERGENCY_LOCATION, CONFIG_MIN_BATTERY_PERCENT_FOR_EMERGENCY_LOCATION_DEFAULT); diff --git a/java/com/android/incallui/DialpadFragment.java b/java/com/android/incallui/DialpadFragment.java index 343cb34fd..2ae2aca94 100644 --- a/java/com/android/incallui/DialpadFragment.java +++ b/java/com/android/incallui/DialpadFragment.java @@ -21,6 +21,7 @@ import android.os.Bundle; import android.telephony.PhoneNumberUtils; import android.util.ArrayMap; import android.util.AttributeSet; +import android.view.ContextThemeWrapper; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; @@ -136,7 +137,9 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi> @Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - final View parent = inflater.inflate(R.layout.incall_dialpad_fragment, container, false); + Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), R.style.Dialer_ThemeBase); + LayoutInflater layoutInflater = inflater.cloneInContext(contextThemeWrapper); + final View parent = layoutInflater.inflate(R.layout.incall_dialpad_fragment, container, false); dialpadView = (DialpadView) parent.findViewById(R.id.dialpad_view); dialpadView.setCanDigitsBeEdited(false); dialpadView.setBackgroundResource(R.color.incall_dialpad_background); diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index 2ec17308f..7d9608a56 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -62,7 +62,7 @@ import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutorComponent; import com.android.dialer.common.concurrent.ThreadUtil; import com.android.dialer.common.concurrent.UiListener; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.logging.Logger; import com.android.dialer.logging.ScreenEvent; import com.android.dialer.metrics.Metrics; @@ -1506,7 +1506,8 @@ public class InCallActivity extends TransactionSafeFragmentActivity LogUtil.i("InCallActivity.shouldAllowAnswerAndRelease", "video call"); return false; } - if (!ConfigProviderBindings.get(this) + if (!ConfigProviderComponent.get(this) + .getConfigProvider() .getBoolean(ConfigNames.ANSWER_AND_RELEASE_ENABLED, true)) { LogUtil.i("InCallActivity.shouldAllowAnswerAndRelease", "disabled by config"); return false; diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index 5aabf0694..150499f73 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -423,6 +423,10 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud if (dialerCall == null) { dialerCall = callList.getOutgoingCall(); } + // Outgoing call can be disconnected and reason will be shown in toast + if (dialerCall == null) { + dialerCall = callList.getDisconnectedCall(); + } if (dialerCall == null) { return false; } diff --git a/java/com/android/incallui/ReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java index 09e1845aa..94ce8d7af 100644 --- a/java/com/android/incallui/ReturnToCallController.java +++ b/java/com/android/incallui/ReturnToCallController.java @@ -32,7 +32,7 @@ import com.android.bubble.BubbleInfo; import com.android.bubble.BubbleInfo.Action; import com.android.contacts.common.util.ContactDisplayUtils; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.lettertile.LetterTileDrawable; import com.android.dialer.telecom.TelecomUtil; import com.android.dialer.theme.base.ThemeComponent; @@ -82,7 +82,9 @@ public class ReturnToCallController implements InCallUiListener, Listener, Audio private InCallState inCallState; public static boolean isEnabled(Context context) { - return ConfigProviderBindings.get(context).getBoolean("enable_return_to_call_bubble_v2", false); + return ConfigProviderComponent.get(context) + .getConfigProvider() + .getBoolean("enable_return_to_call_bubble_v2", false); } public ReturnToCallController(Context context, ContactInfoCache contactInfoCache) { diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java index 27d23c4ae..6519e00ac 100644 --- a/java/com/android/incallui/StatusBarNotifier.java +++ b/java/com/android/incallui/StatusBarNotifier.java @@ -66,7 +66,7 @@ import com.android.contacts.common.preference.ContactsPreferences; import com.android.contacts.common.util.ContactDisplayUtils; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.contactphoto.BitmapUtil; import com.android.dialer.enrichedcall.EnrichedCallManager; import com.android.dialer.enrichedcall.Session; @@ -292,7 +292,8 @@ public class StatusBarNotifier if (callState == DialerCallState.INCOMING || callState == DialerCallState.CALL_WAITING || isVideoUpgradeRequest) { - if (ConfigProviderBindings.get(context) + if (ConfigProviderComponent.get(context) + .getConfigProvider() .getBoolean("quiet_incoming_call_if_ui_showing", true)) { notificationType = InCallPresenter.getInstance().isShowingInCallUi() diff --git a/java/com/android/incallui/VideoCallPresenter.java b/java/com/android/incallui/VideoCallPresenter.java index 41c33543b..88713f48d 100644 --- a/java/com/android/incallui/VideoCallPresenter.java +++ b/java/com/android/incallui/VideoCallPresenter.java @@ -29,7 +29,7 @@ import android.view.Surface; import android.view.SurfaceView; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.util.PermissionsUtil; import com.android.incallui.InCallPresenter.InCallDetailsListener; import com.android.incallui.InCallPresenter.InCallOrientationListener; @@ -1081,7 +1081,9 @@ public class VideoCallPresenter "VideoCallPresenter.shouldShowCameraPermissionToast", "already shown for this call"); return false; } - if (!ConfigProviderBindings.get(context).getBoolean("camera_permission_dialog_allowed", true)) { + if (!ConfigProviderComponent.get(context) + .getConfigProvider() + .getBoolean("camera_permission_dialog_allowed", true)) { LogUtil.i("VideoCallPresenter.shouldShowCameraPermissionToast", "disabled by config"); return false; } diff --git a/java/com/android/incallui/answer/impl/classifier/HumanInteractionClassifier.java b/java/com/android/incallui/answer/impl/classifier/HumanInteractionClassifier.java index b661579a3..494a6224d 100644 --- a/java/com/android/incallui/answer/impl/classifier/HumanInteractionClassifier.java +++ b/java/com/android/incallui/answer/impl/classifier/HumanInteractionClassifier.java @@ -20,7 +20,7 @@ import android.content.Context; import android.hardware.SensorEvent; import android.util.DisplayMetrics; import android.view.MotionEvent; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; /** An classifier trying to determine whether it is a human interacting with the phone or not. */ class HumanInteractionClassifier extends Classifier { @@ -44,7 +44,8 @@ class HumanInteractionClassifier extends Classifier { classifierData = new ClassifierData(dpi, displayMetrics.heightPixels); historyEvaluator = new HistoryEvaluator(); enabled = - ConfigProviderBindings.get(context) + ConfigProviderComponent.get(context) + .getConfigProvider() .getBoolean(CONFIG_ANSWER_FALSE_TOUCH_DETECTION_ENABLED, true); strokeClassifiers = diff --git a/java/com/android/incallui/answer/impl/hint/AnswerHintFactory.java b/java/com/android/incallui/answer/impl/hint/AnswerHintFactory.java index 2ed434660..734fa96ad 100644 --- a/java/com/android/incallui/answer/impl/hint/AnswerHintFactory.java +++ b/java/com/android/incallui/answer/impl/hint/AnswerHintFactory.java @@ -24,7 +24,7 @@ import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.storage.StorageComponent; import com.android.incallui.util.AccessibilityUtil; @@ -95,7 +95,9 @@ public class AnswerHintFactory { .unencryptedSharedPrefs() .getInt(ANSWERED_COUNT_PREFERENCE_KEY, 0); long threshold = - ConfigProviderBindings.get(context).getLong(CONFIG_ANSWER_HINT_ANSWERED_THRESHOLD_KEY, 3); + ConfigProviderComponent.get(context) + .getConfigProvider() + .getLong(CONFIG_ANSWER_HINT_ANSWERED_THRESHOLD_KEY, 3); LogUtil.i( "AnswerHintFactory.shouldShowAnswerHint", "answerCount: %d, threshold: %d", @@ -110,7 +112,8 @@ public class AnswerHintFactory { * string. */ private static boolean isDeviceWhitelisted(Context context, String device) { - return ConfigProviderBindings.get(context) + return ConfigProviderComponent.get(context) + .getConfigProvider() .getString(CONFIG_ANSWER_HINT_WHITELISTED_DEVICES_KEY, DEFAULT_WHITELISTED_DEVICES_CSV) .contains("/" + device + "/"); } diff --git a/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java b/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java index f6444e5b4..e9d2c6f0a 100644 --- a/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java +++ b/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java @@ -25,7 +25,7 @@ import android.support.annotation.VisibleForTesting; import android.text.TextUtils; import android.widget.Toast; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.logging.DialerImpression.Type; import com.android.dialer.logging.Logger; import com.android.dialer.storage.StorageComponent; @@ -62,7 +62,9 @@ public class PawSecretCodeListener extends BroadcastReceiver { return; } String secretCode = - ConfigProviderBindings.get(context).getString(CONFIG_PAW_SECRET_CODE, "729"); + ConfigProviderComponent.get(context) + .getConfigProvider() + .getString(CONFIG_PAW_SECRET_CODE, "729"); if (secretCode == null) { return; } diff --git a/java/com/android/incallui/answer/impl/res/drawable/shape_chip_drawable.xml b/java/com/android/incallui/answer/impl/res/drawable/shape_chip_drawable.xml index 3740f3d1b..adb153f6d 100644 --- a/java/com/android/incallui/answer/impl/res/drawable/shape_chip_drawable.xml +++ b/java/com/android/incallui/answer/impl/res/drawable/shape_chip_drawable.xml @@ -18,7 +18,7 @@ android:color="#DADCE0"> <item android:id="@android:id/mask"> <shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="@color/dialer_background_light"/> + <solid android:color="?android:attr/colorBackground"/> <padding android:bottom="9dp" android:left="8dp" @@ -29,7 +29,7 @@ </item> <item> <shape xmlns:android="http://schemas.android.com/apk/res/android"> - <solid android:color="@color/dialer_background_floating_light"/> + <solid android:color="#FFFFFF"/> <stroke android:width="1dp" android:color="#DADCE0"/> @@ -41,4 +41,4 @@ <corners android:radius="40dp"/> </shape> </item> -</ripple>
\ No newline at end of file +</ripple> diff --git a/java/com/android/incallui/answerproximitysensor/AnswerProximitySensor.java b/java/com/android/incallui/answerproximitysensor/AnswerProximitySensor.java index 939d12014..8aeb05fea 100644 --- a/java/com/android/incallui/answerproximitysensor/AnswerProximitySensor.java +++ b/java/com/android/incallui/answerproximitysensor/AnswerProximitySensor.java @@ -22,7 +22,7 @@ import android.os.PowerManager; import android.os.Trace; import android.view.Display; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.incallui.call.DialerCall; import com.android.incallui.call.DialerCallListener; import com.android.incallui.call.state.DialerCallState; @@ -53,7 +53,8 @@ public class AnswerProximitySensor return false; } - if (!ConfigProviderBindings.get(context) + if (!ConfigProviderComponent.get(context) + .getConfigProvider() .getBoolean(CONFIG_ANSWER_PROXIMITY_SENSOR_ENABLED, true)) { LogUtil.i("AnswerProximitySensor.shouldUse", "disabled by config"); Trace.endSection(); @@ -84,7 +85,8 @@ public class AnswerProximitySensor this.call = call; LogUtil.i("AnswerProximitySensor.constructor", "acquiring lock"); - if (ConfigProviderBindings.get(context) + if (ConfigProviderComponent.get(context) + .getConfigProvider() .getBoolean(CONFIG_ANSWER_PSEUDO_PROXIMITY_WAKE_LOCK_ENABLED, true)) { answerProximityWakeLock = new PseudoProximityWakeLock(context, pseudoScreenState); } else { diff --git a/java/com/android/incallui/call/CallList.java b/java/com/android/incallui/call/CallList.java index 634a302a2..31afe71db 100644 --- a/java/com/android/incallui/call/CallList.java +++ b/java/com/android/incallui/call/CallList.java @@ -150,7 +150,9 @@ public class CallList implements DialerCallDelegate { if (SpamComponent.get(context).spamSettings().isSpamEnabled()) { String number = TelecomCallUtil.getNumber(telecomCall); ListenableFuture<SpamStatus> futureSpamStatus = - SpamComponent.get(context).spam().checkSpamStatus(number, call.getCountryIso()); + SpamComponent.get(context) + .spam() + .checkSpamStatusForInCallUi(number, call.getCountryIso()); Futures.addCallback( futureSpamStatus, diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java index b2c8dcc67..904a5a833 100644 --- a/java/com/android/incallui/call/DialerCall.java +++ b/java/com/android/incallui/call/DialerCall.java @@ -60,7 +60,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DefaultFutureCallback; import com.android.dialer.compat.telephony.TelephonyManagerCompat; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.duo.DuoComponent; import com.android.dialer.enrichedcall.EnrichedCallCapabilities; import com.android.dialer.enrichedcall.EnrichedCallComponent; @@ -315,6 +315,7 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa @Override public void onRttInitiationFailure(Call call, int reason) { LogUtil.v("TelecomCallCallback.onRttInitiationFailure", "reason=%d", reason); + Toast.makeText(context, R.string.rtt_call_not_available_toast, Toast.LENGTH_LONG).show(); update(); } @@ -841,7 +842,8 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa boolean isInEmergencyCallbackWindow(long timestampMillis) { long emergencyCallbackWindowMillis = - ConfigProviderBindings.get(context) + ConfigProviderComponent.get(context) + .getConfigProvider() .getLong(CONFIG_EMERGENCY_CALLBACK_WINDOW_MILLIS, TimeUnit.MINUTES.toMillis(5)); return System.currentTimeMillis() - timestampMillis < emergencyCallbackWindowMillis; } diff --git a/java/com/android/incallui/contactgrid/BottomRow.java b/java/com/android/incallui/contactgrid/BottomRow.java index 7388c50a8..767d66668 100644 --- a/java/com/android/incallui/contactgrid/BottomRow.java +++ b/java/com/android/incallui/contactgrid/BottomRow.java @@ -18,9 +18,6 @@ package com.android.incallui.contactgrid; import android.content.Context; import android.support.annotation.Nullable; -import android.telephony.PhoneNumberUtils; -import android.text.BidiFormatter; -import android.text.TextDirectionHeuristics; import android.text.TextUtils; import com.android.incallui.call.state.DialerCallState; import com.android.incallui.incall.protocol.PrimaryCallState; @@ -118,21 +115,15 @@ public class BottomRow { return primaryInfo.location(); } if (!primaryInfo.nameIsNumber() && !TextUtils.isEmpty(primaryInfo.number())) { - CharSequence spannedNumber = spanDisplayNumber(primaryInfo.number()); if (primaryInfo.label() == null) { - return spannedNumber; + return primaryInfo.number(); } else { - return TextUtils.concat(primaryInfo.label(), " ", spannedNumber); + return TextUtils.concat(primaryInfo.label(), " ", primaryInfo.number()); } } return null; } - private static CharSequence spanDisplayNumber(String displayNumber) { - return PhoneNumberUtils.createTtsSpannable( - BidiFormatter.getInstance().unicodeWrap(displayNumber, TextDirectionHeuristics.LTR)); - } - private static boolean isIncoming(PrimaryCallState state) { return state.state() == DialerCallState.INCOMING || state.state() == DialerCallState.CALL_WAITING; diff --git a/java/com/android/incallui/contactgrid/ContactGridManager.java b/java/com/android/incallui/contactgrid/ContactGridManager.java index 6d04a2735..189f6fef1 100644 --- a/java/com/android/incallui/contactgrid/ContactGridManager.java +++ b/java/com/android/incallui/contactgrid/ContactGridManager.java @@ -35,11 +35,12 @@ import android.widget.TextView; import android.widget.ViewAnimator; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.glidephotomanager.GlidePhotoManagerComponent; import com.android.dialer.glidephotomanager.PhotoInfo; import com.android.dialer.lettertile.LetterTileDrawable; import com.android.dialer.util.DrawableConverter; +import com.android.dialer.widget.BidiTextView; import com.android.incallui.incall.protocol.ContactPhotoType; import com.android.incallui.incall.protocol.PrimaryCallState; import com.android.incallui.incall.protocol.PrimaryInfo; @@ -77,7 +78,7 @@ public class ContactGridManager { private final TextView forwardedNumberView; private final ImageView spamIconImageView; private final ViewAnimator bottomTextSwitcher; - private final TextView bottomTextView; + private final BidiTextView bottomTextView; private final Chronometer bottomTimerView; private final Space topRowSpace; private int avatarSize; @@ -301,7 +302,9 @@ public class ContactGridManager { if (hideAvatar) { avatarImageView.setVisibility(View.GONE); } else if (avatarSize > 0 && updateAvatarVisibility()) { - if (ConfigProviderBindings.get(context).getBoolean("enable_glide_photo", false)) { + if (ConfigProviderComponent.get(context) + .getConfigProvider() + .getBoolean("enable_glide_photo", false)) { loadPhotoWithGlide(); } else { loadPhotoWithLegacy(); @@ -315,7 +318,8 @@ public class ContactGridManager { PhotoInfo.newBuilder() .setIsBusiness(primaryInfo.photoType() == ContactPhotoType.BUSINESS) .setIsVoicemail(primaryCallState.isVoiceMailNumber()) - .setIsSpam(primaryInfo.isSpam()); + .setIsSpam(primaryInfo.isSpam()) + .setIsConference(primaryCallState.isConference()); // Contact has a name, that is a number. if (primaryInfo.nameIsNumber() && primaryInfo.number() != null) { diff --git a/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_bottom_row.xml b/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_bottom_row.xml index ce355ea2d..73db41314 100644 --- a/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_bottom_row.xml +++ b/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_bottom_row.xml @@ -53,7 +53,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="2dp" android:measureAllChildren="false"> - <TextView + <com.android.dialer.widget.BidiTextView android:id="@+id/contactgrid_bottom_text" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/java/com/android/incallui/rtt/impl/res/color/submit_button_background_color.xml b/java/com/android/incallui/rtt/impl/res/color/submit_button_background_color.xml new file mode 100644 index 000000000..0da2c374a --- /dev/null +++ b/java/com/android/incallui/rtt/impl/res/color/submit_button_background_color.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_enabled="false" + android:color="#BDBDBD" /> + <item android:color="#FFFFFF" /> +</selector>
\ No newline at end of file diff --git a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml index 21d00a3e3..cff2b3f38 100644 --- a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml +++ b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml @@ -62,11 +62,11 @@ android:layout_height="53dp" android:layout_gravity="bottom" android:background="@drawable/input_bubble_background" - android:backgroundTint="?colorIcon" + android:backgroundTint="@color/submit_button_background_color" android:backgroundTintMode="multiply" android:contentDescription="@string/content_description_rtt_check_button" android:src="@drawable/quantum_ic_done_vd_theme_24" - android:tint="?android:attr/colorPrimary" + android:tint="@color/submit_button_color" android:visibility="gone"/> </LinearLayout> diff --git a/java/com/android/incallui/spam/SpamAlternativeExperimentUtil.java b/java/com/android/incallui/spam/SpamAlternativeExperimentUtil.java index 52eadcff3..27942d8d2 100644 --- a/java/com/android/incallui/spam/SpamAlternativeExperimentUtil.java +++ b/java/com/android/incallui/spam/SpamAlternativeExperimentUtil.java @@ -18,7 +18,7 @@ package com.android.incallui.spam; import android.content.Context; import com.android.dialer.common.LogUtil; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; /** Returns resource id based on experiment number. */ public final class SpamAlternativeExperimentUtil { @@ -29,7 +29,9 @@ public final class SpamAlternativeExperimentUtil { */ public static int getResourceIdByName(String resourceName, Context context) { long experiment = - ConfigProviderBindings.get(context).getLong("experiment_for_alternative_spam_word", 230150); + ConfigProviderComponent.get(context) + .getConfigProvider() + .getLong("experiment_for_alternative_spam_word", 230150); LogUtil.i( "SpamAlternativeExperimentUtil.getResourceIdByName", "using experiment %d", experiment); String modifiedResourceName = resourceName; diff --git a/java/com/android/incallui/speakeasy/SpeakEasyCallManager.java b/java/com/android/incallui/speakeasy/SpeakEasyCallManager.java index b060f64cb..f2916f46f 100644 --- a/java/com/android/incallui/speakeasy/SpeakEasyCallManager.java +++ b/java/com/android/incallui/speakeasy/SpeakEasyCallManager.java @@ -54,6 +54,16 @@ public interface SpeakEasyCallManager { */ boolean isAvailable(@NonNull Context context); + /** + * Optional: Performs work necessary to happen-before callers use other methods on this interface. + * + * @apiNote Use of this API is completely optional, and callers are NOT required to invoke this + * method prior to using other methods on the interface. + * @implSpec Other members of this interface always promise to do any required initialization work + * at the time they are invoked. This method will always be idempotent. + */ + default void performManualInitialization() {} + /** Returns the config provider flag associated with the feature. */ @NonNull String getConfigProviderFlag(); diff --git a/java/com/android/incallui/theme/res/values/colors.xml b/java/com/android/incallui/theme/res/values/colors.xml index cb894bbb7..059fe59a9 100644 --- a/java/com/android/incallui/theme/res/values/colors.xml +++ b/java/com/android/incallui/theme/res/values/colors.xml @@ -25,9 +25,6 @@ <!-- Background color for status bar. For portrait this will be ignored. --> <color name="statusbar_background_color">?android:attr/colorPrimary</color> - <!-- 20% opacity, theme color. --> - <color name="incall_dialpad_touch_tint">@color/dialer_theme_color_20pct</color> - <!-- Background colors for InCallUI. This is a set of colors which pass WCAG AA and all have a contrast ratio over 5:1. diff --git a/java/com/android/incallui/theme/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml index 3475e3548..e6d6b07b7 100644 --- a/java/com/android/incallui/theme/res/values/styles.xml +++ b/java/com/android/incallui/theme/res/values/styles.xml @@ -25,7 +25,7 @@ <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> - <item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item> + <item name="dialpad_key_button_touch_tint">?attr/colorPrimary20pct</item> <item name="dialpad_style">@style/InCallDialpad</item> <item name="android:windowAnimationStyle">@null</item> @@ -34,11 +34,14 @@ </style> <style name="Theme.InCallScreen" parent="@style/Dialer.Dark.ThemeBase.NoActionBar"> + <item name="android:textColorPrimary">@android:color/white</item> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> + <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> + <item name="colorPrimaryDark">@color/dialer_theme_color_dark</item> - <item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item> + <item name="dialpad_key_button_touch_tint">?attr/colorPrimary20pct</item> <item name="dialpad_style">@style/InCallDialpad</item> <item name="android:windowAnimationStyle">@null</item> @@ -49,7 +52,7 @@ <style name="Theme.InCallScreen.ManageConference" parent="Dialer.ThemeBase.ActionBar"> </style> - <style name="InCallDialpad" parent="Dialpad.Light"> + <style name="InCallDialpad" parent="Dialpad.Themed"> <item name="dialpad_key_number_margin_bottom"> @dimen/incall_dialpad_key_number_margin_bottom </item> @@ -72,8 +75,6 @@ @dimen/incall_end_call_spacing </item> <item name="dialpad_elevation">10dp</item> - <item name="dialpad_text_color">?android:attr/textColorPrimaryInverse</item> - <item name="dialpad_text_color_secondary">?android:attr/textColorSecondaryInverse</item> </style> <style name="AfterCallNotificationTheme" parent="Dialer.ThemeBase.NoActionBar"> diff --git a/java/com/android/incallui/videotech/duo/DuoVideoTech.java b/java/com/android/incallui/videotech/duo/DuoVideoTech.java index ac74e54df..47f075700 100644 --- a/java/com/android/incallui/videotech/duo/DuoVideoTech.java +++ b/java/com/android/incallui/videotech/duo/DuoVideoTech.java @@ -24,7 +24,7 @@ import android.telecom.PhoneAccountHandle; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DefaultFutureCallback; -import com.android.dialer.configprovider.ConfigProviderBindings; +import com.android.dialer.configprovider.ConfigProviderComponent; import com.android.dialer.duo.Duo; import com.android.dialer.duo.DuoListener; import com.android.dialer.logging.DialerImpression; @@ -60,7 +60,8 @@ public class DuoVideoTech implements VideoTech, DuoListener { @Override public boolean isAvailable(Context context, PhoneAccountHandle phoneAccountHandle) { - if (!ConfigProviderBindings.get(context) + if (!ConfigProviderComponent.get(context) + .getConfigProvider() .getBoolean("enable_lightbringer_video_upgrade", true)) { LogUtil.v("DuoVideoTech.isAvailable", "upgrade disabled by flag"); return false; |