summaryrefslogtreecommitdiffstats
path: root/java/com/android
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2017-03-16 20:19:43 +0000
committerSailesh Nepal <sail@google.com>2017-03-16 20:19:43 +0000
commit2df4538eb90b896be15eebc1d9adf1206131c8a3 (patch)
treeb54abbb51fb7d66e7755a1fbb5db023ff601090b /java/com/android
parent1019500220518fb5fb023fcb7d370ab3cbf12307 (diff)
downloadandroid_packages_apps_Dialer-2df4538eb90b896be15eebc1d9adf1206131c8a3.tar.gz
android_packages_apps_Dialer-2df4538eb90b896be15eebc1d9adf1206131c8a3.tar.bz2
android_packages_apps_Dialer-2df4538eb90b896be15eebc1d9adf1206131c8a3.zip
Revert "Update dialer to tap green cl 150332012."
This reverts commit 1019500220518fb5fb023fcb7d370ab3cbf12307. Change-Id: Ie6e4f81a995fca7345132b596521b0bd06ceffb9
Diffstat (limited to 'java/com/android')
-rw-r--r--java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.pngbin2856 -> 3607 bytes
-rw-r--r--java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.pngbin1752 -> 2120 bytes
-rw-r--r--java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.pngbin3783 -> 4894 bytes
-rw-r--r--java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.pngbin6206 -> 7976 bytes
-rw-r--r--java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.pngbin8570 -> 11277 bytes
-rw-r--r--java/com/android/dialer/app/calllog/PhoneAccountHandles.java15
-rw-r--r--java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java2
-rw-r--r--java/com/android/dialer/app/voicemail/error/res/layout/voicemai_error_message_fragment.xml (renamed from java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml)0
-rw-r--r--java/com/android/dialer/binary/aosp/AndroidManifest.xml116
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsAdapter.java5
-rw-r--r--java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml2
-rw-r--r--java/com/android/dialer/calldetails/res/layout/call_details_activity.xml33
-rw-r--r--java/com/android/dialer/calldetails/res/layout/contact_container.xml33
-rw-r--r--java/com/android/dialer/calldetails/res/layout/ec_data_container.xml34
-rw-r--r--java/com/android/dialer/calldetails/res/values/dimens.xml2
-rw-r--r--java/com/android/dialer/calllogutils/res/values/colors.xml2
-rw-r--r--java/com/android/dialer/calllogutils/res/values/strings.xml8
-rw-r--r--java/com/android/dialer/debug/AndroidManifest.xml3
-rw-r--r--java/com/android/dialer/debug/bindings/impl/DebugBindings.java32
-rw-r--r--java/com/android/dialer/debug/bindings/stub/DebugBindings.java27
-rw-r--r--java/com/android/dialer/debug/impl/AndroidManifest.xml18
-rw-r--r--java/com/android/dialer/debug/impl/DebugConnection.java55
-rw-r--r--java/com/android/dialer/debug/impl/DebugConnectionService.java103
-rw-r--r--java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java15
-rw-r--r--java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java15
-rw-r--r--java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java15
-rw-r--r--java/com/android/dialer/oem/MotorolaUtils.java15
-rw-r--r--java/com/android/dialer/simulator/impl/SimulatorActionProvider.java10
-rw-r--r--java/com/android/dialer/theme/res/values/dimens.xml4
-rw-r--r--java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java4
-rw-r--r--java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java3
-rw-r--r--java/com/android/incallui/calllocation/impl/HttpFetcher.java2
-rw-r--r--java/com/android/incallui/incall/impl/FakeDragAnimation.java62
-rw-r--r--java/com/android/incallui/incall/impl/InCallFragment.java15
-rw-r--r--java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java2
-rw-r--r--java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java5
36 files changed, 491 insertions, 166 deletions
diff --git a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png
index 2121878ae..c74bfab13 100644
--- a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png
+++ b/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png
Binary files differ
diff --git a/java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png
index a7875c5de..a5a30213d 100644
--- a/java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png
+++ b/java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png
Binary files differ
diff --git a/java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png
index 8dc1d595b..ca9d7d66b 100644
--- a/java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png
+++ b/java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png
Binary files differ
diff --git a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png
index 5d22cbeea..d0979e9eb 100644
--- a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png
+++ b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png
Binary files differ
diff --git a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png
index 762b63648..1d6e1aa0f 100644
--- a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png
+++ b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png
Binary files differ
diff --git a/java/com/android/dialer/app/calllog/PhoneAccountHandles.java b/java/com/android/dialer/app/calllog/PhoneAccountHandles.java
index b0fa1ed45..6d51b853c 100644
--- a/java/com/android/dialer/app/calllog/PhoneAccountHandles.java
+++ b/java/com/android/dialer/app/calllog/PhoneAccountHandles.java
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2017 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.app.calllog;
import android.content.ComponentName;
diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java b/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java
index 628ef87eb..d34a0f3c7 100644
--- a/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java
+++ b/java/com/android/dialer/app/voicemail/error/VoicemailErrorAlert.java
@@ -56,7 +56,7 @@ public class VoicemailErrorAlert {
this.modalAlertManager = modalAlertManager;
this.messageCreator = messageCreator;
- view = alertManager.inflate(R.layout.voicemail_error_message_fragment);
+ view = alertManager.inflate(R.layout.voicemai_error_message_fragment);
header = (TextView) view.findViewById(R.id.error_card_header);
details = (TextView) view.findViewById(R.id.error_card_details);
primaryAction = (TextView) view.findViewById(R.id.primary_action);
diff --git a/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml b/java/com/android/dialer/app/voicemail/error/res/layout/voicemai_error_message_fragment.xml
index 4a40857a0..4a40857a0 100644
--- a/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml
+++ b/java/com/android/dialer/app/voicemail/error/res/layout/voicemai_error_message_fragment.xml
diff --git a/java/com/android/dialer/binary/aosp/AndroidManifest.xml b/java/com/android/dialer/binary/aosp/AndroidManifest.xml
new file mode 100644
index 000000000..63edb8397
--- /dev/null
+++ b/java/com/android/dialer/binary/aosp/AndroidManifest.xml
@@ -0,0 +1,116 @@
+<!-- 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"
+ coreApp="true"
+ package="com.android.dialer"
+ android:versionCode="100000"
+ android:versionName="10.0">
+
+ <uses-sdk
+ android:minSdkVersion="23"
+ android:targetSdkVersion="25"/>
+
+ <uses-permission android:name="android.permission.CALL_PHONE"/>
+ <uses-permission android:name="android.permission.READ_CONTACTS"/>
+ <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
+ <uses-permission android:name="android.permission.READ_CALL_LOG"/>
+ <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
+ <uses-permission android:name="android.permission.READ_PROFILE"/>
+ <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
+ <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
+ <uses-permission android:name="android.permission.GET_ACCOUNTS_PRIVILEGED"/>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
+ <uses-permission android:name="android.permission.NFC"/>
+ <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
+ <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
+ <uses-permission android:name="android.permission.USE_CREDENTIALS"/>
+ <uses-permission android:name="android.permission.VIBRATE"/>
+ <uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
+ <uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"/>
+ <uses-permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL"/>
+ <uses-permission android:name="com.android.voicemail.permission.READ_VOICEMAIL"/>
+ <uses-permission android:name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"/>
+ <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
+ <uses-permission android:name="android.permission.BROADCAST_STICKY"/>
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.SEND_SMS"/>
+
+ <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
+ <!-- We use this to disable the status bar buttons of home, back and recent
+ during an incoming call. By doing so this allows us to not show the user
+ is viewing the activity in full screen alert, on a fresh system/factory
+ reset state of the app. -->
+ <uses-permission android:name="android.permission.STATUS_BAR"/>
+ <uses-permission android:name="android.permission.CAMERA"/>
+
+ <!-- This tells the activity manager to not delay any of our activity
+ start requests, even if they happen immediately after the user
+ presses home. -->
+ <uses-permission android:name="android.permission.STOP_APP_SWITCHES"/>
+
+ <!-- Permissions needed for badger count showing on launch icon. -->
+
+ <!--for Samsung-->
+ <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/>
+ <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>
+
+ <!--for htc-->
+ <uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/>
+ <uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/>
+
+ <!--for sony-->
+ <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
+ <uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>
+
+ <!--for apex-->
+ <uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/>
+
+ <!--for solid-->
+ <uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>
+
+ <!--for huawei-->
+ <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE"/>
+ <uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS"/>
+ <uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS"/>
+
+ <!--for ZUK-->
+ <uses-permission android:name="android.permission.READ_APP_BADGE"/>
+
+ <!--for OPPO-->
+ <uses-permission android:name="com.oppo.launcher.permission.READ_SETTINGS"/>
+ <uses-permission android:name="com.oppo.launcher.permission.WRITE_SETTINGS"/>
+
+ <application
+ android:backupAgent='com.android.dialer.backup.DialerBackupAgent'
+ android:fullBackupOnly="true"
+ android:restoreAnyVersion="true"
+ android:hardwareAccelerated="true"
+ android:icon="@mipmap/ic_launcher_phone"
+ android:label="@string/applicationLabel"
+ android:name="com.android.dialer.binary.aosp.AospDialerApplication"
+ android:supportsRtl="true"
+ android:usesCleartextTraffic="false">
+ </application>
+
+</manifest>
diff --git a/java/com/android/dialer/calldetails/CallDetailsAdapter.java b/java/com/android/dialer/calldetails/CallDetailsAdapter.java
index 7471c9c1e..954583077 100644
--- a/java/com/android/dialer/calldetails/CallDetailsAdapter.java
+++ b/java/com/android/dialer/calldetails/CallDetailsAdapter.java
@@ -71,12 +71,11 @@ public class CallDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
((CallDetailsFooterViewHolder) holder).setPhoneNumber(contact.number);
} else {
CallDetailsEntryViewHolder viewHolder = (CallDetailsEntryViewHolder) holder;
- CallDetailsEntry entry = callDetailsEntries[position - 1];
viewHolder.setCallDetails(
contact.number,
- entry,
+ callDetailsEntries[position - 1],
callTypeHelper,
- entry.historyResults.length > 0 && position != getItemCount() - 2);
+ position != getItemCount() - 2);
}
}
diff --git a/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml b/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml
index 8182e247a..421bdbfee 100644
--- a/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml
+++ b/java/com/android/dialer/calldetails/res/drawable/multimedia_image_background.xml
@@ -16,5 +16,5 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
- <corners android:radius="8dp"/>
+ <corners android:radius="2dp"/>
</shape>
diff --git a/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml b/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml
index 79f283705..038a8745e 100644
--- a/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml
+++ b/java/com/android/dialer/calldetails/res/layout/call_details_activity.xml
@@ -14,25 +14,24 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:background="@color/dialer_theme_color"
- android:elevation="4dp"
- android:titleTextAppearance="@style/toolbar_title_text"
- android:title="@string/call_details"
- android:navigationIcon="@drawable/quantum_ic_arrow_back_white_24"/>
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ android:background="@color/dialer_theme_color"
+ android:elevation="4dp"
+ android:titleTextAppearance="@style/toolbar_title_text"
+ android:title="@string/call_details"
+ android:navigationIcon="@drawable/quantum_ic_arrow_back_white_24"/>
<android.support.v7.widget.RecyclerView
- android:id="@+id/recycler_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@color/background_dialer_white"/>
+ android:id="@+id/recycler_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/background_dialer_white"/>
</LinearLayout> \ No newline at end of file
diff --git a/java/com/android/dialer/calldetails/res/layout/contact_container.xml b/java/com/android/dialer/calldetails/res/layout/contact_container.xml
index bcda55e11..95fe189b2 100644
--- a/java/com/android/dialer/calldetails/res/layout/contact_container.xml
+++ b/java/com/android/dialer/calldetails/res/layout/contact_container.xml
@@ -18,7 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/call_details_top_margin"
android:gravity="center_vertical"
android:padding="@dimen/contact_container_padding">
@@ -26,31 +25,27 @@
android:id="@+id/quick_contact_photo"
android:layout_width="@dimen/call_details_contact_photo_size"
android:layout_height="@dimen/call_details_contact_photo_size"
- android:layout_marginTop="2dp"
android:focusable="true"/>
- <LinearLayout
- android:orientation="vertical"
+ <TextView
+ android:id="@+id/contact_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/text_bottom_margin"
+ android:layout_marginStart="@dimen/photo_text_margin"
android:layout_toEndOf="@+id/quick_contact_photo"
android:layout_toStartOf="@+id/call_back_button"
- android:layout_centerVertical="true">
+ style="@style/PrimaryText"/>
- <TextView
- android:id="@+id/contact_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/photo_text_margin"
- style="@style/PrimaryText"/>
-
- <TextView
- android:id="@+id/phone_number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/photo_text_margin"
- style="@style/SecondaryText"/>
- </LinearLayout>
+ <TextView
+ android:id="@+id/phone_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/photo_text_margin"
+ android:layout_toEndOf="@+id/quick_contact_photo"
+ android:layout_toStartOf="@+id/call_back_button"
+ android:layout_below="@+id/contact_name"
+ style="@style/SecondaryText"/>
<ImageView
android:id="@+id/call_back_button"
diff --git a/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml b/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml
index 85cc4ed62..5ad7912fa 100644
--- a/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml
+++ b/java/com/android/dialer/calldetails/res/layout/ec_data_container.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/ec_container_height">
@@ -9,7 +8,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
- android:layout_marginStart="1dp"
android:maxLines="2"
style="@style/SecondaryText"/>
@@ -24,21 +22,21 @@
android:outlineProvider="background"
android:visibility="gone">
- <ImageView
- android:id="@+id/multimedia_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="centerCrop"/>
+ <ImageView
+ android:id="@+id/multimedia_image"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop"/>
- <TextView
- android:id="@+id/multimedia_attachments_number"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:textColor="@color/background_dialer_white"
- android:textSize="20sp"
- android:fontFamily="sans-serif-medium"
- android:background="#80000000"
- android:gravity="center"
- android:visibility="gone"/>
+ <com.android.incallui.autoresizetext.AutoResizeTextView
+ android:id="@+id/multimedia_attachments_number"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="4dp"
+ android:gravity="center"
+ android:textColor="@color/background_dialer_white"
+ android:textSize="100sp"
+ android:background="#80000000"
+ android:visibility="gone"/>
</FrameLayout>
</RelativeLayout> \ No newline at end of file
diff --git a/java/com/android/dialer/calldetails/res/values/dimens.xml b/java/com/android/dialer/calldetails/res/values/dimens.xml
index 59f237103..b1a8f1c8e 100644
--- a/java/com/android/dialer/calldetails/res/values/dimens.xml
+++ b/java/com/android/dialer/calldetails/res/values/dimens.xml
@@ -15,9 +15,9 @@
~ limitations under the License
-->
<resources>
+ <dimen name="text_bottom_margin">2dp</dimen>
<dimen name="call_details_primary_text_size">16sp</dimen>
<dimen name="call_details_secondary_text_size">14sp</dimen>
- <dimen name="call_details_top_margin">6dp</dimen>
<!-- contact container -->
<dimen name="contact_container_padding">16dp</dimen>
diff --git a/java/com/android/dialer/calllogutils/res/values/colors.xml b/java/com/android/dialer/calllogutils/res/values/colors.xml
index e0e6fb2a5..dc4ec2493 100644
--- a/java/com/android/dialer/calllogutils/res/values/colors.xml
+++ b/java/com/android/dialer/calllogutils/res/values/colors.xml
@@ -16,7 +16,7 @@
-->
<resources>
<!-- Color for missed call icons. -->
- <color name="missed_call">#C53929</color>
+ <color name="missed_call">#ff2e58</color>
<!-- Color for answered or outgoing call icons. -->
<color name="answered_call">#00c853</color>
<!-- Color for blocked call icons. -->
diff --git a/java/com/android/dialer/calllogutils/res/values/strings.xml b/java/com/android/dialer/calllogutils/res/values/strings.xml
index 01a5a9b87..6a6f10113 100644
--- a/java/com/android/dialer/calllogutils/res/values/strings.xml
+++ b/java/com/android/dialer/calllogutils/res/values/strings.xml
@@ -82,9 +82,9 @@
<!-- String used for displaying calls to the voicemail number in the call log -->
<string name="voicemail_string">Voicemail</string>
- <!-- A nicely formatted call duration displayed when viewing call details. For example "42m 28s" -->
- <string name="call_details_duration_format"><xliff:g example="42" id="minutes">%s</xliff:g>m <xliff:g example="28" id="seconds">%s</xliff:g>s</string>
+ <!-- A nicely formatted call duration displayed when viewing call details. For example "42 min 28 sec" -->
+ <string name="call_details_duration_format"><xliff:g example="42" id="minutes">%s</xliff:g> min <xliff:g example="28" id="seconds">%s</xliff:g> sec</string>
- <!-- A nicely formatted call duration displayed when viewing call details for duration less than 1 minute. For example "28s" -->
- <string name="call_details_short_duration_format"><xliff:g example="28" id="seconds">%s</xliff:g>s</string>
+ <!-- A nicely formatted call duration displayed when viewing call details for duration less than 1 minute. For example "28 sec" -->
+ <string name="call_details_short_duration_format"><xliff:g example="28" id="seconds">%s</xliff:g> sec</string>
</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/debug/AndroidManifest.xml b/java/com/android/dialer/debug/AndroidManifest.xml
new file mode 100644
index 000000000..053d7e789
--- /dev/null
+++ b/java/com/android/dialer/debug/AndroidManifest.xml
@@ -0,0 +1,3 @@
+<manifest
+ package="com.android.dialer.debug">
+</manifest>
diff --git a/java/com/android/dialer/debug/bindings/impl/DebugBindings.java b/java/com/android/dialer/debug/bindings/impl/DebugBindings.java
new file mode 100644
index 000000000..a8b44605c
--- /dev/null
+++ b/java/com/android/dialer/debug/bindings/impl/DebugBindings.java
@@ -0,0 +1,32 @@
+/*
+ * 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.debug.bindings;
+
+import android.content.Context;
+import com.android.dialer.debug.impl.DebugConnectionService;
+
+/** Hooks into the debug module. */
+public class DebugBindings {
+
+ public static void registerConnectionService(Context context) {
+ DebugConnectionService.register(context);
+ }
+
+ public static void addNewIncomingCall(Context context, String phoneNumber) {
+ DebugConnectionService.addNewIncomingCall(context, phoneNumber);
+ }
+}
diff --git a/java/com/android/dialer/debug/bindings/stub/DebugBindings.java b/java/com/android/dialer/debug/bindings/stub/DebugBindings.java
new file mode 100644
index 000000000..7df38341d
--- /dev/null
+++ b/java/com/android/dialer/debug/bindings/stub/DebugBindings.java
@@ -0,0 +1,27 @@
+/*
+ * 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.debug.bindings;
+
+import android.content.Context;
+
+/** Hooks into the debug module. */
+public class DebugBindings {
+
+ public static void registerConnectionService(Context context) {}
+
+ public static void addNewIncomingCall(Context context, String phoneNumber) {}
+}
diff --git a/java/com/android/dialer/debug/impl/AndroidManifest.xml b/java/com/android/dialer/debug/impl/AndroidManifest.xml
new file mode 100644
index 000000000..b8756614b
--- /dev/null
+++ b/java/com/android/dialer/debug/impl/AndroidManifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.dialer.debug.impl">
+
+ <application>
+
+ <service
+ android:exported="true"
+ android:name=".DebugConnectionService"
+ android:permission="android.permission.BIND_CONNECTION_SERVICE">
+ <intent-filter>
+ <action android:name="android.telecomm.ConnectionService"/>
+ </intent-filter>
+ </service>
+
+ </application>
+
+</manifest>
diff --git a/java/com/android/dialer/debug/impl/DebugConnection.java b/java/com/android/dialer/debug/impl/DebugConnection.java
new file mode 100644
index 000000000..2ef83aa76
--- /dev/null
+++ b/java/com/android/dialer/debug/impl/DebugConnection.java
@@ -0,0 +1,55 @@
+/*
+ * 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.debug.impl;
+
+import android.telecom.Connection;
+import android.telecom.DisconnectCause;
+import com.android.dialer.common.LogUtil;
+
+class DebugConnection extends Connection {
+
+ @Override
+ public void onAnswer() {
+ LogUtil.i("DebugConnection.onAnswer", null);
+ setActive();
+ }
+
+ @Override
+ public void onReject() {
+ LogUtil.i("DebugConnection.onReject", null);
+ setDisconnected(new DisconnectCause(DisconnectCause.REJECTED));
+ }
+
+ @Override
+ public void onHold() {
+ LogUtil.i("DebugConnection.onHold", null);
+ setOnHold();
+ }
+
+ @Override
+ public void onUnhold() {
+ LogUtil.i("DebugConnection.onUnhold", null);
+ setActive();
+ }
+
+ @Override
+ public void onDisconnect() {
+ LogUtil.i("DebugConnection.onDisconnect", null);
+ setDisconnected(new DisconnectCause(DisconnectCause.LOCAL));
+ destroy();
+ }
+}
diff --git a/java/com/android/dialer/debug/impl/DebugConnectionService.java b/java/com/android/dialer/debug/impl/DebugConnectionService.java
new file mode 100644
index 000000000..69aab1e13
--- /dev/null
+++ b/java/com/android/dialer/debug/impl/DebugConnectionService.java
@@ -0,0 +1,103 @@
+/*
+ * 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.debug.impl;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.net.Uri;
+import android.os.Bundle;
+import android.telecom.Connection;
+import android.telecom.ConnectionRequest;
+import android.telecom.ConnectionService;
+import android.telecom.PhoneAccount;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+import android.telephony.TelephonyManager;
+import com.android.dialer.common.LogUtil;
+import java.util.ArrayList;
+import java.util.List;
+
+/** Simple connection provider to create an incoming call. This is useful for emulators. */
+public class DebugConnectionService extends ConnectionService {
+
+ private static final String PHONE_ACCOUNT_ID = "DEBUG_DIALER";
+
+ public static void register(Context context) {
+ LogUtil.i(
+ "DebugConnectionService.register",
+ context.getSystemService(Context.TELECOM_SERVICE).toString());
+ context.getSystemService(TelecomManager.class).registerPhoneAccount(buildPhoneAccount(context));
+ }
+
+ public static void addNewIncomingCall(Context context, String phoneNumber) {
+ LogUtil.i("DebugConnectionService.addNewIncomingCall", null);
+ Bundle bundle = new Bundle();
+ bundle.putString(TelephonyManager.EXTRA_INCOMING_NUMBER, phoneNumber);
+ try {
+ context
+ .getSystemService(TelecomManager.class)
+ .addNewIncomingCall(getConnectionServiceHandle(context), bundle);
+ } catch (SecurityException e) {
+ LogUtil.i(
+ "DebugConnectionService.addNewIncomingCall",
+ "unable to add call. Make sure to enable the service in Phone app -> Settings -> Calls ->"
+ + " Calling accounts.");
+ }
+ }
+
+ private static PhoneAccount buildPhoneAccount(Context context) {
+ PhoneAccount.Builder builder =
+ new PhoneAccount.Builder(
+ getConnectionServiceHandle(context), "DebugDialerConnectionService");
+ List<String> uriSchemes = new ArrayList<>();
+ uriSchemes.add(PhoneAccount.SCHEME_TEL);
+
+ return builder
+ .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)
+ .setShortDescription("Debug Dialer Connection Serivce")
+ .setSupportedUriSchemes(uriSchemes)
+ .build();
+ }
+
+ private static PhoneAccountHandle getConnectionServiceHandle(Context context) {
+ ComponentName componentName = new ComponentName(context, DebugConnectionService.class);
+ return new PhoneAccountHandle(componentName, PHONE_ACCOUNT_ID);
+ }
+
+ private static Uri getPhoneNumber(ConnectionRequest request) {
+ String phoneNumber = request.getExtras().getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
+ return Uri.fromParts(PhoneAccount.SCHEME_TEL, phoneNumber, null);
+ }
+
+ @Override
+ public Connection onCreateOutgoingConnection(
+ PhoneAccountHandle phoneAccount, ConnectionRequest request) {
+ return null;
+ }
+
+ @Override
+ public Connection onCreateIncomingConnection(
+ PhoneAccountHandle phoneAccount, ConnectionRequest request) {
+ LogUtil.i("DebugConnectionService.onCreateIncomingConnection", null);
+ DebugConnection connection = new DebugConnection();
+ connection.setRinging();
+ connection.setAddress(getPhoneNumber(request), TelecomManager.PRESENTATION_ALLOWED);
+ connection.setConnectionCapabilities(
+ Connection.CAPABILITY_MUTE | Connection.CAPABILITY_SUPPORT_HOLD);
+ return connection;
+ }
+}
diff --git a/java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java b/java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java
index 250c64313..f589f94a6 100644
--- a/java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java
+++ b/java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2017 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.enrichedcall;
import android.support.annotation.NonNull;
diff --git a/java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java b/java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java
index e61c79ec8..b7593cebb 100644
--- a/java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java
+++ b/java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2017 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.enrichedcall.historyquery;
import android.support.annotation.NonNull;
diff --git a/java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java b/java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java
index f24724afd..bcc387a3f 100644
--- a/java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java
+++ b/java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2017 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.enrichedcall.videoshare;
import android.support.annotation.MainThread;
diff --git a/java/com/android/dialer/oem/MotorolaUtils.java b/java/com/android/dialer/oem/MotorolaUtils.java
index e31ec98b8..29bf0b23d 100644
--- a/java/com/android/dialer/oem/MotorolaUtils.java
+++ b/java/com/android/dialer/oem/MotorolaUtils.java
@@ -1,18 +1,3 @@
-/*
- * Copyright (C) 2017 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.oem;
import android.content.Context;
diff --git a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java
index 4acb548a6..6cd573361 100644
--- a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java
+++ b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java
@@ -17,9 +17,7 @@
package com.android.dialer.simulator.impl;
import android.content.Context;
-import android.content.Intent;
import android.os.AsyncTask;
-import android.provider.VoicemailContract;
import android.support.annotation.NonNull;
import android.view.ActionProvider;
import android.view.MenuItem;
@@ -74,14 +72,6 @@ final class SimulatorActionProvider extends ActionProvider {
populateDatabase();
return true;
});
- subMenu
- .add("Sync Voicemail")
- .setOnMenuItemClickListener(
- (item) -> {
- Intent intent = new Intent(VoicemailContract.ACTION_SYNC_VOICEMAIL);
- context.sendBroadcast(intent);
- return true;
- });
}
private void populateDatabase() {
diff --git a/java/com/android/dialer/theme/res/values/dimens.xml b/java/com/android/dialer/theme/res/values/dimens.xml
index 373b33dfc..fa750c625 100644
--- a/java/com/android/dialer/theme/res/values/dimens.xml
+++ b/java/com/android/dialer/theme/res/values/dimens.xml
@@ -26,8 +26,8 @@
<dimen name="actionbar_and_tab_height">107dp</dimen>
<dimen name="actionbar_contentInsetStart">72dp</dimen>
- <dimen name="toolbar_title_text_size">14sp</dimen>
- <dimen name="toolbar_subtitle_text_size">12sp</dimen>
+ <dimen name="toolbar_title_text_size">20sp</dimen>
+ <dimen name="toolbar_subtitle_text_size">14sp</dimen>
<dimen name="call_log_icon_margin">4dp</dimen>
</resources>
diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
index 587b923c4..6e8e1f7bf 100644
--- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
+++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
@@ -388,6 +388,10 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged
// Since the animation progression is controlled by user gesture instead of real timeline, the
// spec timeline can be divided into 9 slots. Each slot is equivalent to 83ms in the spec.
// Therefore, we use 9 slots of 83ms to map user gesture into the spec timeline.
+ //
+ // See specs -
+ // Accept: https://direct.googleplex.com/#/spec/8510001
+ // Decline: https://direct.googleplex.com/#/spec/3850001
final float progressSlots = 9;
// Fade out the "swipe up to answer". It only takes 1 slot to complete the fade.
diff --git a/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java b/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java
index bcb3e8dbb..18a80b8ce 100644
--- a/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java
+++ b/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java
@@ -28,7 +28,8 @@ import android.provider.Settings.SettingNotFoundException;
import com.android.dialer.common.LogUtil;
/**
- * Helper class to check if Google Location Services is enabled.
+ * Helper class to check if Google Location Services is enabled. This class is based on
+ * https://docs.google.com/a/google.com/document/d/1sGm8pHgGY1QmxbLCwTZuWQASEDN7CFW9EPSZXAuGQfo
*/
public class GoogleLocationSettingHelper {
diff --git a/java/com/android/incallui/calllocation/impl/HttpFetcher.java b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
index c4aaa2257..7bfbaa6ef 100644
--- a/java/com/android/incallui/calllocation/impl/HttpFetcher.java
+++ b/java/com/android/incallui/calllocation/impl/HttpFetcher.java
@@ -223,6 +223,8 @@ public class HttpFetcher {
/**
* Lookup up url re-write rules from gServices and apply to the given url.
*
+ * <p>https://wiki.corp.google.com/twiki/bin/view/Main/AndroidGservices#URL_Rewriting_Rules
+ *
* @return The new url.
*/
private static URL reWriteUrl(Context context, String url) {
diff --git a/java/com/android/incallui/incall/impl/FakeDragAnimation.java b/java/com/android/incallui/incall/impl/FakeDragAnimation.java
new file mode 100644
index 000000000..c84c3c409
--- /dev/null
+++ b/java/com/android/incallui/incall/impl/FakeDragAnimation.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2017 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.incall.impl;
+
+import android.animation.ValueAnimator;
+import android.animation.ValueAnimator.AnimatorUpdateListener;
+import android.support.v4.view.ViewPager;
+import android.support.v4.view.animation.FastOutSlowInInterpolator;
+
+/**
+ * An animation that controls the fake drag of a {@link ViewPager}. See {@link
+ * ViewPager#fakeDragBy(float)} for more details.
+ */
+public class FakeDragAnimation implements AnimatorUpdateListener {
+
+ /** The view to animate. */
+ private final ViewPager pager;
+
+ private final ValueAnimator animator;
+ private int oldDragPosition;
+
+ public FakeDragAnimation(ViewPager pager) {
+ this.pager = pager;
+ animator = ValueAnimator.ofInt(0, pager.getWidth());
+ animator.addUpdateListener(this);
+ animator.setInterpolator(new FastOutSlowInInterpolator());
+ animator.setDuration(600);
+ }
+
+ public void start() {
+ animator.start();
+ }
+
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ if (!pager.isFakeDragging()) {
+ pager.beginFakeDrag();
+ }
+ int dragPosition = (Integer) animation.getAnimatedValue();
+ int dragOffset = dragPosition - oldDragPosition;
+ oldDragPosition = dragPosition;
+ pager.fakeDragBy(-dragOffset);
+
+ if (animation.getAnimatedFraction() == 1) {
+ pager.endFakeDrag();
+ }
+ }
+}
diff --git a/java/com/android/incallui/incall/impl/InCallFragment.java b/java/com/android/incallui/incall/impl/InCallFragment.java
index b6ae4902a..3f31651a0 100644
--- a/java/com/android/incallui/incall/impl/InCallFragment.java
+++ b/java/com/android/incallui/incall/impl/InCallFragment.java
@@ -253,16 +253,13 @@ public class InCallFragment extends Fragment
if (!stateRestored) {
new Handler()
.postDelayed(
- new Runnable() {
- @Override
- public void run() {
- // In order to prevent user confusion and educate the user on our UI, we animate
- // the view pager to the button grid after 2 seconds show them when the UI is
- // that they are more familiar with.
- pager.setCurrentItem(adapter.getButtonGridPosition());
- }
+ () -> {
+ // In order to prevent user confusion and educate the user on our UI, we animate
+ // the view pager to the button grid after a short period to show them where the
+ // UI that they are more familiar with is located.
+ new FakeDragAnimation(pager).start();
},
- 2000);
+ 333);
}
} else {
tabLayout.setVisibility(View.GONE);
diff --git a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
index 2c706d2a8..c255019fc 100644
--- a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
+++ b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
@@ -180,7 +180,7 @@ public class OmtpVvmSyncService {
// The number of voicemails that exceed our threshold and should be deleted from the server
int numVoicemails =
imapHelper.getOccuupiedQuota()
- - (int) (AUTO_DELETE_ARCHIVE_VM_THRESHOLD * imapHelper.getTotalQuota());
+ - ((int) AUTO_DELETE_ARCHIVE_VM_THRESHOLD * imapHelper.getTotalQuota());
List<Voicemail> oldestVoicemails = mQueryHelper.oldestVoicemailsOnServer(numVoicemails);
if (!oldestVoicemails.isEmpty()) {
mQueryHelper.markArchivedInDatabase(oldestVoicemails);
diff --git a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
index fc8119a80..d129406ff 100644
--- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
+++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
@@ -272,15 +272,14 @@ public class VoicemailsQueryHelper {
String sortAndLimit = "date ASC limit " + numVoicemails;
try (Cursor cursor =
- mContentResolver.query(mSourceUri, PROJECTION, ARCHIVED_SELECTION, null, sortAndLimit)) {
+ mContentResolver.query(mSourceUri, null, ARCHIVED_SELECTION, null, sortAndLimit)) {
Assert.isNotNull(cursor);
List<Voicemail> voicemails = new ArrayList<>();
while (cursor.moveToNext()) {
- final long id = cursor.getLong(_ID);
final String sourceData = cursor.getString(SOURCE_DATA);
- Voicemail voicemail = Voicemail.createForUpdate(id, sourceData).build();
+ Voicemail voicemail = Voicemail.createForUpdate(cursor.getLong(_ID), sourceData).build();
voicemails.add(voicemail);
}