Merge "Display manage conference button." into nyc-dev
diff --git a/Android.mk b/Android.mk
index 4c67293..eb6cbdc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -64,9 +64,7 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(incallui_dir)/proguard.flags
-# Uncomment the following line to build against the current SDK
-# This is required for building an unbundled app.
-LOCAL_SDK_VERSION := system_current
+LOCAL_SDK_VERSION := current
include $(BUILD_PACKAGE)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 777faa3..05ee493 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,8 +17,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.dialer"
coreApp="true"
- android:versionCode="20501"
- android:versionName="2.05.01">
+ android:versionCode="20502"
+ android:versionName="2.05.02">
<uses-sdk
android:minSdkVersion="23"
@@ -245,6 +245,9 @@
<activity android:name="com.android.contacts.common.vcard.ExportVCardActivity"
android:theme="@style/BackgroundOnlyTheme"/>
+ <activity android:name="com.android.contacts.common.vcard.ShareVCardActivity"
+ android:theme="@style/BackgroundOnlyTheme" />
+
<service
android:name="com.android.contacts.common.vcard.VCardService"
android:exported="false"/>
@@ -329,5 +332,15 @@
android:exported="false"
android:multiprocess="false"
/>
+
+ <provider
+ android:name="android.support.v4.content.FileProvider"
+ android:authorities="@string/contacts_file_provider_authority"
+ android:grantUriPermissions="true"
+ android:exported="false">
+ <meta-data
+ android:name="android.support.FILE_PROVIDER_PATHS"
+ android:resource="@xml/file_paths" />
+ </provider>
</application>
</manifest>
diff --git a/InCallUI/AndroidManifest.xml b/InCallUI/AndroidManifest.xml
new file mode 100644
index 0000000..5c758ed
--- /dev/null
+++ b/InCallUI/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2016 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
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.incallui">
+ <uses-sdk
+ android:minSdkVersion="23"
+ android:targetSdkVersion="23" />
+</manifest>
+
diff --git a/InCallUI/build.gradle b/InCallUI/build.gradle
new file mode 100644
index 0000000..b55d463
--- /dev/null
+++ b/InCallUI/build.gradle
@@ -0,0 +1,14 @@
+apply plugin: 'com.android.library'
+
+android {
+ sourceSets.main {
+ manifest.srcFile 'AndroidManifest.xml'
+ res.srcDirs = ['res']
+ }
+}
+
+dependencies {
+ compile 'com.android.support:support-v4:23.1.+'
+ compile project(':PhoneCommon')
+ compile project(':ContactsCommon')
+}
diff --git a/InCallUI/res/layout-h600dp/call_card_fragment.xml b/InCallUI/res/layout-h500dp/call_card_fragment.xml
similarity index 100%
rename from InCallUI/res/layout-h600dp/call_card_fragment.xml
rename to InCallUI/res/layout-h500dp/call_card_fragment.xml
diff --git a/InCallUI/res/layout-w600dp-land/call_card_fragment.xml b/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
similarity index 100%
rename from InCallUI/res/layout-w600dp-land/call_card_fragment.xml
rename to InCallUI/res/layout-w500dp-land/call_card_fragment.xml
diff --git a/InCallUI/res/values-h600dp/dimens.xml b/InCallUI/res/values-h500dp/dimens.xml
similarity index 100%
rename from InCallUI/res/values-h600dp/dimens.xml
rename to InCallUI/res/values-h500dp/dimens.xml
diff --git a/InCallUI/res/values-w600dp-land/colors.xml b/InCallUI/res/values-w500dp-land/colors.xml
similarity index 100%
rename from InCallUI/res/values-w600dp-land/colors.xml
rename to InCallUI/res/values-w500dp-land/colors.xml
diff --git a/InCallUI/res/values-w600dp-land/dimens.xml b/InCallUI/res/values-w500dp-land/dimens.xml
similarity index 100%
rename from InCallUI/res/values-w600dp-land/dimens.xml
rename to InCallUI/res/values-w500dp-land/dimens.xml
diff --git a/InCallUI/res/values/array.xml b/InCallUI/res/values/array.xml
index 8744d3e..7877ec8 100644
--- a/InCallUI/res/values/array.xml
+++ b/InCallUI/res/values/array.xml
@@ -76,10 +76,10 @@
<item>@drawable/ic_lockscreen_answer_video</item>
</array>
<array name="incoming_call_widget_video_without_sms_target_descriptions">
- <item>@string/description_target_answer_audio_call</item>
+ <item>@string/description_target_answer_video_call</item>
<item>@null</item>
<item>@string/description_target_decline</item>
- <item>@string/description_target_answer_video_call</item>
+ <item>@string/description_target_answer_audio_call</item>
</array>
<array name="incoming_call_widget_video_without_sms_direction_descriptions">
<item>@string/description_direction_right</item>
@@ -89,21 +89,21 @@
</array>
<!-- For video calls, if respond via SMS is enabled:
- - Answer as audio call (drag right)
+ - Answer as video call (drag right)
- Respond via SMS (drag up)
- Decline (drag left)
- - Answer as video call (drag down) -->
+ - Answer as audio call (drag down) -->
<array name="incoming_call_widget_video_with_sms_targets">
- <item>@drawable/ic_lockscreen_answer</item>
+ <item>@drawable/ic_lockscreen_answer_video</item>
<item>@drawable/ic_lockscreen_text</item>
<item>@drawable/ic_lockscreen_decline</item>
- <item>@drawable/ic_lockscreen_answer_video</item>
+ <item>@drawable/ic_lockscreen_answer</item>
</array>
<array name="incoming_call_widget_video_with_sms_target_descriptions">
- <item>@string/description_target_answer_audio_call</item>
+ <item>@string/description_target_answer_video_call</item>
<item>@string/description_target_send_sms</item>
<item>@string/description_target_decline</item>
- <item>@string/description_target_answer_video_call</item>
+ <item>@string/description_target_answer_audio_call</item>
</array>
<array name="incoming_call_widget_video_with_sms_direction_descriptions">
<item>@string/description_direction_right</item>
diff --git a/InCallUI/res/values/colors.xml b/InCallUI/res/values/colors.xml
index 60a017c..5e4eeee 100644
--- a/InCallUI/res/values/colors.xml
+++ b/InCallUI/res/values/colors.xml
@@ -119,4 +119,7 @@
<color name="person_contact_context_message_background_color">@color/incall_call_banner_subtext_color</color>
<color name="person_contact_context_detail_text_color">@color/incall_call_banner_subtext_color</color>
<color name="business_contact_context_text_color">@color/incall_call_banner_subtext_color</color>
+
+ <!-- White background for dialer -->
+ <color name="background_dialer_white">#ffffff</color>
</resources>
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 6e1fb3c..2bd3629 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -77,7 +77,7 @@
showAnswerUi(false);
Log.d(this, "declining upgrade request id: ");
CallList.getInstance().removeCallUpdateListener(mCallId, this);
- InCallPresenter.getInstance().declineUpgradeRequest(getUi().getContext());
+ InCallPresenter.getInstance().declineUpgradeRequest();
}
if (!call.getId().equals(mCallId)) {
// A new call is coming in.
diff --git a/InCallUI/src/com/android/incallui/AudioModeProvider.java b/InCallUI/src/com/android/incallui/AudioModeProvider.java
index 961fb11..ea56dd6 100644
--- a/InCallUI/src/com/android/incallui/AudioModeProvider.java
+++ b/InCallUI/src/com/android/incallui/AudioModeProvider.java
@@ -16,9 +16,9 @@
package com.android.incallui;
-import com.google.common.collect.Lists;
+import android.telecom.CallAudioState;
-import com.android.dialer.compat.CallAudioStateCompat;
+import com.google.common.collect.Lists;
import java.util.List;
@@ -30,11 +30,11 @@
static final int AUDIO_MODE_INVALID = 0;
private static AudioModeProvider sAudioModeProvider = new AudioModeProvider();
- private int mAudioMode = CallAudioStateCompat.ROUTE_EARPIECE;
+ private int mAudioMode = CallAudioState.ROUTE_EARPIECE;
private boolean mMuted = false;
- private int mSupportedModes = CallAudioStateCompat.ROUTE_EARPIECE
- | CallAudioStateCompat.ROUTE_BLUETOOTH | CallAudioStateCompat.ROUTE_WIRED_HEADSET
- | CallAudioStateCompat.ROUTE_SPEAKER;
+ private int mSupportedModes = CallAudioState.ROUTE_EARPIECE
+ | CallAudioState.ROUTE_BLUETOOTH | CallAudioState.ROUTE_WIRED_HEADSET
+ | CallAudioState.ROUTE_SPEAKER;
private final List<AudioModeListener> mListeners = Lists.newArrayList();
public static AudioModeProvider getInstance() {
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index aec806f..54ec528 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -19,9 +19,9 @@
import android.content.Context;
import android.hardware.camera2.CameraCharacteristics;
import android.net.Uri;
-import android.os.Build;
import android.os.Bundle;
import android.os.Trace;
+import android.telecom.Call.Details;
import android.telecom.Connection;
import android.telecom.DisconnectCause;
import android.telecom.GatewayInfo;
@@ -37,8 +37,6 @@
import com.android.contacts.common.compat.telecom.TelecomManagerCompat;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.dialer.util.IntentUtil;
-import com.android.incallui.compat.telecom.DetailsCompat;
-import com.android.incallui.compat.telecom.VideoProfileCompat;
import com.android.incallui.util.TelecomCallUtil;
import java.util.ArrayList;
@@ -291,18 +289,8 @@
private static final String ID_PREFIX = Call.class.getSimpleName() + "_";
private static int sIdCounter = 0;
- private Object mTelecomCallCallback = newTelecomCallCallback();
-
- private Object newTelecomCallCallback() {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- return newMarshmallowTelecomCallCallback();
- }
- return newLollipopTelecomCallCallback();
- }
-
- private Object newMarshmallowTelecomCallCallback() {
- Log.i(this, "Using an android.telecom.Call$Callback");
- return new android.telecom.Call.Callback() {
+ private final android.telecom.Call.Callback mTelecomCallCallback =
+ new android.telecom.Call.Callback() {
@Override
public void onStateChanged(android.telecom.Call call, int newState) {
Log.d(this, "TelecomCallCallback onStateChanged call=" + call + " newState="
@@ -367,81 +355,7 @@
List<android.telecom.Call> conferenceableCalls) {
update();
}
- };
- }
-
- private Object newLollipopTelecomCallCallback() {
- // This code only runs for Google Experience phones on the pre-M sdk since only the system
- // dialer can invoke the InCallUI code. This allows us to safely use the
- // android.telecom.Call.Listener interface
- Log.i(this, "Using an android.telecom.Call$Listener");
- return new android.telecom.Call.Listener() {
- @Override
- public void onStateChanged(android.telecom.Call call, int newState) {
- Log.d(this, "TelecomCallCallback onStateChanged call=" + call + " newState="
- + newState);
- update();
- }
-
- @Override
- public void onParentChanged(android.telecom.Call call,
- android.telecom.Call newParent) {
- Log.d(this, "TelecomCallCallback onParentChanged call=" + call + " newParent="
- + newParent);
- update();
- }
-
- @Override
- public void onChildrenChanged(android.telecom.Call call,
- List<android.telecom.Call> children) {
- update();
- }
-
- @Override
- public void onDetailsChanged(android.telecom.Call call,
- android.telecom.Call.Details details) {
- Log.d(this, "TelecomCallCallback onStateChanged call=" + call + " details="
- + details);
- update();
- }
-
- @Override
- public void onCannedTextResponsesLoaded(android.telecom.Call call,
- List<String> cannedTextResponses) {
- Log.d(this, "TelecomCallCallback onStateChanged call=" + call
- + " cannedTextResponses=" + cannedTextResponses);
- update();
- }
-
- @Override
- public void onPostDialWait(android.telecom.Call call,
- String remainingPostDialSequence) {
- Log.d(this, "TelecomCallCallback onStateChanged call=" + call
- + " remainingPostDialSequence=" + remainingPostDialSequence);
- update();
- }
-
- @Override
- public void onVideoCallChanged(android.telecom.Call call,
- VideoCall videoCall) {
- Log.d(this, "TelecomCallCallback onStateChanged call=" + call + " videoCall="
- + videoCall);
- update();
- }
-
- @Override
- public void onCallDestroyed(android.telecom.Call call) {
- Log.d(this, "TelecomCallCallback onStateChanged call=" + call);
- call.removeListener(this);
- }
-
- @Override
- public void onConferenceableCallsChanged(android.telecom.Call call,
- List<android.telecom.Call> conferenceableCalls) {
- update();
- }
- };
- }
+ };
private android.telecom.Call mTelecomCall;
private boolean mIsEmergencyCall;
@@ -491,11 +405,7 @@
updateFromTelecomCall();
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- mTelecomCall.registerCallback((android.telecom.Call.Callback) mTelecomCallCallback);
- } else {
- mTelecomCall.addListener((android.telecom.Call.Listener) mTelecomCallCallback);
- }
+ mTelecomCall.registerCallback(mTelecomCallCallback);
mTimeAddedMs = System.currentTimeMillis();
}
@@ -750,7 +660,7 @@
}
public Bundle getIntentExtras() {
- return DetailsCompat.getIntentExtras(mTelecomCall.getDetails());
+ return mTelecomCall.getDetails().getIntentExtras();
}
public Bundle getExtras() {
@@ -824,7 +734,7 @@
}
public boolean hasProperty(int property) {
- return DetailsCompat.hasProperty(mTelecomCall.getDetails(), property);
+ return mTelecomCall.getDetails().hasProperty(property);
}
/** Gets the time when the call first became active. */
@@ -989,11 +899,11 @@
"videoState:%s, mSessionModificationState:%d, VideoSettings:%s]",
mId,
State.toString(getState()),
- DetailsCompat.capabilitiesToString(mTelecomCall.getDetails().getCallCapabilities()),
+ Details.capabilitiesToString(mTelecomCall.getDetails().getCallCapabilities()),
mChildCallIds,
getParentId(),
this.mTelecomCall.getConferenceableCalls(),
- VideoProfileCompat.videoStateToString(mTelecomCall.getDetails().getVideoState()),
+ VideoProfile.videoStateToString(mTelecomCall.getDetails().getVideoState()),
mSessionModificationState,
getVideoSettings());
}
diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java
index 1904ab0..9859f4e 100644
--- a/InCallUI/src/com/android/incallui/CallButtonFragment.java
+++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java
@@ -39,6 +39,7 @@
import android.graphics.drawable.RippleDrawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Bundle;
+import android.telecom.CallAudioState;
import android.util.SparseIntArray;
import android.view.ContextThemeWrapper;
import android.view.HapticFeedbackConstants;
@@ -54,7 +55,7 @@
import android.widget.PopupMenu.OnMenuItemClickListener;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
-import com.android.dialer.compat.CallAudioStateCompat;
+import com.android.dialer.R;
/**
* Fragment for call control buttons
@@ -199,56 +200,40 @@
int id = view.getId();
Log.d(this, "onClick(View " + view + ", id " + id + ")...");
- switch (id) {
- case R.id.audioButton:
- onAudioButtonClicked();
- break;
- case R.id.addButton:
- getPresenter().addCallClicked();
- break;
- case R.id.muteButton: {
- getPresenter().muteClicked(!mMuteButton.isSelected());
- break;
+ if (id == R.id.audioButton) {
+ onAudioButtonClicked();
+ } else if (id == R.id.addButton) {
+ getPresenter().addCallClicked();
+ } else if (id == R.id.muteButton) {
+ getPresenter().muteClicked(!mMuteButton.isSelected());
+ } else if (id == R.id.mergeButton) {
+ getPresenter().mergeClicked();
+ mMergeButton.setEnabled(false);
+ } else if (id == R.id.holdButton) {
+ getPresenter().holdClicked(!mHoldButton.isSelected());
+ } else if (id == R.id.swapButton) {
+ getPresenter().swapClicked();
+ } else if (id == R.id.dialpadButton) {
+ getPresenter().showDialpadClicked(!mShowDialpadButton.isSelected());
+ } else if (id == R.id.changeToVideoButton) {
+ getPresenter().changeToVideoClicked();
+ } else if (id == R.id.changeToVoiceButton) {
+ getPresenter().changeToVoiceClicked();
+ } else if (id == R.id.switchCameraButton) {
+ getPresenter().switchCameraClicked(
+ mSwitchCameraButton.isSelected() /* useFrontFacingCamera */);
+ } else if (id == R.id.pauseVideoButton) {
+ getPresenter().pauseVideoClicked(
+ !mPauseVideoButton.isSelected() /* pause */);
+ } else if (id == R.id.overflowButton) {
+ if (mOverflowPopup != null) {
+ mOverflowPopup.show();
}
- case R.id.mergeButton:
- getPresenter().mergeClicked();
- mMergeButton.setEnabled(false);
- break;
- case R.id.holdButton: {
- getPresenter().holdClicked(!mHoldButton.isSelected());
- break;
- }
- case R.id.swapButton:
- getPresenter().swapClicked();
- break;
- case R.id.dialpadButton:
- getPresenter().showDialpadClicked(!mShowDialpadButton.isSelected());
- break;
- case R.id.changeToVideoButton:
- getPresenter().changeToVideoClicked();
- break;
- case R.id.changeToVoiceButton:
- getPresenter().changeToVoiceClicked();
- break;
- case R.id.switchCameraButton:
- getPresenter().switchCameraClicked(
- mSwitchCameraButton.isSelected() /* useFrontFacingCamera */);
- break;
- case R.id.pauseVideoButton:
- getPresenter().pauseVideoClicked(
- !mPauseVideoButton.isSelected() /* pause */);
- break;
- case R.id.overflowButton:
- if (mOverflowPopup != null) {
- mOverflowPopup.show();
- }
- break;
- case R.id.manageVideoCallConferenceButton:
- onManageVideoCallConferenceClicked();
- break;
- default:
- Log.wtf(this, "onClick: unexpected");
- return;
+ } else if (id == R.id.manageVideoCallConferenceButton) {
+ onManageVideoCallConferenceClicked();
+ } else {
+ Log.wtf(this, "onClick: unexpected");
+ return;
}
view.performHapticFeedback(
@@ -394,34 +379,33 @@
}
private View getButtonById(int id) {
- switch (id) {
- case BUTTON_AUDIO:
- return mAudioButton;
- case BUTTON_MUTE:
- return mMuteButton;
- case BUTTON_DIALPAD:
- return mShowDialpadButton;
- case BUTTON_HOLD:
- return mHoldButton;
- case BUTTON_SWAP:
- return mSwapButton;
- case BUTTON_UPGRADE_TO_VIDEO:
- return mChangeToVideoButton;
- case BUTTON_DOWNGRADE_TO_AUDIO:
- return mChangeToVoiceButton;
- case BUTTON_SWITCH_CAMERA:
- return mSwitchCameraButton;
- case BUTTON_ADD_CALL:
- return mAddCallButton;
- case BUTTON_MERGE:
- return mMergeButton;
- case BUTTON_PAUSE_VIDEO:
- return mPauseVideoButton;
- case BUTTON_MANAGE_VIDEO_CONFERENCE:
- return mManageVideoCallConferenceButton;
- default:
- Log.w(this, "Invalid button id");
- return null;
+ if (id == BUTTON_AUDIO) {
+ return mAudioButton;
+ } else if (id == BUTTON_MUTE) {
+ return mMuteButton;
+ } else if (id == BUTTON_DIALPAD) {
+ return mShowDialpadButton;
+ } else if (id == BUTTON_HOLD) {
+ return mHoldButton;
+ } else if (id == BUTTON_SWAP) {
+ return mSwapButton;
+ } else if (id == BUTTON_UPGRADE_TO_VIDEO) {
+ return mChangeToVideoButton;
+ } else if (id == BUTTON_DOWNGRADE_TO_AUDIO) {
+ return mChangeToVoiceButton;
+ } else if (id == BUTTON_SWITCH_CAMERA) {
+ return mSwitchCameraButton;
+ } else if (id == BUTTON_ADD_CALL) {
+ return mAddCallButton;
+ } else if (id == BUTTON_MERGE) {
+ return mMergeButton;
+ } else if (id == BUTTON_PAUSE_VIDEO) {
+ return mPauseVideoButton;
+ } else if (id == BUTTON_MANAGE_VIDEO_CONFERENCE) {
+ return mManageVideoCallConferenceButton;
+ } else {
+ Log.w(this, "Invalid button id");
+ return null;
}
}
@@ -539,25 +523,20 @@
Log.d(this, " id: " + item.getItemId());
Log.d(this, " title: '" + item.getTitle() + "'");
- int mode = CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE;
+ int mode = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
+ int resId = item.getItemId();
- switch (item.getItemId()) {
- case R.id.audio_mode_speaker:
- mode = CallAudioStateCompat.ROUTE_SPEAKER;
- break;
- case R.id.audio_mode_earpiece:
- case R.id.audio_mode_wired_headset:
- // InCallCallAudioState.ROUTE_EARPIECE means either the handset earpiece,
- // or the wired headset (if connected.)
- mode = CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE;
- break;
- case R.id.audio_mode_bluetooth:
- mode = CallAudioStateCompat.ROUTE_BLUETOOTH;
- break;
- default:
- Log.e(this, "onMenuItemClick: unexpected View ID " + item.getItemId()
- + " (MenuItem = '" + item + "')");
- break;
+ if (resId == R.id.audio_mode_speaker) {
+ mode = CallAudioState.ROUTE_SPEAKER;
+ } else if (resId == R.id.audio_mode_earpiece || resId == R.id.audio_mode_wired_headset) {
+ // InCallCallAudioState.ROUTE_EARPIECE means either the handset earpiece,
+ // or the wired headset (if connected.)
+ mode = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
+ } else if (resId == R.id.audio_mode_bluetooth) {
+ mode = CallAudioState.ROUTE_BLUETOOTH;
+ } else {
+ Log.e(this, "onMenuItemClick: unexpected View ID " + item.getItemId()
+ + " (MenuItem = '" + item + "')");
}
getPresenter().setAudioMode(mode);
@@ -582,9 +561,9 @@
*/
private void onAudioButtonClicked() {
Log.d(this, "onAudioButtonClicked: " +
- CallAudioStateCompat.audioRouteToString(getPresenter().getSupportedAudio()));
+ CallAudioState.audioRouteToString(getPresenter().getSupportedAudio()));
- if (isSupported(CallAudioStateCompat.ROUTE_BLUETOOTH)) {
+ if (isSupported(CallAudioState.ROUTE_BLUETOOTH)) {
showAudioModePopup();
} else {
getPresenter().toggleSpeakerphone();
@@ -619,8 +598,8 @@
* are visible based on the supported audio formats.
*/
private void updateAudioButtons(int supportedModes) {
- final boolean bluetoothSupported = isSupported(CallAudioStateCompat.ROUTE_BLUETOOTH);
- final boolean speakerSupported = isSupported(CallAudioStateCompat.ROUTE_SPEAKER);
+ final boolean bluetoothSupported = isSupported(CallAudioState.ROUTE_BLUETOOTH);
+ final boolean speakerSupported = isSupported(CallAudioState.ROUTE_SPEAKER);
boolean audioButtonEnabled = false;
boolean audioButtonChecked = false;
@@ -640,9 +619,9 @@
showMoreIndicator = true;
// Update desired layers:
- if (isAudio(CallAudioStateCompat.ROUTE_BLUETOOTH)) {
+ if (isAudio(CallAudioState.ROUTE_BLUETOOTH)) {
showBluetoothIcon = true;
- } else if (isAudio(CallAudioStateCompat.ROUTE_SPEAKER)) {
+ } else if (isAudio(CallAudioState.ROUTE_SPEAKER)) {
showSpeakerphoneIcon = true;
} else {
showHandsetIcon = true;
@@ -661,7 +640,7 @@
// The audio button *is* a toggle in this state, and indicated the
// current state of the speakerphone.
- audioButtonChecked = isAudio(CallAudioStateCompat.ROUTE_SPEAKER);
+ audioButtonChecked = isAudio(CallAudioState.ROUTE_SPEAKER);
mAudioButton.setSelected(audioButtonChecked);
// update desired layers:
@@ -722,20 +701,20 @@
// If bluetooth is not supported, the audio buttion will toggle, so use the label "speaker".
// Otherwise, use the label of the currently selected audio mode.
- if (!isSupported(CallAudioStateCompat.ROUTE_BLUETOOTH)) {
+ if (!isSupported(CallAudioState.ROUTE_BLUETOOTH)) {
stringId = R.string.audio_mode_speaker;
} else {
switch (mode) {
- case CallAudioStateCompat.ROUTE_EARPIECE:
+ case CallAudioState.ROUTE_EARPIECE:
stringId = R.string.audio_mode_earpiece;
break;
- case CallAudioStateCompat.ROUTE_BLUETOOTH:
+ case CallAudioState.ROUTE_BLUETOOTH:
stringId = R.string.audio_mode_bluetooth;
break;
- case CallAudioStateCompat.ROUTE_WIRED_HEADSET:
+ case CallAudioState.ROUTE_WIRED_HEADSET:
stringId = R.string.audio_mode_wired_headset;
break;
- case CallAudioStateCompat.ROUTE_SPEAKER:
+ case CallAudioState.ROUTE_SPEAKER:
stringId = R.string.audio_mode_speaker;
break;
}
@@ -765,7 +744,7 @@
// See comments below for the exact logic.
final MenuItem speakerItem = menu.findItem(R.id.audio_mode_speaker);
- speakerItem.setEnabled(isSupported(CallAudioStateCompat.ROUTE_SPEAKER));
+ speakerItem.setEnabled(isSupported(CallAudioState.ROUTE_SPEAKER));
// TODO: Show speakerItem as initially "selected" if
// speaker is on.
@@ -774,7 +753,7 @@
final MenuItem earpieceItem = menu.findItem(R.id.audio_mode_earpiece);
final MenuItem wiredHeadsetItem = menu.findItem(R.id.audio_mode_wired_headset);
- final boolean usingHeadset = isSupported(CallAudioStateCompat.ROUTE_WIRED_HEADSET);
+ final boolean usingHeadset = isSupported(CallAudioState.ROUTE_WIRED_HEADSET);
earpieceItem.setVisible(!usingHeadset);
earpieceItem.setEnabled(!usingHeadset);
wiredHeadsetItem.setVisible(usingHeadset);
@@ -784,7 +763,7 @@
// bluetoothIndicatorOn are both false.
final MenuItem bluetoothItem = menu.findItem(R.id.audio_mode_bluetooth);
- bluetoothItem.setEnabled(isSupported(CallAudioStateCompat.ROUTE_BLUETOOTH));
+ bluetoothItem.setEnabled(isSupported(CallAudioState.ROUTE_BLUETOOTH));
// TODO: Show bluetoothItem as initially "selected" if
// bluetoothIndicatorOn is true.
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index dde6295..e8c2d4b 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -31,12 +31,12 @@
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
+import android.telecom.CallAudioState;
import android.telecom.InCallService.VideoCall;
import android.telecom.VideoProfile;
import com.android.contacts.common.compat.CallSdkCompat;
import com.android.contacts.common.compat.SdkVersionOverride;
-import com.android.dialer.compat.CallAudioStateCompat;
import com.android.dialer.compat.UserManagerCompat;
import com.android.incallui.AudioModeProvider.AudioModeListener;
import com.android.incallui.InCallCameraManager.Listener;
@@ -189,7 +189,7 @@
// an update for onAudioMode(). This will make UI response immediate
// if it turns out to be slow
- Log.d(this, "Sending new Audio Mode: " + CallAudioStateCompat.audioRouteToString(mode));
+ Log.d(this, "Sending new Audio Mode: " + CallAudioState.audioRouteToString(mode));
TelecomAdapter.getInstance().setAudioRoute(mode);
}
@@ -198,7 +198,7 @@
*/
public void toggleSpeakerphone() {
// this function should not be called if bluetooth is available
- if (0 != (CallAudioStateCompat.ROUTE_BLUETOOTH & getSupportedAudio())) {
+ if (0 != (CallAudioState.ROUTE_BLUETOOTH & getSupportedAudio())) {
// It's clear the UI is wrong, so update the supported mode once again.
Log.e(this, "toggling speakerphone not allowed when bluetooth supported.");
@@ -206,11 +206,11 @@
return;
}
- int newMode = CallAudioStateCompat.ROUTE_SPEAKER;
+ int newMode = CallAudioState.ROUTE_SPEAKER;
// if speakerphone is already on, change to wired/earpiece
- if (getAudioMode() == CallAudioStateCompat.ROUTE_SPEAKER) {
- newMode = CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE;
+ if (getAudioMode() == CallAudioState.ROUTE_SPEAKER) {
+ newMode = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
}
setAudioMode(newMode);
@@ -380,7 +380,7 @@
&& call.can(android.telecom.Call.Details.CAPABILITY_HOLD);
final boolean isCallOnHold = call.getState() == Call.State.ONHOLD;
- final boolean showAddCall = TelecomAdapter.getInstance().canAddCall(call)
+ final boolean showAddCall = TelecomAdapter.getInstance().canAddCall()
&& UserManagerCompat.isUserUnlocked(ui.getContext());
final boolean showMerge = call.can(
android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE);
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index ad72690..84a732c 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -58,6 +58,7 @@
import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
import com.android.contacts.common.widget.FloatingActionButtonController;
+import com.android.dialer.R;
import com.android.phone.common.animation.AnimUtils;
import java.util.List;
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 7749118..dd255e0 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -45,6 +45,7 @@
import com.android.contacts.common.preference.ContactsPreferences;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.contacts.common.util.ContactDisplayUtils;
+import com.android.dialer.R;
import com.android.incallui.Call.State;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
import com.android.incallui.ContactInfoCache.ContactInfoCacheCallback;
@@ -53,7 +54,6 @@
import com.android.incallui.InCallPresenter.InCallState;
import com.android.incallui.InCallPresenter.InCallStateListener;
import com.android.incallui.InCallPresenter.IncomingCallListener;
-import com.android.incallui.compat.telecom.DetailsCompat;
import com.android.incalluibind.ObjectFactory;
import java.lang.ref.WeakReference;
@@ -278,7 +278,7 @@
mPrimary.getState() == Call.State.INCOMING);
updatePrimaryDisplayInfo();
maybeStartSearch(mPrimary, true);
- mPrimary.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
+ maybeClearSessionModificationState(mPrimary);
}
if (previousPrimary != null && mPrimary == null) {
@@ -298,7 +298,7 @@
mSecondary.getState() == Call.State.INCOMING);
updateSecondaryDisplayInfo();
maybeStartSearch(mSecondary, false);
- mSecondary.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
+ maybeClearSessionModificationState(mSecondary);
}
// Start/stop timers.
@@ -345,7 +345,7 @@
updatePrimaryCallState();
if (call.can(Details.CAPABILITY_MANAGE_CONFERENCE) !=
- DetailsCompat.can(details, Details.CAPABILITY_MANAGE_CONFERENCE)) {
+ details.can(Details.CAPABILITY_MANAGE_CONFERENCE)) {
maybeShowManageConferenceCallButton();
}
}
@@ -563,6 +563,13 @@
}
}
+ private void maybeClearSessionModificationState(Call call) {
+ if (call.getSessionModificationState() !=
+ Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST) {
+ call.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
+ }
+ }
+
/**
* Starts a query for more contact data for the save primary and secondary calls.
*/
@@ -1105,8 +1112,8 @@
}
private static boolean hasCallSubject(Call call) {
- return !TextUtils.isEmpty(DetailsCompat.getIntentExtras(
- call.getTelecomCall().getDetails()).getString(TelecomManager.EXTRA_CALL_SUBJECT));
+ return !TextUtils.isEmpty(call.getTelecomCall().getDetails().getIntentExtras()
+ .getString(TelecomManager.EXTRA_CALL_SUBJECT));
}
public interface CallCardUi extends Ui {
diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java
index 670c3fd..a638e11 100644
--- a/InCallUI/src/com/android/incallui/CallerInfo.java
+++ b/InCallUI/src/com/android/incallui/CallerInfo.java
@@ -16,6 +16,7 @@
package com.android.incallui;
+import com.android.dialer.util.PhoneLookupUtil;
import com.google.common.primitives.Longs;
import android.content.Context;
@@ -32,10 +33,13 @@
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
+import com.android.contacts.common.compat.CompatUtils;
+import com.android.contacts.common.compat.PhoneLookupSdkCompat;
import com.android.contacts.common.ContactsUtils;
import com.android.contacts.common.ContactsUtils.UserType;
import com.android.contacts.common.util.PhoneNumberHelper;
import com.android.contacts.common.util.TelephonyManagerUtils;
+import com.android.dialer.R;
import com.android.dialer.calllog.ContactInfoHelper;
/**
@@ -44,8 +48,9 @@
public class CallerInfo {
private static final String TAG = "CallerInfo";
- public static final String[] DEFAULT_PHONELOOKUP_PROJECTION = new String[] {
- PhoneLookup._ID,
+ // We should always use this projection starting from NYC onward.
+ private static final String[] DEFAULT_PHONELOOKUP_PROJECTION = new String[] {
+ PhoneLookupSdkCompat.CONTACT_ID,
PhoneLookup.DISPLAY_NAME,
PhoneLookup.LOOKUP_KEY,
PhoneLookup.NUMBER,
@@ -57,6 +62,32 @@
PhoneLookup.SEND_TO_VOICEMAIL
};
+ // In pre-N, contact id is stored in {@link PhoneLookup._ID} in non-sip query.
+ private static final String[] BACKWARD_COMPATIBLE_NON_SIP_DEFAULT_PHONELOOKUP_PROJECTION =
+ new String[] {
+ PhoneLookup._ID,
+ PhoneLookup.DISPLAY_NAME,
+ PhoneLookup.LOOKUP_KEY,
+ PhoneLookup.NUMBER,
+ PhoneLookup.NORMALIZED_NUMBER,
+ PhoneLookup.LABEL,
+ PhoneLookup.TYPE,
+ PhoneLookup.PHOTO_URI,
+ PhoneLookup.CUSTOM_RINGTONE,
+ PhoneLookup.SEND_TO_VOICEMAIL
+ };
+
+ public static String[] getDefaultPhoneLookupProjection(Uri phoneLookupUri) {
+ if (CompatUtils.isNCompatible()) {
+ return DEFAULT_PHONELOOKUP_PROJECTION;
+ }
+ // Pre-N
+ boolean isSip = phoneLookupUri.getBooleanQueryParameter(
+ ContactsContract.PhoneLookup.QUERY_PARAMETER_SIP_ADDRESS, false);
+ return (isSip) ? DEFAULT_PHONELOOKUP_PROJECTION
+ : BACKWARD_COMPATIBLE_NON_SIP_DEFAULT_PHONELOOKUP_PROJECTION;
+ }
+
/**
* Please note that, any one of these member variables can be null,
* and any accesses to them should be prepared to handle such a case.
@@ -480,7 +511,7 @@
// for phone numbers.
// MIME type: PhoneLookup.CONTENT_TYPE (= "vnd.android.cursor.dir/phone_lookup")
Log.v(TAG, "'phone_lookup' URI; using PhoneLookup._ID");
- columnName = PhoneLookup._ID;
+ columnName = PhoneLookupUtil.getContactIdColumnNameForUri(contactRef);
} else {
Log.v(TAG, "Unexpected prefix for contactRef '" + url + "'");
}
diff --git a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
index bf5e1a3..6dbbfc1 100644
--- a/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
+++ b/InCallUI/src/com/android/incallui/CallerInfoAsyncQuery.java
@@ -18,13 +18,13 @@
import com.google.common.primitives.Longs;
+import android.Manifest;
import android.content.AsyncQueryHandler;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.net.Uri;
-import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -35,7 +35,9 @@
import com.android.contacts.common.ContactsUtils;
import com.android.contacts.common.compat.DirectoryCompat;
+import com.android.contacts.common.util.PermissionsUtil;
import com.android.contacts.common.util.TelephonyManagerUtils;
+import com.android.dialer.R;
import com.android.dialer.calllog.ContactInfoHelper;
import com.android.dialer.service.CachedNumberLookupService;
import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo;
@@ -339,6 +341,12 @@
Log.d(LOG_TAG, "##### CallerInfoAsyncQuery startContactProviderQuery()... #####");
Log.d(LOG_TAG, "- number: " + info.phoneNumber);
Log.d(LOG_TAG, "- cookie: " + cookie);
+ if (!PermissionsUtil.hasPermission(context, Manifest.permission.READ_CONTACTS)) {
+ Log.w(LOG_TAG, "Dialer doesn't have permission to read contacts.");
+ listener.onQueryComplete(token, cookie, info);
+ return;
+ }
+
OnQueryCompleteListener contactsProviderQueryCompleteListener =
new OnQueryCompleteListener() {
@Override
@@ -400,13 +408,15 @@
cw.event = EVENT_NEW_QUERY;
}
+
+ String[] proejection = CallerInfo.getDefaultPhoneLookupProjection(contactRef);
c.mHandler.startQuery(token,
- cw, // cookie
- contactRef, // uri
- CallerInfo.DEFAULT_PHONELOOKUP_PROJECTION, // projection
- null, // selection
- null, // selectionArgs
- null); // orderBy
+ cw, // cookie
+ contactRef, // uri
+ proejection, // projection
+ null, // selection
+ null, // selectionArgs
+ null); // orderBy
return c;
}
diff --git a/InCallUI/src/com/android/incallui/CallerInfoUtils.java b/InCallUI/src/com/android/incallui/CallerInfoUtils.java
index ae59d7d..aff3956 100644
--- a/InCallUI/src/com/android/incallui/CallerInfoUtils.java
+++ b/InCallUI/src/com/android/incallui/CallerInfoUtils.java
@@ -12,6 +12,7 @@
import com.android.contacts.common.compat.telecom.TelecomManagerCompat;
import com.android.contacts.common.model.Contact;
import com.android.contacts.common.model.ContactLoader;
+import com.android.dialer.R;
import com.android.dialer.calllog.ContactInfo;
import com.android.dialer.service.CachedNumberLookupService;
import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo;
diff --git a/InCallUI/src/com/android/incallui/CircularRevealFragment.java b/InCallUI/src/com/android/incallui/CircularRevealFragment.java
index f4a2e91..01bd253 100644
--- a/InCallUI/src/com/android/incallui/CircularRevealFragment.java
+++ b/InCallUI/src/com/android/incallui/CircularRevealFragment.java
@@ -34,6 +34,7 @@
import android.view.ViewTreeObserver.OnPreDrawListener;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
+import com.android.dialer.R;
public class CircularRevealFragment extends Fragment {
static final String TAG = "CircularRevealFragment";
diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java b/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java
index f5f52fc..fe941c8 100644
--- a/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java
+++ b/InCallUI/src/com/android/incallui/ConferenceManagerFragment.java
@@ -25,6 +25,7 @@
import android.widget.ListView;
import com.android.contacts.common.ContactPhotoManager;
+import com.android.dialer.R;
import java.util.List;
diff --git a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
index 86002b0..d68ae1f 100644
--- a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -37,8 +37,8 @@
import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
import com.android.contacts.common.preference.ContactsPreferences;
import com.android.contacts.common.util.ContactDisplayUtils;
+import com.android.dialer.R;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
-import com.android.incallui.compat.telecom.DetailsCompat;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -356,10 +356,9 @@
new ContactLookupCallback(this));
}
- boolean thisRowCanSeparate = mParentCanSeparate && DetailsCompat.can(
- call.getTelecomCall().getDetails(),
+ boolean thisRowCanSeparate = mParentCanSeparate && call.getTelecomCall().getDetails().can(
android.telecom.Call.Details.CAPABILITY_SEPARATE_FROM_CONFERENCE);
- boolean thisRowCanDisconnect = DetailsCompat.can(call.getTelecomCall().getDetails(),
+ boolean thisRowCanDisconnect = call.getTelecomCall().getDetails().can(
android.telecom.Call.Details.CAPABILITY_DISCONNECT_FROM_CONFERENCE);
setCallerInfoForRow(result, contactCache.namePrimary,
diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java
index ab4150b..9d6fc46 100644
--- a/InCallUI/src/com/android/incallui/ContactInfoCache.java
+++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java
@@ -40,6 +40,7 @@
import com.android.contacts.common.ContactsUtils;
import com.android.contacts.common.util.PhoneNumberHelper;
+import com.android.dialer.R;
import com.android.dialer.calllog.ContactInfo;
import com.android.dialer.service.CachedNumberLookupService;
import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo;
diff --git a/InCallUI/src/com/android/incallui/ContactsAsyncHelper.java b/InCallUI/src/com/android/incallui/ContactsAsyncHelper.java
index 011eef2..d959fad 100644
--- a/InCallUI/src/com/android/incallui/ContactsAsyncHelper.java
+++ b/InCallUI/src/com/android/incallui/ContactsAsyncHelper.java
@@ -30,6 +30,8 @@
import android.os.Message;
import android.provider.ContactsContract.Contacts;
+import com.android.dialer.R;
+
import java.io.IOException;
import java.io.InputStream;
diff --git a/InCallUI/src/com/android/incallui/DialpadFragment.java b/InCallUI/src/com/android/incallui/DialpadFragment.java
index ab44cf2..ae66a49 100644
--- a/InCallUI/src/com/android/incallui/DialpadFragment.java
+++ b/InCallUI/src/com/android/incallui/DialpadFragment.java
@@ -34,6 +34,7 @@
import android.widget.TextView;
import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
+import com.android.dialer.R;
import com.android.phone.common.dialpad.DialpadKeyButton;
import com.android.phone.common.dialpad.DialpadView;
diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
index 1bd6d39..342f6b4 100644
--- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java
+++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
@@ -23,6 +23,7 @@
import android.util.AttributeSet;
import android.view.View;
+import com.android.dialer.R;
import com.android.incallui.widget.multiwaveview.GlowPadView;
/**
@@ -111,31 +112,24 @@
public void onTrigger(View v, int target) {
Log.d(this, "onTrigger() view=" + v + " target=" + target);
final int resId = getResourceIdForTarget(target);
- switch (resId) {
- case R.drawable.ic_lockscreen_answer:
- mAnswerFragment.onAnswer(VideoProfile.STATE_AUDIO_ONLY, getContext());
- mTargetTriggered = true;
- break;
- case R.drawable.ic_lockscreen_decline:
- mAnswerFragment.onDecline(getContext());
- mTargetTriggered = true;
- break;
- case R.drawable.ic_lockscreen_text:
- mAnswerFragment.onText();
- mTargetTriggered = true;
- break;
- case R.drawable.ic_videocam:
- case R.drawable.ic_lockscreen_answer_video:
- mAnswerFragment.onAnswer(mVideoState, getContext());
- mTargetTriggered = true;
- break;
- case R.drawable.ic_lockscreen_decline_video:
- mAnswerFragment.onDeclineUpgradeRequest(getContext());
- mTargetTriggered = true;
- break;
- default:
- // Code should never reach here.
- Log.e(this, "Trigger detected on unhandled resource. Skipping.");
+ if (resId == R.drawable.ic_lockscreen_answer) {
+ mAnswerFragment.onAnswer(VideoProfile.STATE_AUDIO_ONLY, getContext());
+ mTargetTriggered = true;
+ } else if (resId == R.drawable.ic_lockscreen_decline) {
+ mAnswerFragment.onDecline(getContext());
+ mTargetTriggered = true;
+ } else if (resId == R.drawable.ic_lockscreen_text) {
+ mAnswerFragment.onText();
+ mTargetTriggered = true;
+ } else if (resId == R.drawable.ic_videocam || resId == R.drawable.ic_lockscreen_answer_video) {
+ mAnswerFragment.onAnswer(mVideoState, getContext());
+ mTargetTriggered = true;
+ } else if (resId == R.drawable.ic_lockscreen_decline_video) {
+ mAnswerFragment.onDeclineUpgradeRequest(getContext());
+ mTargetTriggered = true;
+ } else {
+ // Code should never reach here.
+ Log.e(this, "Trigger detected on unhandled resource. Skipping.");
}
}
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index dff2747..5cd21a5 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -55,10 +55,10 @@
import com.android.contacts.common.interactions.TouchPointManager;
import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment;
import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener;
+import com.android.dialer.R;
import com.android.dialer.logging.Logger;
import com.android.dialer.logging.ScreenEvent;
import com.android.incallui.Call.State;
-import com.android.incallui.compat.telecom.DetailsCompat;
import com.android.incallui.util.AccessibilityUtil;
import com.android.phone.common.animation.AnimUtils;
import com.android.phone.common.animation.AnimationListenerAdapter;
@@ -573,7 +573,7 @@
Bundle extras = null;
if (call != null) {
- extras = DetailsCompat.getIntentExtras(call.getTelecomCall().getDetails());
+ extras = call.getTelecomCall().getDetails().getIntentExtras();
}
if (extras == null) {
// Initialize the extras bundle to avoid NPE
@@ -610,8 +610,8 @@
Call pendingAccountSelectionCall = CallList.getInstance().getWaitingForAccountCall();
if (pendingAccountSelectionCall != null) {
showCallCardFragment(false);
- Bundle extras = DetailsCompat.getIntentExtras(pendingAccountSelectionCall
- .getTelecomCall().getDetails());
+ Bundle extras =
+ pendingAccountSelectionCall.getTelecomCall().getDetails().getIntentExtras();
final List<PhoneAccountHandle> phoneAccountHandles;
if (extras != null) {
@@ -780,9 +780,11 @@
showFragment(TAG_DIALPAD_FRAGMENT, true, true);
mDialpadFragment.animateShowDialpad();
}
- mCallCardFragment.onDialpadVisibilityChange(show);
mDialpadFragment.getView().startAnimation(show ? mSlideIn : mSlideOut);
}
+ // Note: onDialpadVisibilityChange is called here to ensure that the dialpad FAB
+ // repositions itself.
+ mCallCardFragment.onDialpadVisibilityChange(show);
final ProximitySensor sensor = InCallPresenter.getInstance().getProximitySensor();
if (sensor != null) {
diff --git a/InCallUI/src/com/android/incallui/InCallContactInteractions.java b/InCallUI/src/com/android/incallui/InCallContactInteractions.java
index e627668..88070fe 100644
--- a/InCallUI/src/com/android/incallui/InCallContactInteractions.java
+++ b/InCallUI/src/com/android/incallui/InCallContactInteractions.java
@@ -33,6 +33,8 @@
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
+import com.android.dialer.R;
+
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -394,4 +396,4 @@
return listItem;
}
}
-}
\ No newline at end of file
+}
diff --git a/InCallUI/src/com/android/incallui/InCallDateUtils.java b/InCallUI/src/com/android/incallui/InCallDateUtils.java
index da3bb6b..e6089d5 100644
--- a/InCallUI/src/com/android/incallui/InCallDateUtils.java
+++ b/InCallUI/src/com/android/incallui/InCallDateUtils.java
@@ -3,6 +3,8 @@
import android.content.Context;
import android.content.res.Resources;
+import com.android.dialer.R;
+
/**
* Methods to parse time and date information in the InCallUi
*/
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index f50da8d..5a27b4c 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -25,7 +25,6 @@
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Point;
-import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.CallLog;
@@ -48,6 +47,7 @@
import com.android.contacts.common.interactions.TouchPointManager;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
+import com.android.dialer.R;
import com.android.dialer.calllog.CallLogAsyncTaskUtil;
import com.android.dialer.calllog.CallLogAsyncTaskUtil.OnCallLogQueryFinishedListener;
import com.android.dialer.database.FilteredNumberAsyncQueryHandler;
@@ -56,7 +56,6 @@
import com.android.dialer.logging.InteractionEvent;
import com.android.dialer.logging.Logger;
import com.android.dialer.util.TelecomUtil;
-import com.android.incallui.compat.telecom.DetailsCompat;
import com.android.incallui.util.TelecomCallUtil;
import com.android.incalluibind.ObjectFactory;
@@ -78,7 +77,8 @@
* TODO: This class has become more of a state machine at this point. Consider renaming.
*/
public class InCallPresenter implements CallList.Listener,
- CircularRevealFragment.OnCircularRevealCompleteListener {
+ CircularRevealFragment.OnCircularRevealCompleteListener,
+ InCallVideoCallCallbackNotifier.SessionModificationListener {
private static final String EXTRA_FIRST_TIME_SHOWN =
"com.android.incallui.intent.extra.FIRST_TIME_SHOWN";
@@ -138,89 +138,38 @@
*/
private boolean mIsFullScreen = false;
- private final Object mCallCallback = newTelecomCallCallback();
-
- private Object newTelecomCallCallback() {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- return newMarshmallowTelecomCallCallback();
+ private final android.telecom.Call.Callback mCallCallback = new android.telecom.Call.Callback() {
+ @Override
+ public void onPostDialWait(android.telecom.Call telecomCall,
+ String remainingPostDialSequence) {
+ final Call call = mCallList.getCallByTelecomCall(telecomCall);
+ if (call == null) {
+ Log.w(this, "Call not found in call list: " + telecomCall);
+ return;
+ }
+ onPostDialCharWait(call.getId(), remainingPostDialSequence);
}
- return newLollipopTelecomCallCallback();
- }
- private Object newMarshmallowTelecomCallCallback() {
- Log.i(this, "Using android.telecom.Call.Callback");
- return new android.telecom.Call.Callback() {
- @Override
- public void onPostDialWait(android.telecom.Call telecomCall,
- String remainingPostDialSequence) {
- final Call call = mCallList.getCallByTelecomCall(telecomCall);
- if (call == null) {
- Log.w(this, "Call not found in call list: " + telecomCall);
- return;
- }
- onPostDialCharWait(call.getId(), remainingPostDialSequence);
+ @Override
+ public void onDetailsChanged(android.telecom.Call telecomCall,
+ android.telecom.Call.Details details) {
+ final Call call = mCallList.getCallByTelecomCall(telecomCall);
+ if (call == null) {
+ Log.w(this, "Call not found in call list: " + telecomCall);
+ return;
}
+ for (InCallDetailsListener listener : mDetailsListeners) {
+ listener.onDetailsChanged(call, details);
+ }
+ }
- @Override
- public void onDetailsChanged(android.telecom.Call telecomCall,
- android.telecom.Call.Details details) {
- final Call call = mCallList.getCallByTelecomCall(telecomCall);
- if (call == null) {
- Log.w(this, "Call not found in call list: " + telecomCall);
- return;
- }
- for (InCallDetailsListener listener : mDetailsListeners) {
- listener.onDetailsChanged(call, details);
- }
- }
-
- @Override
- public void onConferenceableCallsChanged(android.telecom.Call telecomCall,
- List<android.telecom.Call> conferenceableCalls) {
- Log.i(this, "onConferenceableCallsChanged: " + telecomCall);
- onDetailsChanged(telecomCall, telecomCall.getDetails());
- }
- };
- }
-
- private Object newLollipopTelecomCallCallback() {
- // This code only runs for Google Experience phones on the pre-M sdk since only the system
- // dialer can invoke the InCallUI code. This allows us to safely use the
- // android.telecom.Call.Listener interface
- Log.i(this, "Using android.telecom.Call.Listener");
- return new android.telecom.Call.Listener() {
- @Override
- public void onPostDialWait(android.telecom.Call telecomCall,
- String remainingPostDialSequence) {
- final Call call = mCallList.getCallByTelecomCall(telecomCall);
- if (call == null) {
- Log.w(this, "Call not found in call list: " + telecomCall);
- return;
- }
- onPostDialCharWait(call.getId(), remainingPostDialSequence);
- }
-
- @Override
- public void onDetailsChanged(android.telecom.Call telecomCall,
- android.telecom.Call.Details details) {
- final Call call = mCallList.getCallByTelecomCall(telecomCall);
- if (call == null) {
- Log.w(this, "Call not found in call list: " + telecomCall);
- return;
- }
- for (InCallDetailsListener listener : mDetailsListeners) {
- listener.onDetailsChanged(call, details);
- }
- }
-
- @Override
- public void onConferenceableCallsChanged(android.telecom.Call telecomCall,
- List<android.telecom.Call> conferenceableCalls) {
- Log.i(this, "onConferenceableCallsChanged: " + telecomCall);
- onDetailsChanged(telecomCall, telecomCall.getDetails());
- }
- };
- }
+ @Override
+ public void onConferenceableCallsChanged(android.telecom.Call telecomCall,
+ List<android.telecom.Call> conferenceableCalls) {
+ Log.i(this, "onConferenceableCallsChanged: " + telecomCall);
+ onDetailsChanged(telecomCall, telecomCall.getDetails());
+ }
+ };
private PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
public void onCallStateChanged(int state, String incomingNumber) {
@@ -387,6 +336,7 @@
mCallList.addListener(this);
VideoPauseController.getInstance().setUp(this);
+ InCallVideoCallCallbackNotifier.getInstance().addSessionModificationListener(this);
mFilteredQueryHandler = new FilteredNumberAsyncQueryHandler(context.getContentResolver());
mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
@@ -413,6 +363,7 @@
mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
VideoPauseController.getInstance().tearDown();
+ InCallVideoCallCallbackNotifier.getInstance().removeSessionModificationListener(this);
}
private void attemptFinishActivity() {
@@ -556,11 +507,7 @@
// Since a call has been added we are no longer waiting for Telecom to send us a call.
setBoundAndWaitingForOutgoingCall(false, null);
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- call.registerCallback((android.telecom.Call.Callback) mCallCallback);
- } else {
- call.addListener((android.telecom.Call.Listener) mCallCallback);
- }
+ call.registerCallback(mCallCallback);
}
/**
@@ -629,11 +576,7 @@
public void onCallRemoved(android.telecom.Call call) {
mCallList.onCallRemoved(call);
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- call.unregisterCallback((android.telecom.Call.Callback) mCallCallback);
- } else {
- call.removeListener((android.telecom.Call.Listener) mCallCallback);
- }
+ call.unregisterCallback(mCallCallback);
}
public void onCanAddCallChanged(boolean canAddCall) {
@@ -726,6 +669,17 @@
}
}
+ @Override
+ public void onUpgradeToVideoRequest(Call call, int videoState) {
+ Log.d(this, "onUpgradeToVideoRequest call = " + call + " video state = " + videoState);
+
+ if (call == null) {
+ return;
+ }
+
+ call.setRequestedVideoState(videoState);
+ }
+
/**
* Given the call list, return the state in which the in-call screen should be.
*/
@@ -980,6 +934,14 @@
}
}
+ /*package*/
+ void declineUpgradeRequest() {
+ // Pass mContext if InCallActivity is destroyed.
+ // Ex: When user pressed back key while in active call and
+ // then modify request is received followed by MT call.
+ declineUpgradeRequest(mInCallActivity != null ? mInCallActivity : mContext);
+ }
+
/**
* Returns true if the incall app is the foreground application.
*/
@@ -1448,7 +1410,7 @@
private void setDisconnectCauseForMissingAccounts(Call call) {
android.telecom.Call telecomCall = call.getTelecomCall();
- Bundle extras = DetailsCompat.getIntentExtras(telecomCall.getDetails());
+ Bundle extras = telecomCall.getDetails().getIntentExtras();
// Initialize the extras bundle to avoid NPE
if (extras == null) {
extras = new Bundle();
diff --git a/InCallUI/src/com/android/incallui/InCallServiceImpl.java b/InCallUI/src/com/android/incallui/InCallServiceImpl.java
index 31d6efb..8693697 100644
--- a/InCallUI/src/com/android/incallui/InCallServiceImpl.java
+++ b/InCallUI/src/com/android/incallui/InCallServiceImpl.java
@@ -18,15 +18,10 @@
import android.content.Context;
import android.content.Intent;
-import android.os.Build;
import android.os.IBinder;
-import android.telecom.AudioState;
import android.telecom.Call;
import android.telecom.CallAudioState;
import android.telecom.InCallService;
-import android.telecom.Phone;
-
-import com.android.contacts.common.compat.SdkVersionOverride;
/**
* Used to receive updates about calls from the Telecom component. This service is bound to
@@ -100,85 +95,4 @@
TelecomAdapter.getInstance().clearInCallService();
InCallPresenter.getInstance().tearDown();
}
-
- /*
- * Compatibility code for devices running the L sdk. In that version of the sdk, InCallService
- * callbacks were registered via a android.telecom.Phone$Listener. These callbacks typically
- * correspond 1:1 to callbacks now found in android.telecom.InCallService so the compatibility
- * code forwards to those methods.
- */
- private Phone.Listener mPhoneListener = new Phone.Listener() {
- @Override
- public void onAudioStateChanged(Phone phone, AudioState audioState) {
- /*
- * Need to use reflection here; in M these are private fields retrieved through getters,
- * but in L they are public fields without getters.
- */
- try {
- boolean isMuted = AudioState.class.getField("isMuted").getBoolean(audioState);
- int route = AudioState.class.getField("route").getInt(audioState);
- int supportedRouteMask = AudioState.class.getField("supportedRouteMask")
- .getInt(audioState);
- AudioModeProvider.getInstance()
- .onAudioStateChanged(isMuted, route, supportedRouteMask);
- } catch (ReflectiveOperationException e) {
- Log.e(this, "Unable to use reflection to retrieve AudioState fields", e);
- }
- }
-
- @Override
- public void onBringToForeground(Phone phone, boolean showDialpad) {
- InCallServiceImpl.this.onBringToForeground(showDialpad);
- }
-
- @Override
- public void onCallAdded(Phone phone, Call call) {
- InCallServiceImpl.this.onCallAdded(call);
- }
-
- @Override
- public void onCallRemoved(Phone phone, Call call) {
- InCallServiceImpl.this.onCallRemoved(call);
- }
- };
-
- private Phone mPhone;
-
- @Override
- public void onPhoneCreated(Phone phone) {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- return;
- }
- mPhone = phone;
- mPhone.addListener(mPhoneListener);
- }
-
- @Override
- public void onPhoneDestroyed(Phone phone) {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- return;
- }
- mPhone.removeListener(mPhoneListener);
- mPhone = null;
- }
-
- /*
- * setMuted and setAudioRoute are final in InCallService so compat methods are
- * used to perform the needed branching logic based on sdk version
- */
- public void setMutedCompat(boolean state) {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- super.setMuted(state);
- return;
- }
- mPhone.setMuted(state);
- }
-
- public void setAudioRouteCompat(int route) {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) {
- super.setAudioRoute(route);
- return;
- }
- mPhone.setAudioRoute(route);
- }
}
diff --git a/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java b/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java
index 44b035f..9c108b8 100644
--- a/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java
+++ b/InCallUI/src/com/android/incallui/InCallUIMaterialColorMapUtils.java
@@ -6,6 +6,7 @@
import com.android.contacts.common.util.MaterialColorMapUtils;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
+import com.android.dialer.R;
public class InCallUIMaterialColorMapUtils extends MaterialColorMapUtils {
private final TypedArray sPrimaryColors;
@@ -14,10 +15,8 @@
public InCallUIMaterialColorMapUtils(Resources resources) {
super(resources);
- sPrimaryColors = resources.obtainTypedArray(
- com.android.incallui.R.array.background_colors);
- sSecondaryColors = resources.obtainTypedArray(
- com.android.incallui.R.array.background_colors_dark);
+ sPrimaryColors = resources.obtainTypedArray(R.array.background_colors);
+ sSecondaryColors = resources.obtainTypedArray(R.array.background_colors_dark);
mResources = resources;
}
@@ -53,4 +52,4 @@
final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark);
return new MaterialPalette(primaryColor, secondaryColor);
}
-}
\ No newline at end of file
+}
diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java b/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
index 76f8c09..99e6d51 100644
--- a/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
+++ b/InCallUI/src/com/android/incallui/InCallVideoCallCallback.java
@@ -55,10 +55,8 @@
boolean wasVideoCall = VideoUtils.isVideoCall(previousVideoState);
boolean isVideoCall = VideoUtils.isVideoCall(newVideoState);
- // Check for upgrades to video and downgrades to audio.
- if (wasVideoCall && !isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().downgradeToAudio(mCall);
- } else if (previousVideoState != newVideoState) {
+ // Check for upgrades to video.
+ if (!wasVideoCall && isVideoCall && previousVideoState != newVideoState) {
InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoRequest(mCall,
newVideoState);
}
@@ -93,21 +91,8 @@
Call.SessionModificationState.REQUEST_FAILED);
}
}
- InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoFail(status, mCall);
- } else if (requestedProfile != null && responseProfile != null) {
- boolean modifySucceeded = requestedProfile.getVideoState() ==
- responseProfile.getVideoState();
- boolean isVideoCall = VideoUtils.isVideoCall(responseProfile.getVideoState());
- if (modifySucceeded && isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoSuccess(mCall);
- } else if (!modifySucceeded && isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().upgradeToVideoFail(status, mCall);
- } else if (modifySucceeded && !isVideoCall) {
- InCallVideoCallCallbackNotifier.getInstance().downgradeToAudio(mCall);
- }
- } else {
- Log.d(this, "onSessionModifyResponseReceived request and response Profiles are null");
}
+
// Finally clear the outstanding request.
mCall.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
}
diff --git a/InCallUI/src/com/android/incallui/InCallVideoCallCallbackNotifier.java b/InCallUI/src/com/android/incallui/InCallVideoCallCallbackNotifier.java
index dfb645b..bb75292 100644
--- a/InCallUI/src/com/android/incallui/InCallVideoCallCallbackNotifier.java
+++ b/InCallUI/src/com/android/incallui/InCallVideoCallCallbackNotifier.java
@@ -135,39 +135,6 @@
}
/**
- * Inform listeners of a successful response to a video request for a call.
- *
- * @param call The call.
- */
- public void upgradeToVideoSuccess(Call call) {
- for (SessionModificationListener listener : mSessionModificationListeners) {
- listener.onUpgradeToVideoSuccess(call);
- }
- }
-
- /**
- * Inform listeners of an unsuccessful response to a video request for a call.
- *
- * @param call The call.
- */
- public void upgradeToVideoFail(int status, Call call) {
- for (SessionModificationListener listener : mSessionModificationListeners) {
- listener.onUpgradeToVideoFail(status, call);
- }
- }
-
- /**
- * Inform listeners of a downgrade to audio.
- *
- * @param call The call.
- */
- public void downgradeToAudio(Call call) {
- for (SessionModificationListener listener : mSessionModificationListeners) {
- listener.onDowngradeToAudio(call);
- }
- }
-
- /**
* Inform listeners of a call session event.
*
* @param event The call session event.
@@ -240,41 +207,16 @@
}
/**
- * Listener interface for any class that wants to be notified of upgrade to video and downgrade
- * to audio session modification requests.
+ * Listener interface for any class that wants to be notified of upgrade to video request.
*/
public interface SessionModificationListener {
/**
* Called when a peer request is received to upgrade an audio-only call to a video call.
*
* @param call The call the request was received for.
- * @param videoState The video state that the request wants to upgrade to.
+ * @param videoState The requested video state.
*/
public void onUpgradeToVideoRequest(Call call, int videoState);
-
- /**
- * Called when a request to a peer to upgrade an audio-only call to a video call is
- * successful.
- *
- * @param call The call the request was successful for.
- */
- public void onUpgradeToVideoSuccess(Call call);
-
- /**
- * Called when a request to a peer to upgrade an audio-only call to a video call is
- * NOT successful. This can be if the peer chooses rejects the the video call, or if the
- * peer does not support video calling, or if there is some error in sending the request.
- *
- * @param call The call the request was successful for.
- */
- public void onUpgradeToVideoFail(int status, Call call);
-
- /**
- * Called when a call has been downgraded to audio-only.
- *
- * @param call The call which was downgraded to audio-only.
- */
- public void onDowngradeToAudio(Call call);
}
/**
diff --git a/InCallUI/src/com/android/incallui/PostCharDialogFragment.java b/InCallUI/src/com/android/incallui/PostCharDialogFragment.java
index 400e8d7..6f904ad 100644
--- a/InCallUI/src/com/android/incallui/PostCharDialogFragment.java
+++ b/InCallUI/src/com/android/incallui/PostCharDialogFragment.java
@@ -23,6 +23,8 @@
import android.os.Bundle;
import android.view.WindowManager;
+import com.android.dialer.R;
+
/**
* Pop up an alert dialog with OK and Cancel buttons to allow user to Accept or Reject the WAIT
* inserted as part of the Dial string.
diff --git a/InCallUI/src/com/android/incallui/ProximitySensor.java b/InCallUI/src/com/android/incallui/ProximitySensor.java
index 733a67d..3c9fd93 100644
--- a/InCallUI/src/com/android/incallui/ProximitySensor.java
+++ b/InCallUI/src/com/android/incallui/ProximitySensor.java
@@ -23,9 +23,9 @@
import android.hardware.display.DisplayManager;
import android.hardware.display.DisplayManager.DisplayListener;
import android.os.PowerManager;
+import android.telecom.CallAudioState;
import android.view.Display;
-import com.android.dialer.compat.CallAudioStateCompat;
import com.android.incallui.AudioModeProvider.AudioModeListener;
import com.android.incallui.InCallPresenter.InCallState;
import com.android.incallui.InCallPresenter.InCallStateListener;
@@ -228,9 +228,9 @@
// turn proximity sensor off and turn screen on immediately if
// we are using a headset, the keyboard is open, or the device
// is being held in a horizontal position.
- boolean screenOnImmediately = (CallAudioStateCompat.ROUTE_WIRED_HEADSET == audioMode
- || CallAudioStateCompat.ROUTE_SPEAKER == audioMode
- || CallAudioStateCompat.ROUTE_BLUETOOTH == audioMode
+ boolean screenOnImmediately = (CallAudioState.ROUTE_WIRED_HEADSET == audioMode
+ || CallAudioState.ROUTE_SPEAKER == audioMode
+ || CallAudioState.ROUTE_BLUETOOTH == audioMode
|| mIsHardKeyboardOpen);
// We do not keep the screen off when the user is outside in-call screen and we are
@@ -254,7 +254,7 @@
.add("offhook", mIsPhoneOffhook ? 1 : 0)
.add("hor", horizontal ? 1 : 0)
.add("ui", mUiShowing ? 1 : 0)
- .add("aud", CallAudioStateCompat.audioRouteToString(audioMode))
+ .add("aud", CallAudioState.audioRouteToString(audioMode))
.toString());
if (mIsPhoneOffhook && !screenOnImmediately) {
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
index 6c00164..1a4ec09 100644
--- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java
+++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
@@ -50,6 +50,7 @@
import com.android.contacts.common.testing.NeededForTesting;
import com.android.contacts.common.util.BitmapUtil;
import com.android.contacts.common.util.ContactDisplayUtils;
+import com.android.dialer.R;
import com.android.incallui.Call.State;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
import com.android.incallui.ContactInfoCache.ContactInfoCacheCallback;
@@ -520,17 +521,16 @@
}
private static int getWorkStringFromPersonalString(int resId) {
- switch(resId) {
- case R.string.notification_ongoing_call:
- return R.string.notification_ongoing_work_call;
- case R.string.notification_ongoing_call_wifi:
- return R.string.notification_ongoing_work_call_wifi;
- case R.string.notification_incoming_call_wifi:
- return R.string.notification_incoming_work_call_wifi;
- case R.string.notification_incoming_call:
- return R.string.notification_incoming_work_call;
- default:
- return resId;
+ if (resId == R.string.notification_ongoing_call) {
+ return R.string.notification_ongoing_work_call;
+ } else if (resId == R.string.notification_ongoing_call_wifi) {
+ return R.string.notification_ongoing_work_call_wifi;
+ } else if (resId == R.string.notification_incoming_call_wifi) {
+ return R.string.notification_incoming_work_call_wifi;
+ } else if (resId == R.string.notification_incoming_call) {
+ return R.string.notification_incoming_work_call;
+ } else {
+ return resId;
}
}
diff --git a/InCallUI/src/com/android/incallui/TelecomAdapter.java b/InCallUI/src/com/android/incallui/TelecomAdapter.java
index 0fc2e28..f172270 100644
--- a/InCallUI/src/com/android/incallui/TelecomAdapter.java
+++ b/InCallUI/src/com/android/incallui/TelecomAdapter.java
@@ -24,9 +24,6 @@
import android.telecom.InCallService;
import android.telecom.PhoneAccountHandle;
-import com.android.incallui.compat.telecom.DetailsCompat;
-import com.android.incallui.compat.telecom.InCallServiceCompat;
-
import java.util.List;
final class TelecomAdapter implements InCallServiceListener {
@@ -108,7 +105,7 @@
void mute(boolean shouldMute) {
if (mInCallService != null) {
- InCallServiceCompat.setMuted(mInCallService, shouldMute);
+ mInCallService.setMuted(shouldMute);
} else {
Log.e(this, "error mute, mInCallService is null");
}
@@ -116,7 +113,7 @@
void setAudioRoute(int route) {
if (mInCallService != null) {
- InCallServiceCompat.setAudioRoute(mInCallService, route);
+ mInCallService.setAudioRoute(route);
} else {
Log.e(this, "error setAudioRoute, mInCallService is null");
}
@@ -138,8 +135,7 @@
if (!conferenceable.isEmpty()) {
call.conference(conferenceable.get(0));
} else {
- if (DetailsCompat.can(call.getDetails(),
- android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE)) {
+ if (call.getDetails().can(android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE)) {
call.mergeConference();
}
}
@@ -151,8 +147,7 @@
void swap(String callId) {
android.telecom.Call call = getTelecomCallById(callId);
if (call != null) {
- if (DetailsCompat.can(call.getDetails(),
- android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE)) {
+ if (call.getDetails().can(android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE)) {
call.swapConference();
}
} else {
@@ -222,7 +217,10 @@
}
}
- boolean canAddCall(Call call) {
- return InCallServiceCompat.canAddCall(mInCallService, call);
+ boolean canAddCall() {
+ if (mInCallService != null) {
+ return mInCallService.canAddCall();
+ }
+ return false;
}
}
diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java
index 2c06303..cb8c644 100644
--- a/InCallUI/src/com/android/incallui/VideoCallFragment.java
+++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java
@@ -31,6 +31,7 @@
import android.widget.FrameLayout;
import android.widget.ImageView;
+import com.android.dialer.R;
import com.android.phone.common.animation.AnimUtils;
import com.google.common.base.Objects;
@@ -371,9 +372,10 @@
mWidth = width;
mHeight = height;
- if (mSavedSurfaceTexture != null) {
+ if (width != DIMENSIONS_NOT_SET && height != DIMENSIONS_NOT_SET
+ && mSavedSurfaceTexture != null) {
Log.d(this, "setSurfaceDimensions, mSavedSurfaceTexture is NOT equal to null.");
- createSurface(width, height);
+ mSavedSurfaceTexture.setDefaultBufferSize(width, height);
}
}
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index ebdf820..9a33d80 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -33,13 +33,13 @@
import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.compat.CompatUtils;
+import com.android.dialer.R;
import com.android.incallui.InCallPresenter.InCallDetailsListener;
import com.android.incallui.InCallPresenter.InCallOrientationListener;
import com.android.incallui.InCallPresenter.InCallStateListener;
import com.android.incallui.InCallPresenter.IncomingCallListener;
import com.android.incallui.InCallVideoCallCallbackNotifier.SurfaceChangeListener;
import com.android.incallui.InCallVideoCallCallbackNotifier.VideoEventListener;
-import com.android.incallui.compat.telecom.VideoProfileCompat;
import java.util.Objects;
@@ -68,7 +68,6 @@
public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi> implements
IncomingCallListener, InCallOrientationListener, InCallStateListener,
InCallDetailsListener, SurfaceChangeListener, VideoEventListener,
- InCallVideoCallCallbackNotifier.SessionModificationListener,
InCallPresenter.InCallEventListener {
public static final String TAG = "VideoCallPresenter";
@@ -241,7 +240,6 @@
// Register for surface and video events from {@link InCallVideoCallListener}s.
InCallVideoCallCallbackNotifier.getInstance().addSurfaceChangeListener(this);
InCallVideoCallCallbackNotifier.getInstance().addVideoEventListener(this);
- InCallVideoCallCallbackNotifier.getInstance().addSessionModificationListener(this);
mCurrentVideoState = VideoProfile.STATE_AUDIO_ONLY;
mCurrentCallState = Call.State.INVALID;
}
@@ -268,7 +266,6 @@
InCallVideoCallCallbackNotifier.getInstance().removeSurfaceChangeListener(this);
InCallVideoCallCallbackNotifier.getInstance().removeVideoEventListener(this);
- InCallVideoCallCallbackNotifier.getInstance().removeSessionModificationListener(this);
}
/**
@@ -488,8 +485,8 @@
Log.d(this, "checkForVideoStateChange: isVideoCall= " + isVideoCall
+ " hasVideoStateChanged=" + hasVideoStateChanged + " isVideoMode="
+ isVideoMode() + " previousVideoState: " +
- VideoProfileCompat.videoStateToString(mCurrentVideoState) + " newVideoState: "
- + VideoProfileCompat.videoStateToString(call.getVideoState()));
+ VideoProfile.videoStateToString(mCurrentVideoState) + " newVideoState: "
+ + VideoProfile.videoStateToString(call.getVideoState()));
if (!hasVideoStateChanged) {
return;
@@ -659,8 +656,8 @@
}
private static boolean isCameraRequired(int videoState) {
- return VideoProfileCompat.isBidirectional(videoState) ||
- VideoProfileCompat.isTransmissionEnabled(videoState);
+ return VideoProfile.isBidirectional(videoState) ||
+ VideoProfile.isTransmissionEnabled(videoState);
}
private boolean isCameraRequired() {
@@ -761,7 +758,7 @@
if (showIncomingVideo || showOutgoingVideo) {
ui.showVideoViews(showOutgoingVideo, showIncomingVideo);
- if (VideoProfileCompat.isReceptionEnabled(videoState)) {
+ if (VideoProfile.isReceptionEnabled(videoState)) {
loadProfilePhotoAsync();
}
} else {
@@ -769,7 +766,7 @@
}
InCallPresenter.getInstance().enableScreenTimeout(
- VideoProfileCompat.isAudioOnly(videoState));
+ VideoProfile.isAudioOnly(videoState));
}
/**
@@ -786,10 +783,10 @@
return false;
}
- boolean isPaused = VideoProfileCompat.isPaused(videoState);
+ boolean isPaused = VideoProfile.isPaused(videoState);
boolean isCallActive = callState == Call.State.ACTIVE;
- return !isPaused && isCallActive && VideoProfileCompat.isReceptionEnabled(videoState);
+ return !isPaused && isCallActive && VideoProfile.isReceptionEnabled(videoState);
}
/**
@@ -805,7 +802,7 @@
return false;
}
- return VideoProfileCompat.isTransmissionEnabled(videoState);
+ return VideoProfile.isTransmissionEnabled(videoState);
}
/**
@@ -992,57 +989,6 @@
}
/**
- * Handles an incoming upgrade to video request.
- *
- * @param call The call the request was received for.
- * @param videoState The video state that the request wants to upgrade to.
- */
- @Override
- public void onUpgradeToVideoRequest(Call call, int videoState) {
- Log.d(this, "onUpgradeToVideoRequest call = " + call + " new video state = " + videoState);
- if (mPrimaryCall == null || !Call.areSame(mPrimaryCall, call)) {
- Log.w(this, "UpgradeToVideoRequest received for non-primary call");
- }
-
- if (call == null) {
- return;
- }
-
- call.setRequestedVideoState(videoState);
- }
-
- @Override
- public void onUpgradeToVideoSuccess(Call call) {
- Log.d(this, "onUpgradeToVideoSuccess call=" + call);
- if (mPrimaryCall == null || !Call.areSame(mPrimaryCall, call)) {
- Log.w(this, "UpgradeToVideoSuccess received for non-primary call");
- }
-
- if (call == null) {
- return;
- }
- }
-
- @Override
- public void onUpgradeToVideoFail(int status, Call call) {
- Log.d(this, "onUpgradeToVideoFail call=" + call);
- if (mPrimaryCall == null || !Call.areSame(mPrimaryCall, call)) {
- Log.w(this, "UpgradeToVideoFail received for non-primary call");
- }
-
- if (call == null) {
- return;
- }
- }
-
- @Override
- public void onDowngradeToAudio(Call call) {
- call.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
- // exit video mode
- exitVideoMode();
- }
-
- /**
* Sets the preview surface size based on the current device orientation.
* See: {@link InCallOrientationEventListener#SCREEN_ORIENTATION_0},
* {@link InCallOrientationEventListener#SCREEN_ORIENTATION_90},
@@ -1232,8 +1178,8 @@
}
private static int toCameraDirection(int videoState) {
- return VideoProfileCompat.isTransmissionEnabled(videoState) &&
- !VideoProfileCompat.isBidirectional(videoState)
+ return VideoProfile.isTransmissionEnabled(videoState) &&
+ !VideoProfile.isBidirectional(videoState)
? Call.VideoSettings.CAMERA_DIRECTION_BACK_FACING
: Call.VideoSettings.CAMERA_DIRECTION_FRONT_FACING;
}
diff --git a/InCallUI/src/com/android/incallui/VideoPauseController.java b/InCallUI/src/com/android/incallui/VideoPauseController.java
index 070448e..a529d20 100644
--- a/InCallUI/src/com/android/incallui/VideoPauseController.java
+++ b/InCallUI/src/com/android/incallui/VideoPauseController.java
@@ -27,8 +27,7 @@
* This class is responsible for generating video pause/resume requests when the InCall UI is sent
* to the background and subsequently brought back to the foreground.
*/
-class VideoPauseController implements InCallStateListener, IncomingCallListener,
- SessionModificationListener {
+class VideoPauseController implements InCallStateListener, IncomingCallListener {
private static final String TAG = "VideoPauseController";
/**
@@ -105,7 +104,6 @@
mInCallPresenter = Preconditions.checkNotNull(inCallPresenter);
mInCallPresenter.addListener(this);
mInCallPresenter.addIncomingCallListener(this);
- InCallVideoCallCallbackNotifier.getInstance().addSessionModificationListener(this);
}
/**
@@ -114,7 +112,6 @@
*/
public void tearDown() {
log("tearDown...");
- InCallVideoCallCallbackNotifier.getInstance().removeSessionModificationListener(this);
mInCallPresenter.removeListener(this);
mInCallPresenter.removeIncomingCallListener(this);
clear();
@@ -260,46 +257,6 @@
}
/**
- * Handles requests to upgrade to video.
- *
- * @param call The call the request was received for.
- * @param videoState The video state that the request wants to upgrade to.
- */
- @Override
- public void onUpgradeToVideoRequest(Call call, int videoState) {
- // Not used.
- }
-
- /**
- * Handles successful upgrades to video.
- * @param call The call the request was successful for.
- */
- @Override
- public void onUpgradeToVideoSuccess(Call call) {
- // Not used.
- }
-
- /**
- * Handles a failure to upgrade a call to video.
- *
- * @param status The failure status.
- * @param call The call the request was successful for.
- */
- @Override
- public void onUpgradeToVideoFail(int status, Call call) {
- // TODO (ims-vt) Automatically bring in call ui to foreground.
- }
-
- /**
- * Handles a downgrade of a call to audio-only.
- *
- * @param call The call which was downgraded to audio-only.
- */
- @Override
- public void onDowngradeToAudio(Call call) {
- }
-
- /**
* Called when UI is brought to the foreground. Sends a session modification request to resume
* the outgoing video.
*/
diff --git a/InCallUI/src/com/android/incallui/VideoUtils.java b/InCallUI/src/com/android/incallui/VideoUtils.java
index 7e0926b..8641d60 100644
--- a/InCallUI/src/com/android/incallui/VideoUtils.java
+++ b/InCallUI/src/com/android/incallui/VideoUtils.java
@@ -19,7 +19,6 @@
import android.telecom.VideoProfile;
import com.android.contacts.common.compat.CompatUtils;
-import com.android.incallui.compat.telecom.VideoProfileCompat;
import com.google.common.base.Preconditions;
@@ -34,8 +33,8 @@
return false;
}
- return VideoProfileCompat.isTransmissionEnabled(videoState)
- || VideoProfileCompat.isReceptionEnabled(videoState);
+ return VideoProfile.isTransmissionEnabled(videoState)
+ || VideoProfile.isReceptionEnabled(videoState);
}
public static boolean isBidirectionalVideoCall(Call call) {
@@ -43,7 +42,7 @@
return false;
}
- return VideoProfileCompat.isBidirectional(call.getVideoState());
+ return VideoProfile.isBidirectional(call.getVideoState());
}
public static boolean isIncomingVideoCall(Call call) {
@@ -72,7 +71,7 @@
return true;
}
- return call != null && VideoProfileCompat.isAudioOnly(call.getVideoState());
+ return call != null && VideoProfile.isAudioOnly(call.getVideoState());
}
// TODO (ims-vt) Check if special handling is needed for CONF calls.
@@ -82,7 +81,7 @@
public static VideoProfile makeVideoPauseProfile(Call call) {
Preconditions.checkNotNull(call);
- Preconditions.checkState(!VideoProfileCompat.isAudioOnly(call.getVideoState()));
+ Preconditions.checkState(!VideoProfile.isAudioOnly(call.getVideoState()));
return new VideoProfile(getPausedVideoState(call.getVideoState()));
}
diff --git a/InCallUI/src/com/android/incallui/compat/telecom/DetailsCompat.java b/InCallUI/src/com/android/incallui/compat/telecom/DetailsCompat.java
deleted file mode 100644
index b9f82a9..0000000
--- a/InCallUI/src/com/android/incallui/compat/telecom/DetailsCompat.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-package com.android.incallui.compat.telecom;
-
-import android.os.Build;
-import android.os.Bundle;
-import android.telecom.Call.Details;
-
-import com.android.contacts.common.compat.CompatUtils;
-import com.android.incallui.Log;
-
-/**
- * Compatibility class for {@link Details}
- */
-public class DetailsCompat {
-
- /**
- * Constant formerly in L as PhoneCapabilities#ADD_CALL. It was transferred to
- * {@link Details#CAPABILITY_UNUSED_1} and hidden
- */
- public static final int CAPABILITY_UNUSED_1 = 0x00000010;
-
- /**
- * Returns the intent extras from the given {@link Details}
- * For Sdk version L and earlier, this will return {@link Details#getExtras()}
- *
- * @param details The details whose intent extras should be returned
- * @return The given details' intent extras
- */
- public static Bundle getIntentExtras(Details details) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return details.getIntentExtras();
- }
- return details.getExtras();
- }
-
- /**
- * Compatibility method to check whether the supplied properties includes the
- * specified property.
- *
- * @param details The details whose properties should be checked.
- * @param property The property to check properties for.
- * @return Whether the specified property is supported.
- */
- public static boolean hasProperty(Details details, int property) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return details.hasProperty(property);
- }
- return (details.getCallProperties() & property) != 0;
- }
-
- /**
- * Compatibility method to check whether the capabilities of the given {@code Details}
- * supports the specified capability.
- *
- * @param details The details whose capabilities should be checked.
- * @param capability The capability to check capabilities for.
- * @return Whether the specified capability is supported.
- */
- public static boolean can(Details details, int capability) {
- if (CompatUtils.isLollipopMr1Compatible()) {
- return details.can(capability);
- }
- return (details.getCallCapabilities() & capability) != 0;
- }
-
- /**
- * Render a set of capability bits ({@code CAPABILITY_*}) as a human readable string.
- *
- * @param capabilities A capability bit field.
- * @return A human readable string representation.
- */
- public static String capabilitiesToString(int capabilities) {
- if (CompatUtils.isLollipopMr1Compatible()) {
- return Details.capabilitiesToString(capabilities);
- }
- return capabilitiesToStringLollipop(capabilities);
- }
-
- /*
- * Use reflection to call PhoneCapabilities.toString. InCallUI code is only run on Google
- * Experience phones, so we will be the system Dialer and the method will exist
- */
- private static String capabilitiesToStringLollipop(int capabilities) {
- try {
- return (String) Class.forName("android.telecom.PhoneCapabilities")
- .getMethod("toString", Integer.TYPE)
- .invoke(null, capabilities);
- } catch (ReflectiveOperationException e) {
- Log.e(DetailsCompat.class, "Unable to use reflection to call "
- + "android.telecom.PhoneCapabilities.toString(int)", e);
- return String.valueOf(capabilities);
- }
- }
-}
diff --git a/InCallUI/src/com/android/incallui/compat/telecom/InCallServiceCompat.java b/InCallUI/src/com/android/incallui/compat/telecom/InCallServiceCompat.java
deleted file mode 100644
index 0a3cb26..0000000
--- a/InCallUI/src/com/android/incallui/compat/telecom/InCallServiceCompat.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-package com.android.incallui.compat.telecom;
-
-import android.support.annotation.Nullable;
-import android.telecom.InCallService;
-
-import com.android.contacts.common.compat.CompatUtils;
-import com.android.incallui.Call;
-import com.android.incallui.InCallServiceImpl;
-
-/**
- * Compatibility class for {@link android.telecom.InCallService}
- */
-public class InCallServiceCompat {
-
- /**
- * Sets the microphone mute state. When this request is honored, there
- * will be a change to the {@link android.telecom.CallAudioState}.
- *
- * Note: Noop for Sdk versions less than M where inCallService is not of type
- * {@link InCallServiceImpl}
- *
- * @param inCallService the {@link InCallService} to act on
- * @param shouldMute {@code true} if the microphone should be muted; {@code false} otherwise.
- */
- public static void setMuted(@Nullable InCallService inCallService, boolean shouldMute) {
- if (inCallService == null) {
- return;
- }
- if (CompatUtils.isMarshmallowCompatible()) {
- inCallService.setMuted(shouldMute);
- return;
- }
-
- if (inCallService instanceof InCallServiceImpl) {
- ((InCallServiceImpl) inCallService).setMutedCompat(shouldMute);
- }
- }
-
- /**
- * Sets the audio route (speaker, bluetooth, etc...). When this request is honored, there will
- * be change to the {@link android.telecom.CallAudioState}.
- *
- * Note: Noop for Sdk versions less than M where inCallService is not of type
- * {@link InCallServiceImpl}
- *
- * @param inCallService the {@link InCallService} to act on
- * @param route The audio route to use.
- */
- public static void setAudioRoute(@Nullable InCallService inCallService, int route) {
- if (inCallService == null) {
- return;
- }
- if (CompatUtils.isMarshmallowCompatible()) {
- inCallService.setAudioRoute(route);
- return;
- }
-
- if (inCallService instanceof InCallServiceImpl) {
- ((InCallServiceImpl) inCallService).setAudioRouteCompat(route);
- }
- }
-
- /**
- * Returns if the device can support additional calls.
- *
- * @param inCallService the {@link InCallService} to act on
- * @param call a {@link Call} to use if needed due to compatibility reasons
- * @return Whether the phone supports adding more calls, defaulting to true if inCallService
- * is null
- */
- public static boolean canAddCall(@Nullable InCallService inCallService, Call call) {
- if (inCallService == null) {
- return true;
- }
-
- if (CompatUtils.isMarshmallowCompatible()) {
- // Default to true if we are not connected to telecom.
- return inCallService.canAddCall();
- }
- return call.can(DetailsCompat.CAPABILITY_UNUSED_1);
- }
-}
diff --git a/InCallUI/src/com/android/incallui/compat/telecom/VideoProfileCompat.java b/InCallUI/src/com/android/incallui/compat/telecom/VideoProfileCompat.java
deleted file mode 100644
index 6e81bd7..0000000
--- a/InCallUI/src/com/android/incallui/compat/telecom/VideoProfileCompat.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-package com.android.incallui.compat.telecom;
-
-import android.telecom.VideoProfile;
-
-import com.android.contacts.common.compat.CompatUtils;
-
-/**
- * Compatibility class for {@link android.telecom.VideoProfile}
- */
-public class VideoProfileCompat {
-
- /**
- * Generates a string representation of a video state.
- *
- * @param videoState The video state.
- * @return String representation of the video state.
- */
- public static String videoStateToString(int videoState) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return VideoProfile.videoStateToString(videoState);
- }
- return videoStateToStringLollipop(videoState);
- }
-
- /**
- * Copied from {@link android.telecom.VideoProfile#videoStateToString}
- */
- private static String videoStateToStringLollipop(int videoState) {
- StringBuilder sb = new StringBuilder();
- sb.append("Audio");
- if (isAudioOnly(videoState)) {
- sb.append(" Only");
- } else {
- if (isTransmissionEnabled(videoState)) {
- sb.append(" Tx");
- }
- if (isReceptionEnabled(videoState)) {
- sb.append(" Rx");
- }
- if (isPaused(videoState)) {
- sb.append(" Pause");
- }
- }
- return sb.toString();
- }
-
- /**
- * Indicates whether the video state is audio only.
- *
- * @param videoState The video state.
- * @return {@code true} if the video state is audio only, {@code false} otherwise.
- */
- public static boolean isAudioOnly(int videoState) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return VideoProfile.isAudioOnly(videoState);
- }
- return !hasState(videoState, VideoProfile.STATE_TX_ENABLED)
- && !hasState(videoState, VideoProfile.STATE_RX_ENABLED);
- }
-
- /**
- * Indicates whether the video state has video transmission enabled.
- *
- * @param videoState The video state.
- * @return {@code true} if video transmission is enabled, {@code false} otherwise.
- */
- public static boolean isTransmissionEnabled(int videoState) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return VideoProfile.isTransmissionEnabled(videoState);
- }
- return hasState(videoState, VideoProfile.STATE_TX_ENABLED);
- }
-
- /**
- * Indicates whether the video state has video reception enabled.
- *
- * @param videoState The video state.
- * @return {@code true} if video reception is enabled, {@code false} otherwise.
- */
- public static boolean isReceptionEnabled(int videoState) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return VideoProfile.isReceptionEnabled(videoState);
- }
- return hasState(videoState, VideoProfile.STATE_RX_ENABLED);
- }
-
- /**
- * Indicates whether the video state is paused.
- *
- * @param videoState The video state.
- * @return {@code true} if the video is paused, {@code false} otherwise.
- */
- public static boolean isPaused(int videoState) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return VideoProfile.isPaused(videoState);
- }
- return hasState(videoState, VideoProfile.STATE_PAUSED);
- }
-
- /**
- * Copied from {@link android.telecom.VideoProfile}
- *
- * Determines if a specified state is set in a videoState bit-mask.
- *
- * @param videoState The video state bit-mask.
- * @param state The state to check.
- * @return {@code true} if the state is set.
- */
- private static boolean hasState(int videoState, int state) {
- return (videoState & state) == state;
- }
-
- /**
- * Indicates whether the video state is bi-directional.
- *
- * @param videoState The video state.
- * @return {@code True} if the video is bi-directional, {@code false} otherwise.
- */
- public static boolean isBidirectional(int videoState) {
- if (CompatUtils.isMarshmallowCompatible()) {
- return VideoProfile.isBidirectional(videoState);
- }
- return hasState(videoState, VideoProfile.STATE_BIDIRECTIONAL);
- }
-}
diff --git a/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java b/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
index 6ef4e25..d930a92 100644
--- a/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
+++ b/InCallUI/src/com/android/incallui/ringtone/InCallTonePlayer.java
@@ -23,9 +23,9 @@
import android.media.ToneGenerator;
import android.provider.MediaStore.Audio;
import android.support.annotation.Nullable;
+import android.telecom.CallAudioState;
import com.android.contacts.common.testing.NeededForTesting;
-import com.android.dialer.compat.CallAudioStateCompat;
import com.android.incallui.AudioModeProvider;
import com.android.incallui.Log;
import com.android.incallui.async.PausableExecutor;
@@ -110,7 +110,7 @@
}
private int getPlaybackStream() {
- if (mAudioModeProvider.getAudioMode() == CallAudioStateCompat.ROUTE_BLUETOOTH) {
+ if (mAudioModeProvider.getAudioMode() == CallAudioState.ROUTE_BLUETOOTH) {
// TODO (maxwelb): b/26932998 play through bluetooth
// return AudioManager.STREAM_BLUETOOTH_SCO;
}
diff --git a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
index 2320027..efeb4b7 100644
--- a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
+++ b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java
@@ -50,7 +50,7 @@
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import android.view.accessibility.AccessibilityNodeProvider;
-import com.android.incallui.R;
+import com.android.dialer.R;
import java.util.ArrayList;
import java.util.List;
diff --git a/build-app.gradle b/build-app.gradle
new file mode 100644
index 0000000..ef019ed
--- /dev/null
+++ b/build-app.gradle
@@ -0,0 +1,34 @@
+apply plugin: 'com.android.application'
+
+android {
+ defaultConfig {
+ minSdkVersion 23
+ targetSdkVersion 23
+ multiDexEnabled true
+ }
+
+ sourceSets.main {
+ java.srcDirs = ['src', 'src-pre-N', 'InCallUI/src']
+ manifest.srcFile 'AndroidManifest.xml'
+ res.srcDirs = ['res']
+ }
+}
+
+dependencies {
+ compile 'com.android.support:support-v4:23.1.+'
+ compile 'com.android.support:support-v13:23.1.+'
+ compile 'com.android.support:appcompat-v7:23.1.+'
+ compile 'com.android.support:cardview-v7:23.1.+'
+ compile 'com.android.support:design:23.1.+'
+ compile 'com.android.support:recyclerview-v7:23.1.+'
+
+ compile project(':android-common')
+ compile project(':guava')
+ compile project(':libphonenumber')
+ compile project(':jsr305')
+ compile project(':vcard')
+
+ compile project(':ContactsCommon')
+ compile project(':InCallUI')
+ compile project(':PhoneCommon')
+}
diff --git a/build-library.gradle b/build-library.gradle
new file mode 100644
index 0000000..f96ff2b
--- /dev/null
+++ b/build-library.gradle
@@ -0,0 +1,34 @@
+apply plugin: 'com.android.library'
+
+android {
+ defaultConfig {
+ minSdkVersion 23
+ targetSdkVersion 23
+ multiDexEnabled true
+ }
+
+ sourceSets.main {
+ java.srcDirs = ['src', 'src-pre-N', 'InCallUI/src']
+ manifest.srcFile 'AndroidManifest.xml'
+ res.srcDirs = ['res']
+ }
+}
+
+dependencies {
+ compile 'com.android.support:support-v4:23.1.+'
+ compile 'com.android.support:support-v13:23.1.+'
+ compile 'com.android.support:appcompat-v7:23.1.+'
+ compile 'com.android.support:cardview-v7:23.1.+'
+ compile 'com.android.support:design:23.1.+'
+ compile 'com.android.support:recyclerview-v7:23.1.+'
+
+ compile project(':android-common')
+ compile project(':guava')
+ compile project(':libphonenumber')
+ compile project(':jsr305')
+ compile project(':vcard')
+
+ compile project(':ContactsCommon')
+ compile project(':InCallUI')
+ compile project(':PhoneCommon')
+}
diff --git a/res/drawable/ic_voicemail_seek_handle.xml b/res/drawable/ic_voicemail_seek_handle.xml
index a6f02be..d3fc95a 100644
--- a/res/drawable/ic_voicemail_seek_handle.xml
+++ b/res/drawable/ic_voicemail_seek_handle.xml
@@ -16,6 +16,5 @@
-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/ic_handle"
- android:autoMirrored="true"
android:tint="@color/actionbar_background_color" >
</bitmap>
\ No newline at end of file
diff --git a/res/layout-land/dialpad_fragment.xml b/res/layout-land/dialpad_fragment.xml
index 680c2d7..70a38ae 100644
--- a/res/layout-land/dialpad_fragment.xml
+++ b/res/layout-land/dialpad_fragment.xml
@@ -28,7 +28,7 @@
android:id="@+id/spacer"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"
+ android:layout_weight="4"
android:background="#00000000" />
<!-- Dialpad shadow -->
@@ -40,7 +40,7 @@
<RelativeLayout
android:layout_height="match_parent"
android:layout_width="0dp"
- android:layout_weight="1">
+ android:layout_weight="6">
<include layout="@layout/dialpad_view"
android:layout_height="match_parent"
@@ -60,7 +60,7 @@
<!-- Margin bottom and alignParentBottom don't work well together, so use a Space instead. -->
<Space android:id="@+id/dialpad_floating_action_button_margin_bottom"
android:layout_width="match_parent"
- android:layout_height="8dp"
+ android:layout_height="@dimen/floating_action_button_margin_bottom"
android:layout_alignParentBottom="true" />
<FrameLayout
diff --git a/res/mipmap-hdpi/ic_launcher_phone.png b/res/mipmap-hdpi/ic_launcher_phone.png
index 5a3dff1..15c4142 100644
--- a/res/mipmap-hdpi/ic_launcher_phone.png
+++ b/res/mipmap-hdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_phone.png b/res/mipmap-mdpi/ic_launcher_phone.png
index 9ea0d8c..3088f75 100644
--- a/res/mipmap-mdpi/ic_launcher_phone.png
+++ b/res/mipmap-mdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_phone.png b/res/mipmap-xhdpi/ic_launcher_phone.png
index e97836c..e87de01 100644
--- a/res/mipmap-xhdpi/ic_launcher_phone.png
+++ b/res/mipmap-xhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_launcher_phone.png b/res/mipmap-xxhdpi/ic_launcher_phone.png
index 1594e4e..b866b79 100644
--- a/res/mipmap-xxhdpi/ic_launcher_phone.png
+++ b/res/mipmap-xxhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/mipmap-xxxhdpi/ic_launcher_phone.png b/res/mipmap-xxxhdpi/ic_launcher_phone.png
index 8c92ac1..26f51f1 100644
--- a/res/mipmap-xxxhdpi/ic_launcher_phone.png
+++ b/res/mipmap-xxxhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 6239ccb..605d168 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Skakel die Kontakte-toestemmings aan om jou kontakte te deursoek."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Skakel die foontoestemming aan om \'n oproep te maak."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Foonprogram het nie toestemming om stelselinstellings te stel nie."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Geblokkeer"</string>
</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index c670cf8..24d98f7 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"የእርስዎን እውቂያዎች ለመከታተል የእውቂያዎች ፍቃዶችን ያብሩ።"</string>
<string name="permission_place_call" msgid="2101287782615887547">"ስልክ ለመደወል የስልክ ፍቃዱን ያብሩ።"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"የስልክ መተግበሪያ ወደ የስርዓት ቅንብሮች የመጻፍ ፍቃድ የለውም።"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"የታገዱ"</string>
</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index ea2e3ae..7818d64 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -260,6 +260,5 @@
<string name="permission_no_search" msgid="84152933267902056">"للبحث عن جهات الاتصال، عليك تشغيل أذونات جهات الاتصال."</string>
<string name="permission_place_call" msgid="2101287782615887547">"لإجراء مكالمة، شغِّل إذن الهاتف."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ليس لدى تطبيق الهاتف إذن لتعديل إعدادات النظام."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"تم الحظر"</string>
</resources>
diff --git a/res/values-az-rAZ/strings.xml b/res/values-az-rAZ/strings.xml
index c8a0614..2a9585d 100644
--- a/res/values-az-rAZ/strings.xml
+++ b/res/values-az-rAZ/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kontaktlarınızı axtarmaq üçün, Kontakt icazələrini aktiv edin."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Zəng etmək üçün, Telefon icazəsini aktivləşdirin."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefon tətbiqinin sistem ayarlarına yazmaq icazəsi yoxdur."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloklanıb"</string>
</resources>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index 6ab3d62..18b71fe 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -254,6 +254,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Da biste pretražili kontakte, uključite dozvole za Kontakte."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Da biste uputili poziv, uključite dozvolu za Telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikacija Telefon nema dozvolu za upisivanje u sistemska podešavanja."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokiran"</string>
</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index f71054c..fae94b6 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"За да търсите в контактите си, включете разрешенията за тях."</string>
<string name="permission_place_call" msgid="2101287782615887547">"За да извършите обаждане, включете разрешението за Телефон."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Приложението Телефон няма разрешение да записва в системните настройки."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Блокирано"</string>
</resources>
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn-rBD/strings.xml
index 2cad4fb..14392c9 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn-rBD/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"আপনার পরিচিতিগুলি অনুসন্ধান করতে, পরিচিতির অনুমতিগুলি চালু করুন।"</string>
<string name="permission_place_call" msgid="2101287782615887547">"একটি কল করতে, ফোনের অনুমতি চালু করুন।"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ফোনের অ্যাপ্লিকেশানকে সিস্টেম সেটিংসে লেখার অনুমতি দেওয়া হয়নি।"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"অবরুদ্ধ"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 8e51721..3bb063a 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Per cercar els teus contactes, activa els permisos de Contactes."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Activa el permís Telèfon per fer una trucada."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"L\'aplicació Telèfon no té permís per escriure a la configuració del sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloquejat"</string>
</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index f50c837..a5df442 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Chcete-li vyhledat kontakty, zapněte oprávnění Kontakty."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Chcete-li uskutečnit hovor, aktivujte oprávnění Telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikace Telefon nemá oprávnění provádět zápis do nastavení systému."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokováno"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index fecded9..02766ac 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Hvis du vil søge i dine kontaktpersoner, skal du slå tilladelserne Kontaktpersoner til."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Slå tilladelsen Telefon til for at foretage et opkald."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Opkaldsappen har ikke tilladelse til at ændre systemindstillinger."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokeret"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 3226bab..122ac90 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Aktiviere die Berechtigungen \"Kontakte\", um deine Kontakte zu suchen."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Aktiviere die Berechtigung \"Telefon\", um einen Anruf zu tätigen."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Die App \"Telefon\" ist nicht berechtigt, die Systemeinstellungen zu überschreiben."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blockiert"</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index f823f85..6803f31 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Για να κάνετε αναζήτηση στις επαφές σας, ενεργοποιήστε τις άδειες \"Επαφές\"."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Για να πραγματοποιήσετε μια κλήση, ενεργοποιήστε την άδεια τηλεφώνου."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Η εφαρμογή \"Τηλέφωνο\" δεν έχει άδεια εγγραφής στις ρυθμίσεις συστήματος."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Αποκλεισμένος"</string>
</resources>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 4209d8d..de730ec 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"To search your contacts, turn on the Contacts permissions."</string>
<string name="permission_place_call" msgid="2101287782615887547">"To place a call, turn on the Phone permission."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Phone app does not have permission to write to system settings."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blocked"</string>
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 4209d8d..de730ec 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"To search your contacts, turn on the Contacts permissions."</string>
<string name="permission_place_call" msgid="2101287782615887547">"To place a call, turn on the Phone permission."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Phone app does not have permission to write to system settings."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blocked"</string>
</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 4209d8d..de730ec 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"To search your contacts, turn on the Contacts permissions."</string>
<string name="permission_place_call" msgid="2101287782615887547">"To place a call, turn on the Phone permission."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Phone app does not have permission to write to system settings."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blocked"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 7f180ba..a63537e 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Para buscar contactos, activa el permiso Contactos."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Para realizar una llamada, activa el permiso Teléfono."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"La aplicación de teléfono no tiene permiso para modificar la configuración del sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqueado"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index d606349..7c0e493 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Para poder buscar tus contactos, activa los permisos de contactos."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Para hacer una llamada, activa el permiso de la aplicación Teléfono."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"La aplicación Teléfono no tiene permiso para editar los ajustes del sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqueado"</string>
</resources>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index 0222d47..3b3b964 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kontaktide otsimiseks lülitage sisse kontaktiload."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Helistamiseks lülitage sisse telefoniluba."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefonirakendusel pole luba süsteemiseadetesse kirjutada."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokeeritud"</string>
</resources>
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml
index 8164d44..eb5c370 100644
--- a/res/values-eu-rES/strings.xml
+++ b/res/values-eu-rES/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kontaktuak bilatzeko, aktibatu kontaktuak atzitzeko baimenak."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Deiak egiteko, aktibatu Telefonoa erabiltzeko baimena."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefonoaren aplikazioak ez du baimenik sistemaren ezarpenetan ezer idazteko."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokeatuta"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index c0522ca..e897c8e 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"برای جستجوی مخاطبینتان، مجوزهای مخاطبین را روشن کنید."</string>
<string name="permission_place_call" msgid="2101287782615887547">"برای برقراری تماس، مجوز «تلفن» را روشن کنید."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"برنامه تلفن اجازه نوشتن در تنظیمات سیستم را ندارد."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"مسدودشده"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 37e31ac..cd55b8d 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Jos haluat hakea kontaktejasi, ota käyttöön kontaktien käyttöoikeudet."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Jos haluat soittaa puheluja, ota Puhelin-käyttöoikeus käyttöön."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Puhelinsovelluksella ei ole oikeutta muokata järjestelmän asetuksia."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Estetyt"</string>
</resources>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index b862c25..b73b20b 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Pour rechercher vos contacts et les lieux à proximité, activez les autorisations Contacts."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Pour faire un appel, activez l\'autorisation Téléphone."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"L\'application Téléphone n\'est pas autorisée à modifier les paramètres du système."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqué"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 4b1d2c2..014fc90 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Pour rechercher vos contacts, activez l\'autorisation Contacts."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Pour passer un appel, activez l\'autorisation Téléphone."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"L\'application Téléphone n\'est pas autorisée à modifier les paramètres du système."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqué"</string>
</resources>
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl-rES/strings.xml
index 39bd4f4..60f666d 100644
--- a/res/values-gl-rES/strings.xml
+++ b/res/values-gl-rES/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Para buscar os teus contactos, activa os permisos de Contactos."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Para facer unha chamada, activa o permiso de Teléfono."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"A aplicación Teléfono non ten permiso para modificar a configuración do sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqueado"</string>
</resources>
diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu-rIN/strings.xml
index 9fbd586..165a644 100644
--- a/res/values-gu-rIN/strings.xml
+++ b/res/values-gu-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"તમારા સંપર્કો શોધવા માટે, સંપર્કોની પરવાનગીઓ ચાલુ કરો."</string>
<string name="permission_place_call" msgid="2101287782615887547">"કૉલ કરવા માટે, ફોન પરવાનગી ચાલુ કરો."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ફોન એપ્લિકેશનને સિસ્ટમ સેટિંગ્સ પર લખવાની પરવાનગી નથી."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"અવરોધિત"</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index cd23316..bfa2408 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"अपने संपर्कों की खोज करने के लिए, संपर्क अनुमतियों को चालू करें."</string>
<string name="permission_place_call" msgid="2101287782615887547">"कॉल करने के लिए, फ़ोन अनुमति चालू करें."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"फ़ोन ऐप को सिस्टम सेटिंग में लिखने की अनुमति नहीं है."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"अवरोधित"</string>
</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index ee7cb7b..1347e10 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -254,6 +254,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Da biste pretraživali kontakte, uključite dopuštenja za kontakte."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Da biste nazvali nekog, uključite dopuštenje za telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikacija Telefon nema dopuštenje za pisanje u postavke sustava."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokirano"</string>
</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 9432ddf..74950b0 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"A névjegyek kereséséhez adja meg a Névjegyek engedélyeket."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Hívásindításhoz kapcsolja be a Telefon engedélyt."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"A Telefon alkalmazásnak nincs engedélye szerkeszteni a rendszerbeállításokat."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Letiltva"</string>
</resources>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index 3cfb29f..1c80954 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Կոնտակտները որոնելու համար միացրեք Կոնտակտների թույլտվությունները:"</string>
<string name="permission_place_call" msgid="2101287782615887547">"Զանգ կատարելու համար միացրեք Հեռախոսի թույլտվությունը:"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Հեռախոս հավելվածը համակարգի կարգավորումները գրելու թույլտվություն չունի:"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Արգելափակված"</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index e3f2453..16d1936 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Untuk menelusuri kontak, aktifkan izin Kontak."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Untuk melakukan panggilan, aktifkan izin Telepon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikasi telepon tidak memiliki izin untuk menulis ke setelan sistem."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Diblokir"</string>
</resources>
diff --git a/res/values-is-rIS/strings.xml b/res/values-is-rIS/strings.xml
index 6658b2a..9d57ed3 100644
--- a/res/values-is-rIS/strings.xml
+++ b/res/values-is-rIS/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kveiktu á heimildunum fyrir tengiliði til að leita að tengiliðum."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Kveiktu á heimild símaforritsins til að hringja símtal."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Símaforritið hefur ekki heimild til að breyta kerfisstillingum."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Á bannlista"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 7be7771..95dc3b8 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Per cercare nei tuoi contatti, attiva le autorizzazioni Contatti."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Per fare una chiamata, attiva l\'autorizzazione sul telefono."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"L\'app Telefono non dispone dell\'autorizzazione per modificare le impostazioni di sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloccato"</string>
</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index d6a6d78..0bcfd99 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"כדי לחפש באנשי הקשר, הפעל את ההרשאה \'אנשי קשר\'."</string>
<string name="permission_place_call" msgid="2101287782615887547">"כדי להתקשר, הפעל את ההרשאה \'טלפון\'."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"לאפליקציית הטלפון אין הרשאה לכתוב בהגדרות המערכת."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"חסום"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index bf5245c..4f9d492 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"連絡先を検索するには、連絡先権限をONにしてください。"</string>
<string name="permission_place_call" msgid="2101287782615887547">"電話をかけるには、電話権限をONにしてください。"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"電話アプリにはシステム設定への書き込み権限がありません。"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ブロック済み"</string>
</resources>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index c655d69..9d1f61b 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"თქვენი კონტაქტების მოსაძებნად ჩართეთ კონტაქტების ნებართვები."</string>
<string name="permission_place_call" msgid="2101287782615887547">"ზარის განსახორციელებლად, ჩართეთ ტელეფონის ნებართვა."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ტელეფონის აპს სისტემის პარამეტრებში ჩაწერის ნებართვა არ აქვს."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"დაბლოკილი"</string>
</resources>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index 29e63de..fa0abc0 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Контактілерді іздеу үшін \"Контактілер\" рұқсаттарын қосыңыз."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Қоңырауды шалу үшін \"Телефон\" рұқсатын қосыңыз."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Телефон қолданбасында жүйелік параметрлерге жазуға рұқсат жоқ."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Бөгелген"</string>
</resources>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index 3ca9aa2..34d163b 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"ដើម្បីស្វែងរកទំនាក់ទំនងរបស់អ្នក សូមបើកសិទ្ធិអនុញ្ញាតទំនាក់ទំនង។"</string>
<string name="permission_place_call" msgid="2101287782615887547">"ដើម្បីធ្វើការហៅទូរស័ព្ទ សូមបើកសិទ្ធិអនុញ្ញាតកម្មវិធីហៅទូរស័ព្ទ។"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"កម្មវិធីទូរស័ព្ទមិនមានសិទ្ធិអនុញ្ញាតដើម្បីសរសេរការកំណត់ប្រព័ន្ធទេ។"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"បានរារាំង"</string>
</resources>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml
index 80275fd..123e0fe 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn-rIN/strings.xml
@@ -253,6 +253,5 @@
<string name="permission_no_search" msgid="84152933267902056">"ನಿಮ್ಮ ಸಂಪರ್ಕಗಳನ್ನು ಹುಡುಕಲು, ಸಂಪರ್ಕಗಳ ಅನುಮತಿಗಳನ್ನು ಆನ್ ಮಾಡಿ."</string>
<string name="permission_place_call" msgid="2101287782615887547">"ಕರೆ ಮಾಡಲು, ಫೋನ್ ಅನುಮತಿಯನ್ನು ಆನ್ ಮಾಡಿ."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ಸಿಸ್ಟಂ ಸೆಟ್ಟಿಂಗ್ಗಳಿಗೆ ಬರೆಯಲು ಫೋನ್ ಅಪ್ಲಿಕೇಶನ್ ಅನುಮತಿಯನ್ನು ಹೊಂದಿಲ್ಲ."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 2778080..8e1ee7e 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"주소록을 검색하려면 주소록 권한을 사용하도록 설정하세요."</string>
<string name="permission_place_call" msgid="2101287782615887547">"전화를 걸려면 전화 권한을 사용하도록 설정하세요."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"전화 앱은 시스템 설정에 쓸 수 있는 권한이 없습니다."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"차단됨"</string>
</resources>
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky-rKG/strings.xml
index 0badcfd..5f527ee 100644
--- a/res/values-ky-rKG/strings.xml
+++ b/res/values-ky-rKG/strings.xml
@@ -276,6 +276,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Байланыштарыңызды издөө үчүн, Байланыштарга уруксатты күйгүзүңүз."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Чалуу үчүн, \"Телефон\" колдонмосуна уруксат бериңиз."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Телефон колдонмосунун Тутум жөндөөлөрүнө жазууга уруксаты жок."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Бөгөттөлгөн"</string>
</resources>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index 7167e39..731e5a4 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"ເພື່ອຄົ້ນຫາລາຍາຊື່ຂອງທ່ານ, ໃຫ້ເປີດການອະນຸຍາດລາຍຊື່."</string>
<string name="permission_place_call" msgid="2101287782615887547">"ເພື່ອເຮັດການໂທ, ເປີດການອະນຸຍາດໂທລະສັບ."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ແອັບໂທລະສັບບໍ່ມີການອະນຸຍາດໃຫ້ຂຽນໃສ່ການຕັ້ງຄ່າລະບົບ."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ບລັອກໄວ້ແລ້ວ"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 818d503..f2ddc7c 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kad galėtumėte ieškoti kontaktų, įjunkite Kontaktų leidimus."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Jei norite paskambinti, įjunkite Telefono programos leidimą."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefono programa neturi leidimo keisti sistemos nustatymų."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Užblokuota"</string>
</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 84164c4..de73d54 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -254,6 +254,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Lai meklētu savas kontaktpersonas, ieslēdziet atļauju Kontaktpersonas."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Lai veiktu zvanu, ieslēdziet atļauju Tālrunis."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Tālruņa lietotnei nav atļaujas rakstīt sistēmas iestatījumos."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloķēts"</string>
</resources>
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk-rMK/strings.xml
index 58c753a..f2de9cf 100644
--- a/res/values-mk-rMK/strings.xml
+++ b/res/values-mk-rMK/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"За да ги пребарувате контактите, вклучете ги дозволите за контакти."</string>
<string name="permission_place_call" msgid="2101287782615887547">"За да воспоставите повик, вклучете ја дозволата за телефон."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Апликацијата на телефонот нема дозвола да пишува во поставките на системот."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Блокиран"</string>
</resources>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index 8e3ec3b..a054639 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"നിങ്ങളുടെ കോൺടാക്റ്റുകൾ തിരയുന്നതിന് കോൺടാക്റ്റുകൾക്കുള്ള അനുമതികൾ ഓണാക്കുക."</string>
<string name="permission_place_call" msgid="2101287782615887547">"കോൾ വിളിക്കുന്നതിന്, \'ഫോൺ\' അനുമതി ഓണാക്കുക."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"സിസ്റ്റം ക്രമീകരണത്തിലേക്ക് എഴുതാൻ ഫോൺ ആപ്പിന് അനുമതിയില്ല."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ബ്ലോക്കുചെയ്തു"</string>
</resources>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index acf0b72..b411d52 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Харилцагчаа хайхын тулд, Харилцагчийн жагсаалтын зөвшөөрлийг идэвхжүүлнэ үү."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Залгахын тулд Утасны зөвшөөрлийг идэвхжүүлнэ үү."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Гар утасны апп-д системийн тохиргоо бичих зөвшөөрөл алга."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Блоклосон"</string>
</resources>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml
index c60c94f..76689c0 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"आपले संपर्क शोधण्यासाठी, संपर्क परवानग्या चालू करा."</string>
<string name="permission_place_call" msgid="2101287782615887547">"कॉल करण्यासाठी, फोन परवानगी चालू करा."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"फोन अॅपला सिस्टीम सेटिंग्जमध्ये लिहिण्याची परवानगी नाही."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"अवरोधित केले"</string>
</resources>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index 2dd6f05..90aa3be 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Untuk mencari kenalan anda, hidupkan kebenaran Kenalan."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Untuk membuat panggilan, hidupkan kebenaran Telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Apl telefon tiada kebenaran untuk menulis ke tetapan sistem."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Disekat"</string>
</resources>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index eaf1fa9..31c3d79 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"သင့်အဆက်အသွယ်များကို ရှာဖွေရန်၊ အဆက်အသွယ်ခွင့်ပြုချက်များကို ဖွင့်ပါ။"</string>
<string name="permission_place_call" msgid="2101287782615887547">"ဖုန်းခေါ်ဆိုရန်၊ ဖုန်းခွင့်ပြုချက်ကိုဖွင့်ပါ။"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ဖုန်း အက်ပ်ဆီတွင် စနစ် ဆက်တင်များသို့ ရေးသားခွင့် မရှိပါ။"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ပိတ်ဆို့ထားသည်"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 336cc23..312af33 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"For å søke i kontaktene dine, slå på tillatelser for Kontakter."</string>
<string name="permission_place_call" msgid="2101287782615887547">"For å ringe, slå på Telefon-tillatelsen."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefonappen har ikke tillatelse til å skrive til systeminnstillinger."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokkert"</string>
</resources>
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne-rNP/strings.xml
index 6d32dad..0c10cd8 100644
--- a/res/values-ne-rNP/strings.xml
+++ b/res/values-ne-rNP/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"तपाईँको सम्पर्कहरू खोज गर्न सम्पर्क अनुमतिहरू सक्रिय गर्नुहोस्।"</string>
<string name="permission_place_call" msgid="2101287782615887547">"कल गर्न फोन अनुमति सक्रिय गर्नुहोस्।"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"प्रणाली सेटिङहरूमा लेख्न फोन अनुप्रयोगसँग अनुमति छैन।"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"रोकियो"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 7099b31..f1e8f17 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Als je naar contacten wilt zoeken, schakel je de contacttoestemming in."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Als je iemand wilt bellen, schakel je de machtiging voor Telefoon in."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefoon-app heeft geen toestemming om systeeminstellingen te schrijven."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Geblokkeerd"</string>
</resources>
diff --git a/res/values-pa-rIN/strings.xml b/res/values-pa-rIN/strings.xml
index 5f42d3d..da62a50 100644
--- a/res/values-pa-rIN/strings.xml
+++ b/res/values-pa-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"ਆਪਣੇ ਸੰਪਰਕਾਂ ਦੀ ਖੋਜ ਕਰਨ ਲਈ,, ਸੰਪਰਕ ਅਨੁਮਤੀਆਂ ਨੂੰ ਚਾਲੂ ਕਰੋ।"</string>
<string name="permission_place_call" msgid="2101287782615887547">"ਕਾਲ ਕਰਨ ਲਈ, ਫ਼ੋਨ ਅਨੁਮਤੀ ਚਾਲੂ ਕਰੋ।"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"ਫ਼ੋਨ ਐਪ ਦੇ ਕੋਲ ਸਿਸਟਮ ਸੈਟਿੰਗਜ਼ ਵਿੱਚ ਲਿੱਖਣ ਦੀ ਅਨੁਮਤੀ ਨਹੀਂ ਹੁੰਦੀ ਹੈ।"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ਬਲੌਕ ਕੀਤਾ ਗਿਆ"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 8e5486b..a65d7e7 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Aby wyszukać kontakty, włącz uprawnienia Kontakty."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Aby nawiązać połączenie, włącz uprawnienie Telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikacja Telefon nie ma uprawnień do zapisu w ustawieniach systemowych."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Zablokowany"</string>
</resources>
diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml
index 5ba85b0..110620c 100644
--- a/res/values-pt-rBR/strings.xml
+++ b/res/values-pt-rBR/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Para pesquisar seus contatos, ative as permissões para \"Contatos\"."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Para fazer uma chamada, ative a permissão para o app Telefone."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"O app Telefone não tem permissão para gravar nas configurações do sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqueado"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 779229f..0e6d1a2 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Para pesquisar os seus contactos, ative as autorizações Contactos."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Para efetuar uma chamada, ative a autorização Telemóvel."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"A aplicação Telefone não tem autorização para gravar nas definições do sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqueado"</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 5ba85b0..110620c 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Para pesquisar seus contatos, ative as permissões para \"Contatos\"."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Para fazer uma chamada, ative a permissão para o app Telefone."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"O app Telefone não tem permissão para gravar nas configurações do sistema."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloqueado"</string>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index d5c9474..3713cfa 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -71,8 +71,8 @@
<string name="voicemail_status_action_configure" msgid="8671796489912239589">"Configurați"</string>
<string name="voicemail_status_action_call_server" msgid="1824816252288551794">"Apel. mesag. vocală"</string>
<string name="call_log_item_count_and_date" msgid="7641933305703520787">"(<xliff:g id="COUNT">%1$d</xliff:g>) <xliff:g id="DATE">%2$s</xliff:g>"</string>
- <string name="sms_disambig_title" msgid="5846266399240630846">"Selectaţi numărul"</string>
- <string name="call_disambig_title" msgid="4392886850104795739">"Selectaţi numărul"</string>
+ <string name="sms_disambig_title" msgid="5846266399240630846">"Selectați numărul"</string>
+ <string name="call_disambig_title" msgid="4392886850104795739">"Selectați numărul"</string>
<string name="make_primary" msgid="5829291915305113983">"Rețineți această alegere"</string>
<string name="description_search_button" msgid="3660807558587384889">"căutare"</string>
<string name="description_dial_button" msgid="1274091017188142646">"apelați"</string>
@@ -98,10 +98,10 @@
<string name="callDetailTitle" msgid="5340227785196217938">"Detaliile apelului"</string>
<string name="toast_call_detail_error" msgid="6947041258280380832">"Nu sunt disponibile detalii"</string>
<string name="dialer_useDtmfDialpad" msgid="1707548397435075040">"Tastatura tactilă cu sunet"</string>
- <string name="dialer_returnToInCallScreen" msgid="3719386377550913067">"Reveniţi la apelul în curs"</string>
+ <string name="dialer_returnToInCallScreen" msgid="3719386377550913067">"Reveniți la apelul în curs"</string>
<string name="dialer_addAnotherCall" msgid="4205688819890074468">"Adăugați un apel"</string>
<string name="type_incoming" msgid="6502076603836088532">"Apel de intrare"</string>
- <string name="type_outgoing" msgid="343108709599392641">"Apel de ieşire"</string>
+ <string name="type_outgoing" msgid="343108709599392641">"Apel de ieșire"</string>
<string name="type_missed" msgid="2720502601640509542">"Apel nepreluat"</string>
<string name="type_incoming_video" msgid="82323391702796181">"Apel video primit"</string>
<string name="type_outgoing_video" msgid="2858140021680755266">"Apel video efectuat"</string>
@@ -254,6 +254,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Pentru a căuta în persoanele de contact, activați permisiunea Agendă."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Pentru a apela, activați permisiunea Telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplicația Telefon nu are permisiunea să modifice setările de sistem."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blocat"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 1b233f7..4034b65 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Для поиска контактов включите разрешение \"Контакты\"."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Чтобы позвонить, предоставьте приложению разрешение \"Телефон\"."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"У приложения \"Телефон\" нет разрешения на изменение системных настроек."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Заблокирован"</string>
</resources>
diff --git a/res/values-si-rLK/strings.xml b/res/values-si-rLK/strings.xml
index 28ab4e4..d64dbdb 100644
--- a/res/values-si-rLK/strings.xml
+++ b/res/values-si-rLK/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"ඔබේ සම්බන්ධතා සෙවීමට, සම්බන්ධතා අවසර ක්රියාත්මක කරන්න."</string>
<string name="permission_place_call" msgid="2101287782615887547">"ඇමතුමක් ලබා ගැනීමට, දුරකථන අවසරය ක්රියාත්මක කරන්න."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"දුරකථන යෙදුමට පද්ධති සැකසීම් වෙත ලිවීමට අවසර නැත."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"අවහිර කරන ලදි"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index d39c047..69f6a5f 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Ak chcete hľadať kontakty, zapnite povolenie Kontakty."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Ak chcete volať, zapnite povolenie Telefón."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefónna aplikácia nemá povolenie na zápis do nastavení systému."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Zablokované"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index a97d07e..2c371ee 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Če želite iskati po stikih, vklopite dovoljenje za stike."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Če želite klicati, vklopite dovoljenje za telefon."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikacija Telefon nima dovoljenja za pisanje v sistemske nastavitve."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blokirano"</string>
</resources>
diff --git a/res/values-sq-rAL/strings.xml b/res/values-sq-rAL/strings.xml
index ba72d62..e6f5f40 100644
--- a/res/values-sq-rAL/strings.xml
+++ b/res/values-sq-rAL/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Për të kërkuar kontaktet, aktivizo lejet e Kontakteve"</string>
<string name="permission_place_call" msgid="2101287782615887547">"Për të kryer një telefonatë, aktivizo lejen e Telefonit."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Aplikacionet e telefonit nuk kanë leje të shkruajnë në cilësimet e sistemit."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"I bllokuar"</string>
</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 7664695..06072ef 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -254,6 +254,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Да бисте претражили контакте, укључите дозволе за Контакте."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Да бисте упутили позив, укључите дозволу за Телефон."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Апликација Телефон нема дозволу за уписивање у системска подешавања."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Блокиран"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index bac5f93..5331127 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Aktivera behörigheter för Kontakter om du vill söka bland kontakterna."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Du måste aktivera behörigheten Telefon för att kunna ringa."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefonappen har inte skrivbehörighet i systeminställningarna."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Blockerad"</string>
</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index fae5da0..ba936c5 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Ili utafute anwani zako, washa ruhusa za Anwani."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Ili upige simu, washa ruhusa ya Simu."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Programu ya simu haina ruhusa ya kuandika kwenye mipangilio ya mfumo."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Imezuiwa"</string>
</resources>
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml
index 75038c2..8814a72 100644
--- a/res/values-ta-rIN/strings.xml
+++ b/res/values-ta-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"தொடர்புகளைத் தேட, தொடர்புகள் அனுமதிகளை இயக்கவும்."</string>
<string name="permission_place_call" msgid="2101287782615887547">"அழைக்க, ஃபோன் அனுமதியை இயக்கவும்."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"முறைமை அமைப்புகளில் எழுதுவதற்கான அனுமதி ஃபோன் பயன்பாட்டுக்கு இல்லை."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"தடுக்கப்பட்டது"</string>
</resources>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml
index d5fcd0e..f8550b6 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te-rIN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"మీ పరిచయాలను శోధించడానికి, పరిచయాల అనుమతులను ఆన్ చేయండి."</string>
<string name="permission_place_call" msgid="2101287782615887547">"కాల్ చేయడానికి, ఫోన్ అనుమతిని ఆన్ చేయండి."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"సిస్టమ్ సెట్టింగ్లకు వ్రాయడం కోసం ఫోన్ అనువర్తనానికి అనుమతి లేదు."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"బ్లాక్ అయ్యారు"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index de3c415..09d3ffb 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"หากต้องการค้นหารายชื่อติดต่อ ให้เปิดสิทธิ์เข้าถึงรายชื่อติดต่อ"</string>
<string name="permission_place_call" msgid="2101287782615887547">"หากต้องการโทรออก ให้เปิดสิทธิ์เข้าถึงโทรศัพท์"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"แอปโทรศัพท์ไม่ได้รับอนุญาตให้เขียนไปยังการตั้งค่าระบบ"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"ถูกบล็อก"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 04de7db..ef43809 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Upang hanapin ang iyong mga contact, i-on ang mga pahintulot sa Mga Contact."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Upang tumawag, i-on ang pahintulot ng Telepono."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Walang pahintulot ang app ng Telepono na mag-write sa mga setting ng system."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Naka-block"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index b2000cc..ee60fa3 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kişilerinizde arama yapmak için Kişiler izinlerini açın."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Telefon etmek için Telefon iznini açın."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefon uygulamasının sistem ayarlarına yazma izni yok."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Engellendi"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index d52729b..d680823 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -256,6 +256,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Щоб шукати контакти, увімкніть дозвіл \"Контакти\"."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Щоб зателефонувати, увімкніть дозвіл \"Телефон\"."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Додаток Телефон не має дозволу змінювати системні налаштування."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Заблоковано"</string>
</resources>
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur-rPK/strings.xml
index 6e5f8eb..363b16e 100644
--- a/res/values-ur-rPK/strings.xml
+++ b/res/values-ur-rPK/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"اپنے رابطوں کو تلاش کرنے کیلئے رابطوں کی اجازتیں آن کریں۔"</string>
<string name="permission_place_call" msgid="2101287782615887547">"کال کرنے کیلئے فون کی اجازت آن کریں۔"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"فون ایپ کے پاس سسٹم ترتیبات کو لکھنے کی اجازت نہیں ہے۔"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"مسدود کردہ"</string>
</resources>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index 7f241de..860ce80 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Kontaktlarni qidirish uchun “Kontaktlar” ruxsatnomasini yoqing."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Qo‘ng‘iroq qilish uchun “Telefon” ruxsatnomasini yoqing."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Telefon ilovasida tizim sozlamalarini o‘zgartirish uchun ruxsat yo‘q."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bloklangan"</string>
</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 6c4c7df..3448167 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Để tìm kiếm liên hệ của bạn, hãy bật quyền đối với Danh bạ."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Để thực hiện cuộc gọi, bật quyền đối với Điện thoại."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Ứng dụng Điện thoại không có quyền ghi vào cài đặt hệ thống."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Bị chặn"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 817bc70..4bd9d0a 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"要搜索您的联系人,请开启“通讯录”权限。"</string>
<string name="permission_place_call" msgid="2101287782615887547">"要拨打电话,请开启“电话”权限。"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"电话应用不具备写入系统设置的权限。"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"已屏蔽"</string>
</resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 79bad78..0a0022a 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"如要搜尋聯絡人,請開啟「通訊錄」權限。"</string>
<string name="permission_place_call" msgid="2101287782615887547">"如要撥打電話,請開放「手機」權限。"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"手機應用程式沒有系統設定的寫入權限。"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"已封鎖"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index d433d00..b5d3efb 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"如要搜尋您的聯絡人,請開啟「聯絡人」存取權限。"</string>
<string name="permission_place_call" msgid="2101287782615887547">"如要撥打電話,請開啟「電話」存取權限。"</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"電話應用程式的權限不足,無法寫入系統設定。"</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"已封鎖"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 9d48bfc..6b6bf56 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -252,6 +252,5 @@
<string name="permission_no_search" msgid="84152933267902056">"Ukuze useshe oxhumana nabo, vula izimvume zoxhumana nabo."</string>
<string name="permission_place_call" msgid="2101287782615887547">"Ukuze ubeke ikholi, vula imvume yefoni."</string>
<string name="toast_cannot_write_system_settings" msgid="5614246168296606709">"Uhlelo lokusebenza lefoni alinayo imvume yokubhalela kuzilungiselelo zesistimu."</string>
- <!-- no translation found for blocked_number_call_log_label (8912042441473014712) -->
- <skip />
+ <string name="blocked_number_call_log_label" msgid="8912042441473014712">"Kuvinjelwe"</string>
</resources>
diff --git a/res/xml/file_paths.xml b/res/xml/file_paths.xml
new file mode 100644
index 0000000..45caed2
--- /dev/null
+++ b/res/xml/file_paths.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+
+<paths xmlns:android="http://schemas.android.com/apk/res/android">
+ <!-- Offer access to files under Context.getCacheDir() -->
+ <cache-path name="my_cache" />
+</paths>
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java
index 56e29a9..e6a29fb 100644
--- a/src/com/android/dialer/CallDetailActivity.java
+++ b/src/com/android/dialer/CallDetailActivity.java
@@ -349,51 +349,45 @@
@Override
public boolean onMenuItemClick(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.call_detail_delete_menu_item:
- if (hasVoicemail()) {
- CallLogAsyncTaskUtil.deleteVoicemail(
- this, mVoicemailUri, mCallLogAsyncTaskListener);
- } else {
- final StringBuilder callIds = new StringBuilder();
- for (Uri callUri : getCallLogEntryUris()) {
- if (callIds.length() != 0) {
- callIds.append(",");
- }
- callIds.append(ContentUris.parseId(callUri));
+ if (item.getItemId() == R.id.call_detail_delete_menu_item) {
+ if (hasVoicemail()) {
+ CallLogAsyncTaskUtil.deleteVoicemail(
+ this, mVoicemailUri, mCallLogAsyncTaskListener);
+ } else {
+ final StringBuilder callIds = new StringBuilder();
+ for (Uri callUri : getCallLogEntryUris()) {
+ if (callIds.length() != 0) {
+ callIds.append(",");
}
- CallLogAsyncTaskUtil.deleteCalls(
- this, callIds.toString(), mCallLogAsyncTaskListener);
+ callIds.append(ContentUris.parseId(callUri));
}
- break;
+ CallLogAsyncTaskUtil.deleteCalls(
+ this, callIds.toString(), mCallLogAsyncTaskListener);
+ }
}
return true;
}
@Override
public void onClick(View view) {
- switch(view.getId()) {
- case R.id.call_detail_action_block:
- BlockNumberDialogFragment.show(
- mBlockedNumberId,
- mNumber,
- mDetails.countryIso,
- mDisplayNumber,
- R.id.call_detail,
- getFragmentManager(),
- this);
- break;
- case R.id.call_detail_action_copy:
- ClipboardUtils.copyText(mContext, null, mNumber, true);
- break;
- case R.id.call_detail_action_edit_before_call:
- Intent dialIntent = new Intent(Intent.ACTION_DIAL,
- CallUtil.getCallUri(getDialableNumber()));
- DialerUtils.startActivityWithErrorToast(mContext, dialIntent);
- break;
- default:
- Log.wtf(TAG, "Unexpected onClick event from " + view);
- break;
+ int resId = view.getId();
+ if (resId == R.id.call_detail_action_block) {
+ BlockNumberDialogFragment.show(
+ mBlockedNumberId,
+ mNumber,
+ mDetails.countryIso,
+ mDisplayNumber,
+ R.id.call_detail,
+ getFragmentManager(),
+ this);
+ } else if (resId == R.id.call_detail_action_copy) {
+ ClipboardUtils.copyText(mContext, null, mNumber, true);
+ } else if (resId == R.id.call_detail_action_edit_before_call) {
+ Intent dialIntent = new Intent(Intent.ACTION_DIAL,
+ CallUtil.getCallUri(getDialableNumber()));
+ DialerUtils.startActivityWithErrorToast(mContext, dialIntent);
+ } else {
+ Log.wtf(TAG, "Unexpected onClick event from " + view);
}
}
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 72753be..d507483 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -620,35 +620,30 @@
@Override
public void onClick(View view) {
- switch (view.getId()) {
- case R.id.floating_action_button:
- if (mListsFragment.getCurrentTabIndex()
- == ListsFragment.TAB_INDEX_ALL_CONTACTS && !mInRegularSearch) {
- DialerUtils.startActivityWithErrorToast(
- this,
- IntentUtil.getNewContactIntent(),
- R.string.add_contact_not_available);
- } else if (!mIsDialpadShown) {
- mInCallDialpadUp = false;
- showDialpadFragment(true);
- }
- break;
- case R.id.voice_search_button:
- try {
- startActivityForResult(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH),
- ACTIVITY_REQUEST_CODE_VOICE_SEARCH);
- } catch (ActivityNotFoundException e) {
- Toast.makeText(DialtactsActivity.this, R.string.voice_search_not_available,
- Toast.LENGTH_SHORT).show();
- }
- break;
- case R.id.dialtacts_options_menu_button:
- mOverflowMenu.show();
- break;
- default: {
- Log.wtf(TAG, "Unexpected onClick event from " + view);
- break;
+ int resId = view.getId();
+ if (resId == R.id.floating_action_button) {
+ if (mListsFragment.getCurrentTabIndex()
+ == ListsFragment.TAB_INDEX_ALL_CONTACTS && !mInRegularSearch) {
+ DialerUtils.startActivityWithErrorToast(
+ this,
+ IntentUtil.getNewContactIntent(),
+ R.string.add_contact_not_available);
+ } else if (!mIsDialpadShown) {
+ mInCallDialpadUp = false;
+ showDialpadFragment(true);
}
+ } else if (resId == R.id.voice_search_button) {
+ try {
+ startActivityForResult(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH),
+ ACTIVITY_REQUEST_CODE_VOICE_SEARCH);
+ } catch (ActivityNotFoundException e) {
+ Toast.makeText(DialtactsActivity.this, R.string.voice_search_not_available,
+ Toast.LENGTH_SHORT).show();
+ }
+ } else if (resId == R.id.dialtacts_options_menu_button) {
+ mOverflowMenu.show();
+ } else {
+ Log.wtf(TAG, "Unexpected onClick event from " + view);
}
}
@@ -658,41 +653,37 @@
return true;
}
- switch (item.getItemId()) {
- case R.id.menu_history:
- // Use explicit CallLogActivity intent instead of ACTION_VIEW +
- // CONTENT_TYPE, so that we always open our call log from our dialer
- final Intent intent = new Intent(this, CallLogActivity.class);
- startActivity(intent);
- break;
- case R.id.menu_add_contact:
- DialerUtils.startActivityWithErrorToast(
- this,
- IntentUtil.getNewContactIntent(),
- R.string.add_contact_not_available);
- break;
- case R.id.menu_import_export:
- // We hard-code the "contactsAreAvailable" argument because doing it properly would
- // involve querying a {@link ProviderStatusLoader}, which we don't want to do right
- // now in Dialtacts for (potential) performance reasons. Compare with how it is
- // done in {@link PeopleActivity}.
- if (mListsFragment.getCurrentTabIndex() == ListsFragment.TAB_INDEX_SPEED_DIAL) {
- ImportExportDialogFragment.show(getFragmentManager(), true,
- DialtactsActivity.class, ImportExportDialogFragment.EXPORT_MODE_FAVORITES);
- } else {
- ImportExportDialogFragment.show(getFragmentManager(), true,
- DialtactsActivity.class, ImportExportDialogFragment.EXPORT_MODE_DEFAULT);
- }
- Logger.logScreenView(ScreenEvent.IMPORT_EXPORT_CONTACTS, this);
- return true;
- case R.id.menu_clear_frequents:
- ClearFrequentsDialog.show(getFragmentManager());
- Logger.logScreenView(ScreenEvent.CLEAR_FREQUENTS, this);
- return true;
- case R.id.menu_call_settings:
- handleMenuSettings();
- Logger.logScreenView(ScreenEvent.SETTINGS, this);
- return true;
+ int resId = item.getItemId();
+ if (resId == R.id.menu_history) {// Use explicit CallLogActivity intent instead of ACTION_VIEW +
+ // CONTENT_TYPE, so that we always open our call log from our dialer
+ final Intent intent = new Intent(this, CallLogActivity.class);
+ startActivity(intent);
+ } else if (resId == R.id.menu_add_contact) {
+ DialerUtils.startActivityWithErrorToast(
+ this,
+ IntentUtil.getNewContactIntent(),
+ R.string.add_contact_not_available);
+ } else if (resId == R.id.menu_import_export) {// We hard-code the "contactsAreAvailable" argument because doing it properly would
+ // involve querying a {@link ProviderStatusLoader}, which we don't want to do right
+ // now in Dialtacts for (potential) performance reasons. Compare with how it is
+ // done in {@link PeopleActivity}.
+ if (mListsFragment.getCurrentTabIndex() == ListsFragment.TAB_INDEX_SPEED_DIAL) {
+ ImportExportDialogFragment.show(getFragmentManager(), true,
+ DialtactsActivity.class, ImportExportDialogFragment.EXPORT_MODE_FAVORITES);
+ } else {
+ ImportExportDialogFragment.show(getFragmentManager(), true,
+ DialtactsActivity.class, ImportExportDialogFragment.EXPORT_MODE_DEFAULT);
+ }
+ Logger.logScreenView(ScreenEvent.IMPORT_EXPORT_CONTACTS, this);
+ return true;
+ } else if (resId == R.id.menu_clear_frequents) {
+ ClearFrequentsDialog.show(getFragmentManager());
+ Logger.logScreenView(ScreenEvent.CLEAR_FREQUENTS, this);
+ return true;
+ } else if (resId == R.id.menu_call_settings) {
+ handleMenuSettings();
+ Logger.logScreenView(ScreenEvent.SETTINGS, this);
+ return true;
}
return false;
}
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java
index 243eda9..1823a5b 100644
--- a/src/com/android/dialer/calllog/CallLogActivity.java
+++ b/src/com/android/dialer/calllog/CallLogActivity.java
@@ -192,15 +192,14 @@
return true;
}
- switch (item.getItemId()) {
- case android.R.id.home:
- final Intent intent = new Intent(this, DialtactsActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(intent);
- return true;
- case R.id.delete_all:
- ClearCallLogDialog.show(getFragmentManager());
- return true;
+ if (item.getItemId() == android.R.id.home) {
+ final Intent intent = new Intent(this, DialtactsActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(intent);
+ return true;
+ } else if (item.getItemId() == R.id.delete_all) {
+ ClearCallLogDialog.show(getFragmentManager());
+ return true;
}
return super.onOptionsItemSelected(item);
}
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index cfc9375..1c27440 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -361,30 +361,30 @@
@Override
public boolean onMenuItemClick(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.context_menu_block_number:
- BlockNumberDialogFragment.show(
- blockId,
- number,
- countryIso,
- displayNumber,
- R.id.floating_action_button_container,
- ((Activity) mContext).getFragmentManager(),
- mFilteredNumberDialogCallback);
- return true;
- case R.id.context_menu_copy_to_clipboard:
- ClipboardUtils.copyText(mContext, null, number, true);
- return true;
- case R.id.context_menu_copy_transcript_to_clipboard:
- ClipboardUtils.copyText(mContext, null,
- phoneCallDetailsViews.voicemailTranscriptionView.getText(), true);
- return true;
- case R.id.context_menu_edit_before_call:
- final Intent intent = new Intent(
- Intent.ACTION_DIAL, CallUtil.getCallUri(number));
- intent.setClass(mContext, DialtactsActivity.class);
- DialerUtils.startActivityWithErrorToast(mContext, intent);
- return true;
+ int resId = item.getItemId();
+ if (resId == R.id.context_menu_block_number) {
+ BlockNumberDialogFragment.show(
+ blockId,
+ number,
+ countryIso,
+ displayNumber,
+ R.id.floating_action_button_container,
+ ((Activity) mContext).getFragmentManager(),
+ mFilteredNumberDialogCallback);
+ return true;
+ } else if (resId == R.id.context_menu_copy_to_clipboard) {
+ ClipboardUtils.copyText(mContext, null, number, true);
+ return true;
+ } else if (resId == R.id.context_menu_copy_transcript_to_clipboard) {
+ ClipboardUtils.copyText(mContext, null,
+ phoneCallDetailsViews.voicemailTranscriptionView.getText(), true);
+ return true;
+ } else if (resId == R.id.context_menu_edit_before_call) {
+ final Intent intent = new Intent(
+ Intent.ACTION_DIAL, CallUtil.getCallUri(number));
+ intent.setClass(mContext, DialtactsActivity.class);
+ DialerUtils.startActivityWithErrorToast(mContext, intent);
+ return true;
}
return false;
}
diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java
index 75e7ab7..a9c7651 100644
--- a/src/com/android/dialer/calllog/ContactInfoHelper.java
+++ b/src/com/android/dialer/calllog/ContactInfoHelper.java
@@ -164,8 +164,7 @@
Cursor phoneLookupCursor = null;
try {
- String[] projection = (isSip) ? PhoneQuery.SIP_PHONE_LOOKUP_PROJECTION
- : PhoneQuery.PHONE_LOOKUP_PROJECTION;
+ String[] projection = PhoneQuery.getPhoneLookupProjection(uri);
phoneLookupCursor = mContext.getContentResolver().query(uri, projection, null, null,
null);
} catch (NullPointerException e) {
diff --git a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
index db82295..af59686 100644
--- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
+++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
@@ -16,11 +16,6 @@
package com.android.dialer.calllog;
-import static android.Manifest.permission.READ_CALL_LOG;
-import static android.Manifest.permission.READ_CONTACTS;
-
-import com.android.contacts.common.ContactsUtils;
-import com.android.contacts.common.compat.TelephonyManagerCompat;
import com.google.common.collect.Maps;
import android.app.Notification;
@@ -33,11 +28,15 @@
import android.content.Intent;
import android.content.res.Resources;
import android.net.Uri;
+import android.support.annotation.Nullable;
+import android.support.v4.util.Pair;
import android.telecom.PhoneAccountHandle;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
+import com.android.contacts.common.ContactsUtils;
+import com.android.contacts.common.compat.TelephonyManagerCompat;
import com.android.contacts.common.util.ContactDisplayUtils;
import com.android.dialer.DialtactsActivity;
import com.android.dialer.R;
@@ -172,22 +171,7 @@
// TODO: Use the photo of contact if all calls are from the same person.
final int icon = android.R.drawable.stat_notify_voicemail;
- Uri ringtoneUri = null;
- int notificationDefaults = 0;
- if (callToNotify != null) {
- PhoneAccountHandle accountHandle = new PhoneAccountHandle(
- ComponentName.unflattenFromString(callToNotify.accountComponentName),
- callToNotify.accountId);
- ringtoneUri = TelephonyManagerCompat
- .getVoicemailRingtoneUri(getTelephonyManager(), accountHandle);
- if (ContactsUtils.FLAG_N_FEATURE) {
- notificationDefaults = TelephonyManagerCompat.isVoicemailVibrationEnabled(
- getTelephonyManager(), accountHandle)
- ? Notification.DEFAULT_VIBRATE : 0;
- } else {
- notificationDefaults = Notification.DEFAULT_ALL;
- }
- }
+ Pair<Uri, Integer> info = getNotificationInfo(callToNotify);
Notification.Builder notificationBuilder = new Notification.Builder(mContext)
.setSmallIcon(icon)
@@ -195,8 +179,8 @@
.setContentText(callers)
.setStyle(new Notification.BigTextStyle().bigText(transcription))
.setColor(resources.getColor(R.color.dialer_theme_color))
- .setSound(ringtoneUri)
- .setDefaults(notificationDefaults)
+ .setSound(info.first)
+ .setDefaults(info.second)
.setDeleteIntent(createMarkNewVoicemailsAsOldIntent())
.setAutoCancel(true);
@@ -221,6 +205,36 @@
notificationBuilder.build());
}
+ /**
+ * Determines which ringtone Uri and Notification defaults to use when updating the notification
+ * for the given call.
+ */
+ private Pair<Uri, Integer> getNotificationInfo(@Nullable NewCall callToNotify) {
+ if (callToNotify == null) {
+ return new Pair<>(null, 0);
+ }
+
+ if (callToNotify.accountComponentName == null || callToNotify.accountId == null) {
+ return new Pair<>(null, Notification.DEFAULT_ALL);
+ }
+
+ PhoneAccountHandle accountHandle = new PhoneAccountHandle(
+ ComponentName.unflattenFromString(callToNotify.accountComponentName),
+ callToNotify.accountId);
+ return new Pair<>(
+ TelephonyManagerCompat.getVoicemailRingtoneUri(
+ getTelephonyManager(), accountHandle),
+ getNotificationDefaults(accountHandle));
+ }
+
+ private int getNotificationDefaults(PhoneAccountHandle accountHandle) {
+ if (ContactsUtils.FLAG_N_FEATURE) {
+ return TelephonyManagerCompat.isVoicemailVibrationEnabled(getTelephonyManager(),
+ accountHandle) ? Notification.DEFAULT_VIBRATE : 0;
+ }
+ return Notification.DEFAULT_ALL;
+ }
+
/** Creates a pending intent that marks all new voicemails as old. */
private PendingIntent createMarkNewVoicemailsAsOldIntent() {
Intent intent = new Intent(mContext, CallLogNotificationsService.class);
diff --git a/src/com/android/dialer/calllog/PhoneQuery.java b/src/com/android/dialer/calllog/PhoneQuery.java
index 5261874..f1f14c6 100644
--- a/src/com/android/dialer/calllog/PhoneQuery.java
+++ b/src/com/android/dialer/calllog/PhoneQuery.java
@@ -16,10 +16,15 @@
package com.android.dialer.calllog;
+import android.net.Uri;
+import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.PhoneLookup;
+import com.android.contacts.common.compat.CompatUtils;
+import com.android.contacts.common.compat.PhoneLookupSdkCompat;
+import com.android.contacts.common.ContactsUtils;
+
/**
* The queries to look up the {@link ContactInfo} for a given number in the Call Log.
*/
@@ -27,10 +32,11 @@
/**
* Projection to look up the ContactInfo. Does not include DISPLAY_NAME_ALTERNATIVE as that
- * column isn't available in ContactsCommon.PhoneLookup
+ * column isn't available in ContactsCommon.PhoneLookup.
+ * We should always use this projection starting from NYC onward.
*/
- public static final String[] PHONE_LOOKUP_PROJECTION = new String[] {
- PhoneLookup._ID,
+ private static final String[] PHONE_LOOKUP_PROJECTION = new String[] {
+ PhoneLookupSdkCompat.CONTACT_ID,
PhoneLookup.DISPLAY_NAME,
PhoneLookup.TYPE,
PhoneLookup.LABEL,
@@ -42,21 +48,32 @@
};
/**
- * Similar to {@link PHONE_LOOKUP_PROJECTION}. Due to a bug in framework, the column name of
- * contact id in normal phonelookup query is _id, but that in sip phonelookup query is
- * contact_id.
+ * Similar to {@link PHONE_LOOKUP_PROJECTION}. In pre-N, contact id is stored in
+ * {@link PhoneLookup#_ID} in non-sip query.
*/
- public static final String[] SIP_PHONE_LOOKUP_PROJECTION = new String[] {
- Data.CONTACT_ID,
- PhoneLookup.DISPLAY_NAME,
- PhoneLookup.TYPE,
- PhoneLookup.LABEL,
- PhoneLookup.NUMBER,
- PhoneLookup.NORMALIZED_NUMBER,
- PhoneLookup.PHOTO_ID,
- PhoneLookup.LOOKUP_KEY,
- PhoneLookup.PHOTO_URI
- };
+ private static final String[] BACKWARD_COMPATIBLE_NON_SIP_PHONE_LOOKUP_PROJECTION =
+ new String[] {
+ PhoneLookup._ID,
+ PhoneLookup.DISPLAY_NAME,
+ PhoneLookup.TYPE,
+ PhoneLookup.LABEL,
+ PhoneLookup.NUMBER,
+ PhoneLookup.NORMALIZED_NUMBER,
+ PhoneLookup.PHOTO_ID,
+ PhoneLookup.LOOKUP_KEY,
+ PhoneLookup.PHOTO_URI
+ };
+
+ public static String[] getPhoneLookupProjection(Uri phoneLookupUri) {
+ if (CompatUtils.isNCompatible()) {
+ return PHONE_LOOKUP_PROJECTION;
+ }
+ // Pre-N
+ boolean isSip = phoneLookupUri.getBooleanQueryParameter(
+ ContactsContract.PhoneLookup.QUERY_PARAMETER_SIP_ADDRESS, false);
+ return (isSip) ? PHONE_LOOKUP_PROJECTION
+ : BACKWARD_COMPATIBLE_NON_SIP_PHONE_LOOKUP_PROJECTION;
+ }
public static final int PERSON_ID = 0;
public static final int NAME = 1;
diff --git a/src/com/android/dialer/compat/CallAudioStateCompat.java b/src/com/android/dialer/compat/CallAudioStateCompat.java
deleted file mode 100644
index 51009d0..0000000
--- a/src/com/android/dialer/compat/CallAudioStateCompat.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-package com.android.dialer.compat;
-
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.telecom.CallAudioState;
-
-import com.android.contacts.common.compat.SdkVersionOverride;
-
-import java.util.Locale;
-
-/**
- * Compatibility class for {@link CallAudioState}
- */
-public class CallAudioStateCompat {
-
- /**
- * Direct the audio stream through the device's earpiece.
- */
- public static final int ROUTE_EARPIECE = CallAudioState.ROUTE_EARPIECE;
-
- /**
- * Direct the audio stream through Bluetooth.
- */
- public static final int ROUTE_BLUETOOTH = CallAudioState.ROUTE_BLUETOOTH;
-
- /**
- * Direct the audio stream through a wired headset.
- */
- public static final int ROUTE_WIRED_HEADSET = CallAudioState.ROUTE_WIRED_HEADSET;
-
- /**
- * Direct the audio stream through the device's speakerphone.
- */
- public static final int ROUTE_SPEAKER = CallAudioState.ROUTE_SPEAKER;
-
- /**
- * Direct the audio stream through the device's earpiece or wired headset if one is connected.
- */
- public static final int ROUTE_WIRED_OR_EARPIECE = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
-
- private final CallAudioStateImpl mCallAudioState;
-
- /**
- * Constructor for a {@link CallAudioStateCompat} object.
- *
- * @param muted {@code true} if the call is muted, {@code false} otherwise.
- * @param route The current audio route being used. Allowed values: {@link #ROUTE_EARPIECE}
- * {@link #ROUTE_BLUETOOTH} {@link #ROUTE_WIRED_HEADSET} {@link #ROUTE_SPEAKER}
- * @param supportedRouteMask Bit mask of all routes supported by this call. This should be a
- * bitwise combination of the following values: {@link #ROUTE_EARPIECE} {@link #ROUTE_BLUETOOTH}
- * {@link #ROUTE_WIRED_HEADSET} {@link #ROUTE_SPEAKER}
- */
- public CallAudioStateCompat(boolean muted, int route, int supportedRouteMask) {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M)
- < Build.VERSION_CODES.M) {
- mCallAudioState = new CallAudioStateBase(muted, route, supportedRouteMask);
- } else {
- mCallAudioState = new CallAudioStateMarshmallow(muted, route, supportedRouteMask);
- }
- }
-
- /**
- * @return {@code true} if the call is muted, {@code false} otherwise.
- */
- public boolean isMuted() {
- return mCallAudioState.isMuted();
- }
-
- /**
- * @return The current audio route being used.
- */
- public int getRoute() {
- return mCallAudioState.getRoute();
- }
-
- /**
- * @return Bit mask of all routes supported by this call.
- */
- public int getSupportedRouteMask() {
- return mCallAudioState.getSupportedRouteMask();
- }
-
- /**
- * Converts the provided audio route into a human readable string representation.
- *
- * @param route to convert into a string.
- * @return String representation of the provided audio route.
- */
- public static String audioRouteToString(int route) {
- if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M)
- < Build.VERSION_CODES.M) {
- return CallAudioStateBase.audioRouteToString(route);
- }
- return CallAudioStateMarshmallow.audioRouteToString(route);
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- CallAudioStateCompat that = (CallAudioStateCompat) o;
-
- return mCallAudioState.equals(that.mCallAudioState);
-
- }
-
- @Override
- public int hashCode() {
- return mCallAudioState.hashCode();
- }
-
- @Override
- public String toString() {
- return mCallAudioState.toString();
- }
-
- private interface CallAudioStateImpl {
- boolean isMuted();
- int getRoute();
- int getSupportedRouteMask();
- }
-
- /**
- * CallAudioStateImpl to use if the Sdk version is lower than
- * {@link android.os.Build.VERSION_CODES.M}
- *
- * Coped from {@link android.telecom.CallAudioState}
- *
- * Encapsulates the telecom audio state, including the current audio routing, supported audio
- * routing and mute.
- */
- private static class CallAudioStateBase implements CallAudioStateImpl, Parcelable {
-
- /**
- * Bit mask of all possible audio routes.
- */
- private static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET
- | ROUTE_SPEAKER;
-
- private final boolean isMuted;
- private final int route;
- private final int supportedRouteMask;
-
- /**
- * Constructor for a {@link CallAudioStateBase} object.
- *
- * @param muted {@code true} if the call is muted, {@code false} otherwise.
- * @param route The current audio route being used. Allowed values: {@link #ROUTE_EARPIECE}
- * {@link #ROUTE_BLUETOOTH}, {@link #ROUTE_WIRED_HEADSET}, {@link #ROUTE_SPEAKER}
- * @param supportedRouteMask Bit mask of all routes supported by this call. This should be a
- * bitwise combination of the following values: {@link #ROUTE_EARPIECE},
- * {@link #ROUTE_BLUETOOTH}, {@link #ROUTE_WIRED_HEADSET}, {@link #ROUTE_SPEAKER}
- */
- public CallAudioStateBase(boolean muted, int route, int supportedRouteMask) {
- this.isMuted = muted;
- this.route = route;
- this.supportedRouteMask = supportedRouteMask;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof CallAudioStateBase)) {
- return false;
- }
- CallAudioStateBase state = (CallAudioStateBase) obj;
- return isMuted() == state.isMuted() && getRoute() == state.getRoute() &&
- getSupportedRouteMask() == state.getSupportedRouteMask();
- }
-
- @Override
- public String toString() {
- return String.format(Locale.US,
- "[AudioState isMuted: %b, route: %s, supportedRouteMask: %s]",
- isMuted,
- audioRouteToString(route),
- audioRouteToString(supportedRouteMask));
- }
-
- /**
- * @return {@code true} if the call is muted, {@code false} otherwise.
- */
- @Override
- public boolean isMuted() {
- return isMuted;
- }
-
- /**
- * @return The current audio route being used.
- */
- public int getRoute() {
- return route;
- }
-
- /**
- * @return Bit mask of all routes supported by this call.
- */
- public int getSupportedRouteMask() {
- return supportedRouteMask;
- }
-
- /**
- * Converts the provided audio route into a human readable string representation.
- *
- * @param route to convert into a string.
- * @return String representation of the provided audio route.
- */
- public static String audioRouteToString(int route) {
- if (route == 0 || (route & ~ROUTE_ALL) != 0x0) {
- return "UNKNOWN";
- }
-
- StringBuffer buffer = new StringBuffer();
- if ((route & ROUTE_EARPIECE) == ROUTE_EARPIECE) {
- listAppend(buffer, "EARPIECE");
- }
- if ((route & ROUTE_BLUETOOTH) == ROUTE_BLUETOOTH) {
- listAppend(buffer, "BLUETOOTH");
- }
- if ((route & ROUTE_WIRED_HEADSET) == ROUTE_WIRED_HEADSET) {
- listAppend(buffer, "WIRED_HEADSET");
- }
- if ((route & ROUTE_SPEAKER) == ROUTE_SPEAKER) {
- listAppend(buffer, "SPEAKER");
- }
-
- return buffer.toString();
- }
-
- /**
- * Responsible for creating AudioState objects for deserialized Parcels.
- */
- public static final Parcelable.Creator<CallAudioStateBase> CREATOR =
- new Parcelable.Creator<CallAudioStateBase>() {
-
- @Override
- public CallAudioStateBase createFromParcel(Parcel source) {
- boolean isMuted = source.readByte() == 0 ? false : true;
- int route = source.readInt();
- int supportedRouteMask = source.readInt();
- return new CallAudioStateBase(isMuted, route, supportedRouteMask);
- }
-
- @Override
- public CallAudioStateBase[] newArray(int size) {
- return new CallAudioStateBase[size];
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int describeContents() {
- return 0;
- }
-
- /**
- * Writes AudioState object into a serializeable Parcel.
- */
- @Override
- public void writeToParcel(Parcel destination, int flags) {
- destination.writeByte((byte) (isMuted ? 1 : 0));
- destination.writeInt(route);
- destination.writeInt(supportedRouteMask);
- }
-
- private static void listAppend(StringBuffer buffer, String str) {
- if (buffer.length() > 0) {
- buffer.append(", ");
- }
- buffer.append(str);
- }
- }
-
- /**
- * CallAudioStateImpl to use if the Sdk version is at least
- * {@link android.os.Build.VERSION_CODES.M}
- */
- private static class CallAudioStateMarshmallow implements CallAudioStateImpl {
-
- private final CallAudioState mCallAudioStateDelegate;
-
- public CallAudioStateMarshmallow(boolean muted, int route, int supportedRouteMask) {
- mCallAudioStateDelegate = new CallAudioState(muted, route, supportedRouteMask);
- }
-
- @Override
- public boolean isMuted() {
- return mCallAudioStateDelegate.isMuted();
- }
-
- @Override
- public int getRoute() {
- return mCallAudioStateDelegate.getRoute();
- }
-
- @Override
- public int getSupportedRouteMask() {
- return mCallAudioStateDelegate.getSupportedRouteMask();
- }
-
- public static String audioRouteToString(int route) {
- return CallAudioState.audioRouteToString(route);
- }
- }
-}
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java
index 246b0d7..55d5346 100644
--- a/src/com/android/dialer/dialpad/DialpadFragment.java
+++ b/src/com/android/dialer/dialpad/DialpadFragment.java
@@ -822,13 +822,12 @@
@Override
public boolean onKey(View view, int keyCode, KeyEvent event) {
- switch (view.getId()) {
- case R.id.digits:
- if (keyCode == KeyEvent.KEYCODE_ENTER) {
- handleDialButtonPressed();
- return true;
- }
- break;
+ if (view.getId() == R.id.digits) {
+ if (keyCode == KeyEvent.KEYCODE_ENTER) {
+ handleDialButtonPressed();
+ return true;
+ }
+
}
return false;
}
@@ -843,59 +842,33 @@
public void onPressed(View view, boolean pressed) {
if (DEBUG) Log.d(TAG, "onPressed(). view: " + view + ", pressed: " + pressed);
if (pressed) {
- switch (view.getId()) {
- case R.id.one: {
- keyPressed(KeyEvent.KEYCODE_1);
- break;
- }
- case R.id.two: {
- keyPressed(KeyEvent.KEYCODE_2);
- break;
- }
- case R.id.three: {
- keyPressed(KeyEvent.KEYCODE_3);
- break;
- }
- case R.id.four: {
- keyPressed(KeyEvent.KEYCODE_4);
- break;
- }
- case R.id.five: {
- keyPressed(KeyEvent.KEYCODE_5);
- break;
- }
- case R.id.six: {
- keyPressed(KeyEvent.KEYCODE_6);
- break;
- }
- case R.id.seven: {
- keyPressed(KeyEvent.KEYCODE_7);
- break;
- }
- case R.id.eight: {
- keyPressed(KeyEvent.KEYCODE_8);
- break;
- }
- case R.id.nine: {
- keyPressed(KeyEvent.KEYCODE_9);
- break;
- }
- case R.id.zero: {
- keyPressed(KeyEvent.KEYCODE_0);
- break;
- }
- case R.id.pound: {
- keyPressed(KeyEvent.KEYCODE_POUND);
- break;
- }
- case R.id.star: {
- keyPressed(KeyEvent.KEYCODE_STAR);
- break;
- }
- default: {
- Log.wtf(TAG, "Unexpected onTouch(ACTION_DOWN) event from: " + view);
- break;
- }
+ int resId = view.getId();
+ if (resId == R.id.one) {
+ keyPressed(KeyEvent.KEYCODE_1);
+ } else if (resId == R.id.two) {
+ keyPressed(KeyEvent.KEYCODE_2);
+ } else if (resId == R.id.three) {
+ keyPressed(KeyEvent.KEYCODE_3);
+ } else if (resId == R.id.four) {
+ keyPressed(KeyEvent.KEYCODE_4);
+ } else if (resId == R.id.five) {
+ keyPressed(KeyEvent.KEYCODE_5);
+ } else if (resId == R.id.six) {
+ keyPressed(KeyEvent.KEYCODE_6);
+ } else if (resId == R.id.seven) {
+ keyPressed(KeyEvent.KEYCODE_7);
+ } else if (resId == R.id.eight) {
+ keyPressed(KeyEvent.KEYCODE_8);
+ } else if (resId == R.id.nine) {
+ keyPressed(KeyEvent.KEYCODE_9);
+ } else if (resId == R.id.zero) {
+ keyPressed(KeyEvent.KEYCODE_0);
+ } else if (resId == R.id.pound) {
+ keyPressed(KeyEvent.KEYCODE_POUND);
+ } else if (resId == R.id.star) {
+ keyPressed(KeyEvent.KEYCODE_STAR);
+ } else {
+ Log.wtf(TAG, "Unexpected onTouch(ACTION_DOWN) event from: " + view);
}
mPressedDialpadKeys.add(view);
} else {
@@ -936,29 +909,21 @@
@Override
public void onClick(View view) {
- switch (view.getId()) {
- case R.id.dialpad_floating_action_button:
- view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
- handleDialButtonPressed();
- break;
- case R.id.deleteButton: {
- keyPressed(KeyEvent.KEYCODE_DEL);
- break;
+ int resId = view.getId();
+ if (resId == R.id.dialpad_floating_action_button) {
+ view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
+ handleDialButtonPressed();
+ } else if (resId == R.id.deleteButton) {
+ keyPressed(KeyEvent.KEYCODE_DEL);
+ } else if (resId == R.id.digits) {
+ if (!isDigitsEmpty()) {
+ mDigits.setCursorVisible(true);
}
- case R.id.digits: {
- if (!isDigitsEmpty()) {
- mDigits.setCursorVisible(true);
- }
- break;
- }
- case R.id.dialpad_overflow: {
- mOverflowPopupMenu.show();
- break;
- }
- default: {
- Log.wtf(TAG, "Unexpected onClick() event from: " + view);
- return;
- }
+ } else if (resId == R.id.dialpad_overflow) {
+ mOverflowPopupMenu.show();
+ } else {
+ Log.wtf(TAG, "Unexpected onClick() event from: " + view);
+ return;
}
}
@@ -966,75 +931,61 @@
public boolean onLongClick(View view) {
final Editable digits = mDigits.getText();
final int id = view.getId();
- switch (id) {
- case R.id.deleteButton: {
- digits.clear();
- return true;
- }
- case R.id.one: {
- // '1' may be already entered since we rely on onTouch() event for numeric buttons.
- // Just for safety we also check if the digits field is empty or not.
- if (isDigitsEmpty() || TextUtils.equals(mDigits.getText(), "1")) {
- // We'll try to initiate voicemail and thus we want to remove irrelevant string.
- removePreviousDigitIfPossible('1');
+ if (id == R.id.deleteButton) {
+ digits.clear();
+ return true;
+ } else if (id == R.id.one) {
+ if (isDigitsEmpty() || TextUtils.equals(mDigits.getText(), "1")) {
+ // We'll try to initiate voicemail and thus we want to remove irrelevant string.
+ removePreviousDigitIfPossible('1');
- List<PhoneAccountHandle> subscriptionAccountHandles =
- PhoneAccountUtils.getSubscriptionPhoneAccounts(getActivity());
- boolean hasUserSelectedDefault = subscriptionAccountHandles.contains(
- TelecomUtil.getDefaultOutgoingPhoneAccount(getActivity(),
- PhoneAccount.SCHEME_VOICEMAIL));
- boolean needsAccountDisambiguation = subscriptionAccountHandles.size() > 1
- && !hasUserSelectedDefault;
+ List<PhoneAccountHandle> subscriptionAccountHandles =
+ PhoneAccountUtils.getSubscriptionPhoneAccounts(getActivity());
+ boolean hasUserSelectedDefault = subscriptionAccountHandles.contains(
+ TelecomUtil.getDefaultOutgoingPhoneAccount(getActivity(),
+ PhoneAccount.SCHEME_VOICEMAIL));
+ boolean needsAccountDisambiguation = subscriptionAccountHandles.size() > 1
+ && !hasUserSelectedDefault;
- if (needsAccountDisambiguation || isVoicemailAvailable()) {
- // On a multi-SIM phone, if the user has not selected a default
- // subscription, initiate a call to voicemail so they can select an account
- // from the "Call with" dialog.
- callVoicemail();
- } else if (getActivity() != null) {
- // Voicemail is unavailable maybe because Airplane mode is turned on.
- // Check the current status and show the most appropriate error message.
- final boolean isAirplaneModeOn =
- Settings.System.getInt(getActivity().getContentResolver(),
- Settings.System.AIRPLANE_MODE_ON, 0) != 0;
- if (isAirplaneModeOn) {
- DialogFragment dialogFragment = ErrorDialogFragment.newInstance(
- R.string.dialog_voicemail_airplane_mode_message);
- dialogFragment.show(getFragmentManager(),
- "voicemail_request_during_airplane_mode");
- } else {
- DialogFragment dialogFragment = ErrorDialogFragment.newInstance(
- R.string.dialog_voicemail_not_ready_message);
- dialogFragment.show(getFragmentManager(), "voicemail_not_ready");
- }
+ if (needsAccountDisambiguation || isVoicemailAvailable()) {
+ // On a multi-SIM phone, if the user has not selected a default
+ // subscription, initiate a call to voicemail so they can select an account
+ // from the "Call with" dialog.
+ callVoicemail();
+ } else if (getActivity() != null) {
+ // Voicemail is unavailable maybe because Airplane mode is turned on.
+ // Check the current status and show the most appropriate error message.
+ final boolean isAirplaneModeOn =
+ Settings.System.getInt(getActivity().getContentResolver(),
+ Settings.System.AIRPLANE_MODE_ON, 0) != 0;
+ if (isAirplaneModeOn) {
+ DialogFragment dialogFragment = ErrorDialogFragment.newInstance(
+ R.string.dialog_voicemail_airplane_mode_message);
+ dialogFragment.show(getFragmentManager(),
+ "voicemail_request_during_airplane_mode");
+ } else {
+ DialogFragment dialogFragment = ErrorDialogFragment.newInstance(
+ R.string.dialog_voicemail_not_ready_message);
+ dialogFragment.show(getFragmentManager(), "voicemail_not_ready");
}
- return true;
}
- return false;
- }
- case R.id.zero: {
- if (mPressedDialpadKeys.contains(view)) {
- // If the zero key is currently pressed, then the long press occurred by touch
- // (and not via other means like certain accessibility input methods).
- // Remove the '0' that was input when the key was first pressed.
- removePreviousDigitIfPossible('0');
- }
-
- keyPressed(KeyEvent.KEYCODE_PLUS);
-
- // Stop tone immediately
- stopTone();
- mPressedDialpadKeys.remove(view);
-
return true;
}
- case R.id.digits: {
- // Right now EditText does not show the "paste" option when cursor is not visible.
- // To show that, make the cursor visible, and return false, letting the EditText
- // show the option by itself.
- mDigits.setCursorVisible(true);
- return false;
+ return false;
+ } else if (id == R.id.zero) {
+ if (mPressedDialpadKeys.contains(view)) {
+ // If the zero key is currently pressed, then the long press occurred by touch
+ // (and not via other means like certain accessibility input methods).
+ // Remove the '0' that was input when the key was first pressed.
+ removePreviousDigitIfPossible('0');
}
+ keyPressed(KeyEvent.KEYCODE_PLUS);
+ stopTone();
+ mPressedDialpadKeys.remove(view);
+ return true;
+ } else if (id == R.id.digits) {
+ mDigits.setCursorVisible(true);
+ return false;
}
return false;
}
@@ -1438,31 +1389,20 @@
DialpadChooserAdapter.ChoiceItem item =
(DialpadChooserAdapter.ChoiceItem) parent.getItemAtPosition(position);
int itemId = item.id;
- switch (itemId) {
- case DialpadChooserAdapter.DIALPAD_CHOICE_USE_DTMF_DIALPAD:
- // Log.i(TAG, "DIALPAD_CHOICE_USE_DTMF_DIALPAD");
- // Fire off an intent to go back to the in-call UI
- // with the dialpad visible.
- returnToInCallScreen(true);
- break;
-
- case DialpadChooserAdapter.DIALPAD_CHOICE_RETURN_TO_CALL:
- // Log.i(TAG, "DIALPAD_CHOICE_RETURN_TO_CALL");
- // Fire off an intent to go back to the in-call UI
- // (with the dialpad hidden).
- returnToInCallScreen(false);
- break;
-
- case DialpadChooserAdapter.DIALPAD_CHOICE_ADD_NEW_CALL:
- // Log.i(TAG, "DIALPAD_CHOICE_ADD_NEW_CALL");
- // Ok, guess the user really did want to be here (in the
- // regular Dialer) after all. Bring back the normal Dialer UI.
- showDialpadChooser(false);
- break;
-
- default:
- Log.w(TAG, "onItemClick: unexpected itemId: " + itemId);
- break;
+ if (itemId == DialpadChooserAdapter.DIALPAD_CHOICE_USE_DTMF_DIALPAD) {// Log.i(TAG, "DIALPAD_CHOICE_USE_DTMF_DIALPAD");
+ // Fire off an intent to go back to the in-call UI
+ // with the dialpad visible.
+ returnToInCallScreen(true);
+ } else if (itemId == DialpadChooserAdapter.DIALPAD_CHOICE_RETURN_TO_CALL) {// Log.i(TAG, "DIALPAD_CHOICE_RETURN_TO_CALL");
+ // Fire off an intent to go back to the in-call UI
+ // (with the dialpad hidden).
+ returnToInCallScreen(false);
+ } else if (itemId == DialpadChooserAdapter.DIALPAD_CHOICE_ADD_NEW_CALL) {// Log.i(TAG, "DIALPAD_CHOICE_ADD_NEW_CALL");
+ // Ok, guess the user really did want to be here (in the
+ // regular Dialer) after all. Bring back the normal Dialer UI.
+ showDialpadChooser(false);
+ } else {
+ Log.w(TAG, "onItemClick: unexpected itemId: " + itemId);
}
}
@@ -1506,19 +1446,19 @@
@Override
public boolean onMenuItemClick(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.menu_2s_pause:
- updateDialString(PAUSE);
- return true;
- case R.id.menu_add_wait:
- updateDialString(WAIT);
- return true;
- case R.id.menu_call_with_note:
- CallSubjectDialog.start(getActivity(), mDigits.getText().toString());
- hideAndClearDialpad(false);
- return true;
- default:
- return false;
+ int resId = item.getItemId();
+ if (resId == R.id.menu_2s_pause) {
+ updateDialString(PAUSE);
+ return true;
+ } else if (resId == R.id.menu_add_wait) {
+ updateDialString(WAIT);
+ return true;
+ } else if (resId == R.id.menu_call_with_note) {
+ CallSubjectDialog.start(getActivity(), mDigits.getText().toString());
+ hideAndClearDialpad(false);
+ return true;
+ } else {
+ return false;
}
}
diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
index e231c6a..a878660 100644
--- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
+++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
@@ -180,22 +180,19 @@
return;
}
- switch (view.getId()) {
- case R.id.add_number_linear_layout:
- activity.showSearchUi();
- break;
- case R.id.view_numbers_button:
- activity.showNumbersToImportPreviewUi();
- break;
- case R.id.import_button:
- FilteredNumbersUtil.importSendToVoicemailContacts(activity,
- new ImportSendToVoicemailContactsListener() {
- @Override
- public void onImportComplete() {
- mImportSettings.setVisibility(View.GONE);
- }
- });
- break;
+ int resId = view.getId();
+ if (resId == R.id.add_number_linear_layout) {
+ activity.showSearchUi();
+ } else if (resId == R.id.view_numbers_button) {
+ activity.showNumbersToImportPreviewUi();
+ } else if (resId == R.id.import_button) {
+ FilteredNumbersUtil.importSendToVoicemailContacts(activity,
+ new ImportSendToVoicemailContactsListener() {
+ @Override
+ public void onImportComplete() {
+ mImportSettings.setVisibility(View.GONE);
+ }
+ });
}
}
@Override
diff --git a/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java b/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java
index 153d73c..8b24c06 100644
--- a/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java
+++ b/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java
@@ -116,21 +116,18 @@
@Override
public void onClick(final View view) {
- switch (view.getId()) {
- case R.id.import_button:
- FilteredNumbersUtil.importSendToVoicemailContacts(getContext(),
- new ImportSendToVoicemailContactsListener() {
- @Override
- public void onImportComplete() {
- if (getActivity() != null) {
- getActivity().onBackPressed();
- }
+ if (view.getId() == R.id.import_button) {
+ FilteredNumbersUtil.importSendToVoicemailContacts(getContext(),
+ new ImportSendToVoicemailContactsListener() {
+ @Override
+ public void onImportComplete() {
+ if (getActivity() != null) {
+ getActivity().onBackPressed();
}
- });
- break;
- case R.id.cancel_button:
- getActivity().onBackPressed();
- break;
+ }
+ });
+ } else if (view.getId() == R.id.cancel_button) {
+ getActivity().onBackPressed();
}
}
}
diff --git a/src/com/android/dialer/interactions/PhoneNumberInteraction.java b/src/com/android/dialer/interactions/PhoneNumberInteraction.java
index 2472845..0c3ae51 100644
--- a/src/com/android/dialer/interactions/PhoneNumberInteraction.java
+++ b/src/com/android/dialer/interactions/PhoneNumberInteraction.java
@@ -191,6 +191,7 @@
private static final String ARG_PHONE_LIST = "phoneList";
private static final String ARG_INTERACTION_TYPE = "interactionType";
private static final String ARG_CALL_INITIATION_TYPE = "callInitiation";
+ private static final String ARG_IS_VIDEO_CALL = "is_video_call";
private int mInteractionType;
private ListAdapter mPhonesAdapter;
@@ -200,19 +201,18 @@
public static void show(FragmentManager fragmentManager, ArrayList<PhoneItem> phoneList,
int interactionType, boolean isVideoCall, int callInitiationType) {
- PhoneDisambiguationDialogFragment fragment = new PhoneDisambiguationDialogFragment(
- isVideoCall);
+ PhoneDisambiguationDialogFragment fragment = new PhoneDisambiguationDialogFragment();
Bundle bundle = new Bundle();
bundle.putParcelableArrayList(ARG_PHONE_LIST, phoneList);
bundle.putInt(ARG_INTERACTION_TYPE, interactionType);
bundle.putInt(ARG_CALL_INITIATION_TYPE, callInitiationType);
+ bundle.putBoolean(ARG_IS_VIDEO_CALL, isVideoCall);
fragment.setArguments(bundle);
fragment.show(fragmentManager, TAG);
}
- public PhoneDisambiguationDialogFragment(boolean isVideoCall) {
+ public PhoneDisambiguationDialogFragment() {
super();
- mIsVideoCall = isVideoCall;
}
@Override
@@ -221,6 +221,7 @@
mPhoneList = getArguments().getParcelableArrayList(ARG_PHONE_LIST);
mInteractionType = getArguments().getInt(ARG_INTERACTION_TYPE);
mCallInitiationType = getArguments().getInt(ARG_CALL_INITIATION_TYPE);
+ mIsVideoCall = getArguments().getBoolean(ARG_IS_VIDEO_CALL);
mPhonesAdapter = new PhoneItemAdapter(activity, mPhoneList, mInteractionType);
final LayoutInflater inflater = activity.getLayoutInflater();
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java
index d1a0be0..82395b6 100644
--- a/src/com/android/dialer/list/SearchFragment.java
+++ b/src/com/android/dialer/list/SearchFragment.java
@@ -275,7 +275,8 @@
DialerUtils.startActivityWithErrorToast(getActivity(), intent);
break;
case DialerPhoneNumberListAdapter.SHORTCUT_MAKE_VIDEO_CALL:
- number = adapter.getQueryString();
+ number = TextUtils.isEmpty(mAddToContactNumber) ?
+ adapter.getQueryString() : mAddToContactNumber;
listener = getOnPhoneNumberPickerListener();
if (listener != null && !checkForProhibitedPhoneNumber(number)) {
listener.onPickPhoneNumber(number, true /* isVideoCall */,
diff --git a/src/com/android/dialer/settings/AppCompatPreferenceActivity.java b/src/com/android/dialer/settings/AppCompatPreferenceActivity.java
new file mode 100644
index 0000000..4e5d9c9
--- /dev/null
+++ b/src/com/android/dialer/settings/AppCompatPreferenceActivity.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+package com.android.dialer.settings;
+
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatDelegate;
+import android.support.v7.widget.Toolbar;
+import android.view.MenuInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
+ * to be used with AppCompat.
+ */
+public class AppCompatPreferenceActivity extends PreferenceActivity {
+ private AppCompatDelegate mDelegate;
+
+ private boolean mIsSafeToCommitTransactions;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ getDelegate().installViewFactory();
+ getDelegate().onCreate(savedInstanceState);
+ super.onCreate(savedInstanceState);
+ mIsSafeToCommitTransactions = true;
+ }
+
+ @Override
+ protected void onPostCreate(Bundle savedInstanceState) {
+ super.onPostCreate(savedInstanceState);
+ getDelegate().onPostCreate(savedInstanceState);
+ }
+
+ public ActionBar getSupportActionBar() {
+ return getDelegate().getSupportActionBar();
+ }
+
+ public void setSupportActionBar(Toolbar toolbar) {
+ getDelegate().setSupportActionBar(toolbar);
+ }
+
+ @Override
+ public MenuInflater getMenuInflater() {
+ return getDelegate().getMenuInflater();
+ }
+
+ @Override
+ public void setContentView(int layoutResID) {
+ getDelegate().setContentView(layoutResID);
+ }
+
+ @Override
+ public void setContentView(View view) {
+ getDelegate().setContentView(view);
+ }
+
+ @Override
+ public void setContentView(View view, ViewGroup.LayoutParams params) {
+ getDelegate().setContentView(view, params);
+ }
+
+ @Override
+ public void addContentView(View view, ViewGroup.LayoutParams params) {
+ getDelegate().addContentView(view, params);
+ }
+
+ @Override
+ protected void onPostResume() {
+ super.onPostResume();
+ getDelegate().onPostResume();
+ }
+
+ @Override
+ protected void onTitleChanged(CharSequence title, int color) {
+ super.onTitleChanged(title, color);
+ getDelegate().setTitle(title);
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ getDelegate().onConfigurationChanged(newConfig);
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ getDelegate().onStop();
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ getDelegate().onDestroy();
+ }
+
+ @Override
+ public void invalidateOptionsMenu() {
+ getDelegate().invalidateOptionsMenu();
+ }
+
+ private AppCompatDelegate getDelegate() {
+ if (mDelegate == null) {
+ mDelegate = AppCompatDelegate.create(this, null);
+ }
+ return mDelegate;
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ mIsSafeToCommitTransactions = true;
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ mIsSafeToCommitTransactions = true;
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ mIsSafeToCommitTransactions = false;
+ }
+
+ /**
+ * Returns true if it is safe to commit {@link FragmentTransaction}s at this time, based on
+ * whether {@link Activity#onSaveInstanceState} has been called or not.
+ *
+ * Make sure that the current activity calls into
+ * {@link super.onSaveInstanceState(Bundle outState)} (if that method is overridden),
+ * so the flag is properly set.
+ */
+ public boolean isSafeToCommitTransactions() {
+ return mIsSafeToCommitTransactions;
+ }
+}
diff --git a/src/com/android/dialer/settings/DialerSettingsActivity.java b/src/com/android/dialer/settings/DialerSettingsActivity.java
index b25c5a6..a187157 100644
--- a/src/com/android/dialer/settings/DialerSettingsActivity.java
+++ b/src/com/android/dialer/settings/DialerSettingsActivity.java
@@ -28,7 +28,6 @@
import android.view.MenuItem;
import android.widget.Toast;
-import com.android.contacts.common.activity.AppCompatPreferenceActivity;
import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.common.compat.SdkVersionOverride;
import com.android.contacts.common.compat.TelephonyManagerCompat;
diff --git a/src/com/android/dialer/util/PhoneLookupUtil.java b/src/com/android/dialer/util/PhoneLookupUtil.java
new file mode 100644
index 0000000..1a72396
--- /dev/null
+++ b/src/com/android/dialer/util/PhoneLookupUtil.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2016 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
+ */
+
+package com.android.dialer.util;
+
+import android.net.Uri;
+import android.provider.ContactsContract;
+
+import com.android.contacts.common.compat.CompatUtils;
+import com.android.contacts.common.compat.PhoneLookupSdkCompat;
+
+public final class PhoneLookupUtil {
+ /**
+ * @return the column name that stores contact id for phone lookup query.
+ */
+ public static String getContactIdColumnNameForUri(Uri phoneLookupUri) {
+ if (CompatUtils.isNCompatible()) {
+ return PhoneLookupSdkCompat.CONTACT_ID;
+ }
+ // In pre-N, contact id is stored in {@link PhoneLookup#_ID} in non-sip query.
+ boolean isSip = phoneLookupUri.getBooleanQueryParameter(
+ ContactsContract.PhoneLookup.QUERY_PARAMETER_SIP_ADDRESS, false);
+ return (isSip) ? PhoneLookupSdkCompat.CONTACT_ID : ContactsContract.PhoneLookup._ID;
+ }
+
+ private PhoneLookupUtil() {}
+}
diff --git a/src/com/android/dialer/voicemail/VoicemailAudioManager.java b/src/com/android/dialer/voicemail/VoicemailAudioManager.java
index 712b20b..fe6cf5f 100644
--- a/src/com/android/dialer/voicemail/VoicemailAudioManager.java
+++ b/src/com/android/dialer/voicemail/VoicemailAudioManager.java
@@ -19,10 +19,9 @@
import android.content.Context;
import android.media.AudioManager;
import android.media.AudioManager.OnAudioFocusChangeListener;
+import android.telecom.CallAudioState;
import android.util.Log;
-import com.android.dialer.compat.CallAudioStateCompat;
-
import java.util.concurrent.RejectedExecutionException;
/**
@@ -38,7 +37,7 @@
private VoicemailPlaybackPresenter mVoicemailPlaybackPresenter;
private WiredHeadsetManager mWiredHeadsetManager;
private boolean mWasSpeakerOn;
- private CallAudioStateCompat mCallAudioState;
+ private CallAudioState mCallAudioState;
public VoicemailAudioManager(Context context,
VoicemailPlaybackPresenter voicemailPlaybackPresenter) {
@@ -82,26 +81,25 @@
int newRoute = mCallAudioState.getRoute(); // start out with existing route
if (newIsPluggedIn) {
- newRoute = CallAudioStateCompat.ROUTE_WIRED_HEADSET;
+ newRoute = CallAudioState.ROUTE_WIRED_HEADSET;
} else {
if (mWasSpeakerOn) {
- newRoute = CallAudioStateCompat.ROUTE_SPEAKER;
+ newRoute = CallAudioState.ROUTE_SPEAKER;
} else {
- newRoute = CallAudioStateCompat.ROUTE_EARPIECE;
+ newRoute = CallAudioState.ROUTE_EARPIECE;
}
}
- mVoicemailPlaybackPresenter.setSpeakerphoneOn(newRoute == CallAudioStateCompat.ROUTE_SPEAKER);
+ mVoicemailPlaybackPresenter.setSpeakerphoneOn(newRoute == CallAudioState.ROUTE_SPEAKER);
// We need to call this every time even if we do not change the route because the supported
// routes changed either to include or not include WIRED_HEADSET.
setSystemAudioState(
- new CallAudioStateCompat(false /* muted */, newRoute, calculateSupportedRoutes()));
+ new CallAudioState(false /* muted */, newRoute, calculateSupportedRoutes()));
}
public void setSpeakerphoneOn(boolean on) {
- setAudioRoute(on ? CallAudioStateCompat.ROUTE_SPEAKER
- : CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE);
+ setAudioRoute(on ? CallAudioState.ROUTE_SPEAKER : CallAudioState.ROUTE_WIRED_OR_EARPIECE);
}
public boolean isWiredHeadsetPluggedIn() {
@@ -120,10 +118,10 @@
/**
* Change the audio route, for example from earpiece to speakerphone.
*
- * @param route The new audio route to use. See {@link CallAudioStateCompat}.
+ * @param route The new audio route to use. See {@link CallAudioState}.
*/
void setAudioRoute(int route) {
- Log.v(TAG, "setAudioRoute, route: " + CallAudioStateCompat.audioRouteToString(route));
+ Log.v(TAG, "setAudioRoute, route: " + CallAudioState.audioRouteToString(route));
// Change ROUTE_WIRED_OR_EARPIECE to a single entry.
int newRoute = selectWiredOrEarpiece(route, mCallAudioState.getSupportedRouteMask());
@@ -137,25 +135,25 @@
if (mCallAudioState.getRoute() != newRoute) {
// Remember the new speaker state so it can be restored when the user plugs and unplugs
// a headset.
- mWasSpeakerOn = newRoute == CallAudioStateCompat.ROUTE_SPEAKER;
- setSystemAudioState(new CallAudioStateCompat(false /* muted */, newRoute,
+ mWasSpeakerOn = newRoute == CallAudioState.ROUTE_SPEAKER;
+ setSystemAudioState(new CallAudioState(false /* muted */, newRoute,
mCallAudioState.getSupportedRouteMask()));
}
}
- private CallAudioStateCompat getInitialAudioState() {
+ private CallAudioState getInitialAudioState() {
int supportedRouteMask = calculateSupportedRoutes();
- int route = selectWiredOrEarpiece(CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE,
+ int route = selectWiredOrEarpiece(CallAudioState.ROUTE_WIRED_OR_EARPIECE,
supportedRouteMask);
- return new CallAudioStateCompat(false /* muted */, route, supportedRouteMask);
+ return new CallAudioState(false /* muted */, route, supportedRouteMask);
}
private int calculateSupportedRoutes() {
- int routeMask = CallAudioStateCompat.ROUTE_SPEAKER;
+ int routeMask = CallAudioState.ROUTE_SPEAKER;
if (mWiredHeadsetManager.isPluggedIn()) {
- routeMask |= CallAudioStateCompat.ROUTE_WIRED_HEADSET;
+ routeMask |= CallAudioState.ROUTE_WIRED_HEADSET;
} else {
- routeMask |= CallAudioStateCompat.ROUTE_EARPIECE;
+ routeMask |= CallAudioState.ROUTE_EARPIECE;
}
return routeMask;
}
@@ -164,29 +162,29 @@
// Since they are mutually exclusive and one is ALWAYS valid, we allow a special input of
// ROUTE_WIRED_OR_EARPIECE so that callers don't have to make a call to check which is
// supported before calling setAudioRoute.
- if (route == CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE) {
- route = CallAudioStateCompat.ROUTE_WIRED_OR_EARPIECE & supportedRouteMask;
+ if (route == CallAudioState.ROUTE_WIRED_OR_EARPIECE) {
+ route = CallAudioState.ROUTE_WIRED_OR_EARPIECE & supportedRouteMask;
if (route == 0) {
Log.wtf(TAG, "One of wired headset or earpiece should always be valid.");
// assume earpiece in this case.
- route = CallAudioStateCompat.ROUTE_EARPIECE;
+ route = CallAudioState.ROUTE_EARPIECE;
}
}
return route;
}
- private void setSystemAudioState(CallAudioStateCompat callAudioState) {
- CallAudioStateCompat oldAudioState = mCallAudioState;
+ private void setSystemAudioState(CallAudioState callAudioState) {
+ CallAudioState oldAudioState = mCallAudioState;
mCallAudioState = callAudioState;
Log.i(TAG, "setSystemAudioState: changing from " + oldAudioState + " to "
+ mCallAudioState);
// Audio route.
- if (mCallAudioState.getRoute() == CallAudioStateCompat.ROUTE_SPEAKER) {
+ if (mCallAudioState.getRoute() == CallAudioState.ROUTE_SPEAKER) {
turnOnSpeaker(true);
- } else if (mCallAudioState.getRoute() == CallAudioStateCompat.ROUTE_EARPIECE ||
- mCallAudioState.getRoute() == CallAudioStateCompat.ROUTE_WIRED_HEADSET) {
+ } else if (mCallAudioState.getRoute() == CallAudioState.ROUTE_EARPIECE ||
+ mCallAudioState.getRoute() == CallAudioState.ROUTE_WIRED_HEADSET) {
// Just handle turning off the speaker, the system will handle switching between wired
// headset and earpiece.
turnOnSpeaker(false);
@@ -199,4 +197,4 @@
mAudioManager.setSpeakerphoneOn(on);
}
}
-}
\ No newline at end of file
+}
diff --git a/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java b/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java
index 0e032c1..680afb1 100644
--- a/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java
+++ b/tests/src/com/android/dialer/calllog/ContactInfoHelperTest.java
@@ -63,7 +63,7 @@
public void testLookupContactFromUri_NoResults() {
setUpQueryExpectations(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
- PhoneQuery.PHONE_LOOKUP_PROJECTION);
+ PhoneQuery.getPhoneLookupProjection(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI));
Assert.assertEquals(ContactInfo.EMPTY, mContactInfoHelper.lookupContactFromUri(
PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI, false));
@@ -72,7 +72,8 @@
public void testLookupContactFromUri_NoDisplayNameAlternative() {
setUpQueryExpectations(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
- PhoneQuery.PHONE_LOOKUP_PROJECTION, TEST_LOOKUP_ROW);
+ PhoneQuery.getPhoneLookupProjection(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI),
+ TEST_LOOKUP_ROW);
setUpQueryExpectations(displayNameAlternativeUri,
PhoneQuery.DISPLAY_NAME_ALTERNATIVE_PROJECTION);
@@ -85,7 +86,8 @@
public void testLookupContactFromUri_HasDisplayNameAlternative() {
setUpQueryExpectations(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
- PhoneQuery.PHONE_LOOKUP_PROJECTION, TEST_LOOKUP_ROW);
+ PhoneQuery.getPhoneLookupProjection(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI),
+ TEST_LOOKUP_ROW);
setUpQueryExpectations(displayNameAlternativeUri,
PhoneQuery.DISPLAY_NAME_ALTERNATIVE_PROJECTION, TEST_DISPLAY_NAME_ALTERNATIVE_ROW);
diff --git a/tools/gradle/android.properties b/tools/gradle/android.properties
new file mode 100644
index 0000000..fd1f721
--- /dev/null
+++ b/tools/gradle/android.properties
@@ -0,0 +1,2 @@
+compileSdkVersion 24
+buildToolsVersion = '24.0.0'
diff --git a/tools/gradle/gradlew b/tools/gradle/gradlew
new file mode 100755
index 0000000..7f33f9d
--- /dev/null
+++ b/tools/gradle/gradlew
@@ -0,0 +1,204 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+# TODO(jpd): b/15773596 - This is broken because we symlinked
+# gradlew and the build server can't clean it up. Don't resolve
+# links.
+#while [ -h "$PRG" ] ; do
+# ls=`ls -ld "$PRG"`
+# link=`expr "$ls" : '.*-> \(.*\)$'`
+# if expr "$link" : '/.*' > /dev/null; then
+# PRG="$link"
+# else
+# PRG=`dirname "$PRG"`"/$link"
+# fi
+#done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+if [ $(basename `pwd`) == "gradle" ]; then
+ echo "This cannot be run here. It should be copied to the root of the platform."
+ exit
+else
+ CLASSPATH=./gradle/wrapper/gradle-wrapper.jar
+fi
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+# For reproducible builds, always use the SDKs stored in source control
+if $darwin; then
+ ANDROID_HOME="$APP_HOME/prebuilts/fullsdk/darwin"
+else
+ ANDROID_HOME="$APP_HOME/prebuilts/fullsdk/linux"
+fi
+export ANDROID_HOME
+
+# Change the project's .gradle to the android out dir.
+ANDROID_OUT_ROOT="$APP_HOME/out"
+if [[ -n "$OUT_DIR" ]]; then
+ ANDROID_OUT_ROOT="$OUT_DIR"
+fi
+
+ANDROID_CACHE_DIR="$ANDROID_OUT_ROOT/gradle/.gradle"
+
+# Prevent excess parallelization on the build servers, as it slows the
+# build to a crawl
+if [[ "$1" == --parallel-threads=* ]] && [[ "$2" == buildForBuildServer* ]]; then
+ set -- "--parallel-threads=4" "$2"
+fi
+
+# Change the local user directories to be under the android out dir
+export GRADLE_USER_HOME="$ANDROID_OUT_ROOT/gradle/.gradle"
+export M2_HOME="$ANDROID_OUT_ROOT/gradle/.m2"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ --project-cache-dir=$ANDROID_CACHE_DIR \
+ -Dorg.gradle.jvmargs="-Xmx4096m -XX:MaxPermSize=1024m" \
+ --configure-on-demand \
+ "$@"
diff --git a/tools/gradle/repositories.properties b/tools/gradle/repositories.properties
new file mode 100644
index 0000000..ffdd0d2
--- /dev/null
+++ b/tools/gradle/repositories.properties
@@ -0,0 +1 @@
+// Empty for now
diff --git a/tools/gradle/settings.gradle b/tools/gradle/settings.gradle
new file mode 100644
index 0000000..52541af
--- /dev/null
+++ b/tools/gradle/settings.gradle
@@ -0,0 +1,63 @@
+include 'android-common'
+project(':android-common').projectDir = new File(rootDir, 'frameworks/ex/common')
+
+include 'aplos'
+project(':aplos').projectDir = new File(rootDir, 'vendor/unbundled_google/libs/aplos')
+project(':aplos').buildFileName = 'build-split.gradle'
+
+include 'bind'
+project(':bind').projectDir = new File(rootDir, 'vendor/unbundled_google/libraries/bind')
+
+include 'gdata'
+project(':gdata').projectDir = new File(rootDir, 'vendor/unbundled_google/libraries/gdata')
+
+include 'golly'
+project(':golly').projectDir = new File(rootDir, 'vendor/unbundled_google/libraries/golly')
+
+include 'gsf-client'
+project(':gsf-client').projectDir = new File(rootDir, 'vendor/unbundled_google/libraries/gsfclient')
+
+include 'jsr305'
+project(':jsr305').projectDir = new File(rootDir, 'external/jsr305')
+
+include 'guava'
+project(':guava').projectDir = new File(rootDir, 'external/guava')
+
+include 'libphonenumber'
+project(':libphonenumber').projectDir = new File(rootDir, 'external/libphonenumber')
+project(':libphonenumber').buildFileName = 'build-full.gradle'
+
+include 'libprotobuf'
+project(':libprotobuf').projectDir = new File(rootDir, 'external/protobuf')
+
+include 'pseudonymous-http'
+project(':pseudonymous-http').projectDir = new File(rootDir, 'vendor/unbundled_google/libraries/pseudonymous_http')
+
+include 's2utils'
+project(':s2utils').projectDir = new File(rootDir, 'external/s2utils')
+
+include 'smslib_pduutils'
+project(':smslib_pduutils').projectDir = new File(rootDir, 'external/smslib_pduutils')
+
+include 'volley'
+project(':volley').projectDir = new File(rootDir, 'frameworks/volley')
+project(':volley').buildFileName = 'rules.gradle'
+
+include 'vcard'
+project(':vcard').projectDir = new File(rootDir, 'frameworks/opt/vcard')
+
+include 'PhoneCommon'
+project(':PhoneCommon').projectDir = new File(rootDir, 'packages/apps/PhoneCommon')
+
+include 'ContactsCommon'
+project(':ContactsCommon').projectDir = new File(rootDir, 'packages/apps/ContactsCommon')
+
+include 'InCallUI'
+project(':InCallUI').projectDir = new File(rootDir, 'packages/apps/Dialer/InCallUI')
+
+include 'dialer'
+project(':dialer').projectDir = new File(rootDir, 'packages/apps/Dialer')
+project(':dialer').buildFileName = 'build-app.gradle'
+
+include 'googledialer'
+project(':googledialer').projectDir = new File(rootDir, 'vendor/unbundled_google/packages/GoogleDialer')