From 1019500220518fb5fb023fcb7d370ab3cbf12307 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Thu, 16 Mar 2017 11:07:39 -0700 Subject: Update dialer to tap green cl 150332012. Test: Treehugger Change-Id: If2baab1d3fc2dee602a4f784bba532182e7174f5 --- .../res/drawable-hdpi/ic_voicemail_avatar.png | Bin 3607 -> 2856 bytes .../res/drawable-mdpi/ic_voicemail_avatar.png | Bin 2120 -> 1752 bytes .../res/drawable-xhdpi/ic_voicemail_avatar.png | Bin 4894 -> 3783 bytes .../res/drawable-xxhdpi/ic_voicemail_avatar.png | Bin 7976 -> 6206 bytes .../res/drawable-xxxhdpi/ic_voicemail_avatar.png | Bin 11277 -> 8570 bytes .../dialer/app/calllog/PhoneAccountHandles.java | 15 +++ .../app/voicemail/error/VoicemailErrorAlert.java | 2 +- .../res/layout/voicemai_error_message_fragment.xml | 113 -------------------- .../layout/voicemail_error_message_fragment.xml | 113 ++++++++++++++++++++ .../android/dialer/binary/aosp/AndroidManifest.xml | 116 --------------------- .../dialer/calldetails/CallDetailsAdapter.java | 5 +- .../res/drawable/multimedia_image_background.xml | 2 +- .../res/layout/call_details_activity.xml | 33 +++--- .../calldetails/res/layout/contact_container.xml | 33 +++--- .../calldetails/res/layout/ec_data_container.xml | 34 +++--- .../dialer/calldetails/res/values/dimens.xml | 2 +- .../dialer/calllogutils/res/values/colors.xml | 2 +- .../dialer/calllogutils/res/values/strings.xml | 8 +- java/com/android/dialer/debug/AndroidManifest.xml | 3 - .../dialer/debug/bindings/impl/DebugBindings.java | 32 ------ .../dialer/debug/bindings/stub/DebugBindings.java | 27 ----- .../android/dialer/debug/impl/AndroidManifest.xml | 18 ---- .../android/dialer/debug/impl/DebugConnection.java | 55 ---------- .../dialer/debug/impl/DebugConnectionService.java | 103 ------------------ .../enrichedcall/FuzzyPhoneNumberMatcher.java | 15 +++ .../enrichedcall/historyquery/HistoryQuery.java | 15 +++ .../videoshare/VideoShareListener.java | 15 +++ java/com/android/dialer/oem/MotorolaUtils.java | 15 +++ .../simulator/impl/SimulatorActionProvider.java | 10 ++ .../com/android/dialer/theme/res/values/dimens.xml | 4 +- .../impl/answermethod/FlingUpDownMethod.java | 4 - .../impl/GoogleLocationSettingHelper.java | 3 +- .../incallui/calllocation/impl/HttpFetcher.java | 2 - .../incallui/incall/impl/FakeDragAnimation.java | 62 ----------- .../incallui/incall/impl/InCallFragment.java | 15 +-- .../voicemail/impl/sync/OmtpVvmSyncService.java | 2 +- .../voicemail/impl/sync/VoicemailsQueryHelper.java | 5 +- 37 files changed, 279 insertions(+), 604 deletions(-) delete mode 100644 java/com/android/dialer/app/voicemail/error/res/layout/voicemai_error_message_fragment.xml create mode 100644 java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml delete mode 100644 java/com/android/dialer/binary/aosp/AndroidManifest.xml delete mode 100644 java/com/android/dialer/debug/AndroidManifest.xml delete mode 100644 java/com/android/dialer/debug/bindings/impl/DebugBindings.java delete mode 100644 java/com/android/dialer/debug/bindings/stub/DebugBindings.java delete mode 100644 java/com/android/dialer/debug/impl/AndroidManifest.xml delete mode 100644 java/com/android/dialer/debug/impl/DebugConnection.java delete mode 100644 java/com/android/dialer/debug/impl/DebugConnectionService.java delete mode 100644 java/com/android/incallui/incall/impl/FakeDragAnimation.java (limited to 'java') 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 c74bfab13..2121878ae 100644 Binary files a/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png and b/java/com/android/contacts/common/res/drawable-hdpi/ic_voicemail_avatar.png 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 a5a30213d..a7875c5de 100644 Binary files a/java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png and b/java/com/android/contacts/common/res/drawable-mdpi/ic_voicemail_avatar.png 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 ca9d7d66b..8dc1d595b 100644 Binary files a/java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png and b/java/com/android/contacts/common/res/drawable-xhdpi/ic_voicemail_avatar.png 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 d0979e9eb..5d22cbeea 100644 Binary files a/java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png and b/java/com/android/contacts/common/res/drawable-xxhdpi/ic_voicemail_avatar.png 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 1d6e1aa0f..762b63648 100644 Binary files a/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png and b/java/com/android/contacts/common/res/drawable-xxxhdpi/ic_voicemail_avatar.png differ diff --git a/java/com/android/dialer/app/calllog/PhoneAccountHandles.java b/java/com/android/dialer/app/calllog/PhoneAccountHandles.java index 6d51b853c..b0fa1ed45 100644 --- a/java/com/android/dialer/app/calllog/PhoneAccountHandles.java +++ b/java/com/android/dialer/app/calllog/PhoneAccountHandles.java @@ -1,3 +1,18 @@ +/* + * 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 d34a0f3c7..628ef87eb 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.voicemai_error_message_fragment); + view = alertManager.inflate(R.layout.voicemail_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/voicemai_error_message_fragment.xml b/java/com/android/dialer/app/voicemail/error/res/layout/voicemai_error_message_fragment.xml deleted file mode 100644 index 4a40857a0..000000000 --- a/java/com/android/dialer/app/voicemail/error/res/layout/voicemai_error_message_fragment.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/voicemail_error_message_fragment.xml new file mode 100644 index 000000000..4a40857a0 --- /dev/null +++ b/java/com/android/dialer/app/voicemail/error/res/layout/voicemail_error_message_fragment.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/com/android/dialer/binary/aosp/AndroidManifest.xml b/java/com/android/dialer/binary/aosp/AndroidManifest.xml deleted file mode 100644 index 63edb8397..000000000 --- a/java/com/android/dialer/binary/aosp/AndroidManifest.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/com/android/dialer/calldetails/CallDetailsAdapter.java b/java/com/android/dialer/calldetails/CallDetailsAdapter.java index 954583077..7471c9c1e 100644 --- a/java/com/android/dialer/calldetails/CallDetailsAdapter.java +++ b/java/com/android/dialer/calldetails/CallDetailsAdapter.java @@ -71,11 +71,12 @@ public class CallDetailsAdapter extends RecyclerView.Adapter 0 && 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 421bdbfee..8182e247a 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 @@ --> - + 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 038a8745e..79f283705 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,24 +14,25 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> - + + 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/recycler_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/background_dialer_white"/> \ 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 95fe189b2..bcda55e11 100644 --- a/java/com/android/dialer/calldetails/res/layout/contact_container.xml +++ b/java/com/android/dialer/calldetails/res/layout/contact_container.xml @@ -18,6 +18,7 @@ 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"> @@ -25,27 +26,31 @@ 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"/> - + android:layout_centerVertical="true"> - + + + + - @@ -8,6 +9,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" + android:layout_marginStart="1dp" android:maxLines="2" style="@style/SecondaryText"/> @@ -22,21 +24,21 @@ android:outlineProvider="background" android:visibility="gone"> - + - + \ 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 b1a8f1c8e..59f237103 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 --> - 2dp 16sp 14sp + 6dp 16dp diff --git a/java/com/android/dialer/calllogutils/res/values/colors.xml b/java/com/android/dialer/calllogutils/res/values/colors.xml index dc4ec2493..e0e6fb2a5 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 @@ --> - #ff2e58 + #C53929 #00c853 diff --git a/java/com/android/dialer/calllogutils/res/values/strings.xml b/java/com/android/dialer/calllogutils/res/values/strings.xml index 6a6f10113..01a5a9b87 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 @@ Voicemail - - %s min %s sec + + %sm %ss - - %s sec + + %ss \ No newline at end of file diff --git a/java/com/android/dialer/debug/AndroidManifest.xml b/java/com/android/dialer/debug/AndroidManifest.xml deleted file mode 100644 index 053d7e789..000000000 --- a/java/com/android/dialer/debug/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/java/com/android/dialer/debug/bindings/impl/DebugBindings.java b/java/com/android/dialer/debug/bindings/impl/DebugBindings.java deleted file mode 100644 index a8b44605c..000000000 --- a/java/com/android/dialer/debug/bindings/impl/DebugBindings.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 deleted file mode 100644 index 7df38341d..000000000 --- a/java/com/android/dialer/debug/bindings/stub/DebugBindings.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 deleted file mode 100644 index b8756614b..000000000 --- a/java/com/android/dialer/debug/impl/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/java/com/android/dialer/debug/impl/DebugConnection.java b/java/com/android/dialer/debug/impl/DebugConnection.java deleted file mode 100644 index 2ef83aa76..000000000 --- a/java/com/android/dialer/debug/impl/DebugConnection.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 deleted file mode 100644 index 69aab1e13..000000000 --- a/java/com/android/dialer/debug/impl/DebugConnectionService.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 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 f589f94a6..250c64313 100644 --- a/java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java +++ b/java/com/android/dialer/enrichedcall/FuzzyPhoneNumberMatcher.java @@ -1,3 +1,18 @@ +/* + * 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 b7593cebb..e61c79ec8 100644 --- a/java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java +++ b/java/com/android/dialer/enrichedcall/historyquery/HistoryQuery.java @@ -1,3 +1,18 @@ +/* + * 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 bcc387a3f..f24724afd 100644 --- a/java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java +++ b/java/com/android/dialer/enrichedcall/videoshare/VideoShareListener.java @@ -1,3 +1,18 @@ +/* + * 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 29bf0b23d..e31ec98b8 100644 --- a/java/com/android/dialer/oem/MotorolaUtils.java +++ b/java/com/android/dialer/oem/MotorolaUtils.java @@ -1,3 +1,18 @@ +/* + * 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 6cd573361..4acb548a6 100644 --- a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java +++ b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java @@ -17,7 +17,9 @@ 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; @@ -72,6 +74,14 @@ 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 fa750c625..373b33dfc 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 @@ 107dp 72dp - 20sp - 14sp + 14sp + 12sp 4dp diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java index 6e8e1f7bf..587b923c4 100644 --- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java +++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java @@ -388,10 +388,6 @@ 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 18a80b8ce..bcb3e8dbb 100644 --- a/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java +++ b/java/com/android/incallui/calllocation/impl/GoogleLocationSettingHelper.java @@ -28,8 +28,7 @@ import android.provider.Settings.SettingNotFoundException; import com.android.dialer.common.LogUtil; /** - * 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 + * Helper class to check if Google Location Services is enabled. */ public class GoogleLocationSettingHelper { diff --git a/java/com/android/incallui/calllocation/impl/HttpFetcher.java b/java/com/android/incallui/calllocation/impl/HttpFetcher.java index 7bfbaa6ef..c4aaa2257 100644 --- a/java/com/android/incallui/calllocation/impl/HttpFetcher.java +++ b/java/com/android/incallui/calllocation/impl/HttpFetcher.java @@ -223,8 +223,6 @@ public class HttpFetcher { /** * Lookup up url re-write rules from gServices and apply to the given url. * - *

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 deleted file mode 100644 index c84c3c409..000000000 --- a/java/com/android/incallui/incall/impl/FakeDragAnimation.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 3f31651a0..b6ae4902a 100644 --- a/java/com/android/incallui/incall/impl/InCallFragment.java +++ b/java/com/android/incallui/incall/impl/InCallFragment.java @@ -253,13 +253,16 @@ public class InCallFragment extends Fragment if (!stateRestored) { new Handler() .postDelayed( - () -> { - // 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(); + 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()); + } }, - 333); + 2000); } } 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 c255019fc..2c706d2a8 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 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 d129406ff..fc8119a80 100644 --- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java +++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java @@ -272,14 +272,15 @@ public class VoicemailsQueryHelper { String sortAndLimit = "date ASC limit " + numVoicemails; try (Cursor cursor = - mContentResolver.query(mSourceUri, null, ARCHIVED_SELECTION, null, sortAndLimit)) { + mContentResolver.query(mSourceUri, PROJECTION, ARCHIVED_SELECTION, null, sortAndLimit)) { Assert.isNotNull(cursor); List voicemails = new ArrayList<>(); while (cursor.moveToNext()) { + final long id = cursor.getLong(_ID); final String sourceData = cursor.getString(SOURCE_DATA); - Voicemail voicemail = Voicemail.createForUpdate(cursor.getLong(_ID), sourceData).build(); + Voicemail voicemail = Voicemail.createForUpdate(id, sourceData).build(); voicemails.add(voicemail); } -- cgit v1.2.3