diff options
41 files changed, 770 insertions, 97 deletions
diff --git a/Android.mk b/Android.mk index dc34cc4a4..15bf8bcae 100644 --- a/Android.mk +++ b/Android.mk @@ -33,7 +33,6 @@ SRC_DIRS := \ # Exclude files incompatible with AOSP. EXCLUDE_FILES := \ - $(BASE_DIR)/dialer/calllog/testing/FakeCallLogApplication.java \ $(BASE_DIR)/incallui/calllocation/impl/AuthException.java \ $(BASE_DIR)/incallui/calllocation/impl/CallLocationImpl.java \ $(BASE_DIR)/incallui/calllocation/impl/CallLocationModule.java \ @@ -54,6 +53,16 @@ EXCLUDE_FILES := \ EXCLUDE_FILES += \ $(BASE_DIR)/contacts/common/format/testing/SpannedTestUtils.java +# Exclude build variants for now +EXCLUDE_FILES += \ + $(BASE_DIR)/dialer/buildtype/bugfood/BuildTypeAccessorImpl.java \ + $(BASE_DIR)/dialer/buildtype/dogfood/BuildTypeAccessorImpl.java \ + $(BASE_DIR)/dialer/buildtype/fishfood/BuildTypeAccessorImpl.java \ + $(BASE_DIR)/dialer/buildtype/test/BuildTypeAccessorImpl.java \ + $(BASE_DIR)/dialer/constants/googledialer/ConstantsImpl.java \ + $(BASE_DIR)/dialer/binary/google/GoogleStubDialerRootComponent.java \ + $(BASE_DIR)/dialer/binary/google/GoogleStubDialerApplication.java + # All Dialers resources. # find . -type d -name "res" | uniq | sort RES_DIRS := \ @@ -74,22 +83,23 @@ RES_DIRS := \ $(BASE_DIR)/dialer/contactactions/res \ $(BASE_DIR)/dialer/contactsfragment/res \ $(BASE_DIR)/dialer/dialpadview/res \ + $(BASE_DIR)/dialer/enrichedcall/simulator/res \ $(BASE_DIR)/dialer/interactions/res \ $(BASE_DIR)/dialer/main/impl/res \ $(BASE_DIR)/dialer/notification/res \ $(BASE_DIR)/dialer/oem/res \ $(BASE_DIR)/dialer/phonenumberutil/res \ $(BASE_DIR)/dialer/postcall/res \ + $(BASE_DIR)/dialer/searchfragment/common/res \ $(BASE_DIR)/dialer/searchfragment/list/res \ $(BASE_DIR)/dialer/searchfragment/nearbyplaces/res \ - $(BASE_DIR)/dialer/searchfragment/common/res \ + $(BASE_DIR)/dialershared/bubble/res \ $(BASE_DIR)/dialer/shortcuts/res \ $(BASE_DIR)/dialer/speeddial/res \ $(BASE_DIR)/dialer/theme/res \ $(BASE_DIR)/dialer/util/res \ $(BASE_DIR)/dialer/voicemailstatus/res \ $(BASE_DIR)/dialer/widget/res \ - $(BASE_DIR)/dialershared/bubble/res \ $(BASE_DIR)/incallui/answer/impl/affordance/res \ $(BASE_DIR)/incallui/answer/impl/answermethod/res \ $(BASE_DIR)/incallui/answer/impl/hint/res \ @@ -132,15 +142,17 @@ DIALER_MANIFEST_FILES += \ $(BASE_DIR)/dialer/contactactions/AndroidManifest.xml \ $(BASE_DIR)/dialer/contactsfragment/AndroidManifest.xml \ $(BASE_DIR)/dialer/dialpadview/AndroidManifest.xml \ + $(BASE_DIR)/dialer/enrichedcall/simulator/AndroidManifest.xml \ $(BASE_DIR)/dialer/interactions/AndroidManifest.xml \ $(BASE_DIR)/dialer/main/impl/AndroidManifest.xml \ $(BASE_DIR)/dialer/notification/AndroidManifest.xml \ $(BASE_DIR)/dialer/oem/AndroidManifest.xml \ $(BASE_DIR)/dialer/phonenumberutil/AndroidManifest.xml \ $(BASE_DIR)/dialer/postcall/AndroidManifest.xml \ + $(BASE_DIR)/dialer/searchfragment/common/AndroidManifest.xml \ $(BASE_DIR)/dialer/searchfragment/list/AndroidManifest.xml \ $(BASE_DIR)/dialer/searchfragment/nearbyplaces/AndroidManifest.xml \ - $(BASE_DIR)/dialer/searchfragment/common/AndroidManifest.xml \ + $(BASE_DIR)/dialershared/bubble/AndroidManifest.xml \ $(BASE_DIR)/dialer/shortcuts/AndroidManifest.xml \ $(BASE_DIR)/dialer/simulator/impl/AndroidManifest.xml \ $(BASE_DIR)/dialer/speeddial/AndroidManifest.xml \ @@ -148,7 +160,6 @@ DIALER_MANIFEST_FILES += \ $(BASE_DIR)/dialer/util/AndroidManifest.xml \ $(BASE_DIR)/dialer/voicemailstatus/AndroidManifest.xml \ $(BASE_DIR)/dialer/widget/AndroidManifest.xml \ - $(BASE_DIR)/dialershared/bubble/AndroidManifest.xml \ $(BASE_DIR)/incallui/AndroidManifest.xml \ $(BASE_DIR)/incallui/answer/impl/affordance/AndroidManifest.xml \ $(BASE_DIR)/incallui/answer/impl/AndroidManifest.xml \ @@ -166,8 +177,8 @@ DIALER_MANIFEST_FILES += \ $(BASE_DIR)/incallui/video/impl/AndroidManifest.xml \ $(BASE_DIR)/incallui/video/protocol/AndroidManifest.xml \ $(BASE_DIR)/incallui/wifi/AndroidManifest.xml \ - $(BASE_DIR)/voicemail/impl/AndroidManifest.xml \ $(BASE_DIR)/voicemail/AndroidManifest.xml \ + $(BASE_DIR)/voicemail/impl/AndroidManifest.xml \ # Merge all manifest files. @@ -206,22 +217,23 @@ LOCAL_AAPT_FLAGS := \ --extra-packages com.android.dialer.contactactions \ --extra-packages com.android.dialer.contactsfragment \ --extra-packages com.android.dialer.dialpadview \ + --extra-packages com.android.dialer.enrichedcall.simulator \ --extra-packages com.android.dialer.interactions \ --extra-packages com.android.dialer.main.impl \ --extra-packages com.android.dialer.notification \ --extra-packages com.android.dialer.oem \ --extra-packages com.android.dialer.phonenumberutil \ --extra-packages com.android.dialer.postcall \ + --extra-packages com.android.dialer.searchfragment.common \ --extra-packages com.android.dialer.searchfragment.list \ --extra-packages com.android.dialer.searchfragment.nearbyplaces \ - --extra-packages com.android.dialer.searchfragment.common \ + --extra-packages com.android.dialershared.bubble \ --extra-packages com.android.dialer.shortcuts \ --extra-packages com.android.dialer.speeddial \ --extra-packages com.android.dialer.theme \ --extra-packages com.android.dialer.util \ --extra-packages com.android.dialer.voicemailstatus \ --extra-packages com.android.dialer.widget \ - --extra-packages com.android.dialershared.bubble \ --extra-packages com.android.incallui \ --extra-packages com.android.incallui.answer.impl \ --extra-packages com.android.incallui.answer.impl.affordance \ @@ -249,7 +261,8 @@ LOCAL_AAPT_FLAGS := \ --extra-packages com.android.voicemail.impl.fetch \ --extra-packages com.android.voicemail.impl.settings \ --extra-packages com.android.voicemail.settings \ - --extra-packages me.leolin.shortcutbadger + --extra-packages me.leolin.shortcutbadger \ + LOCAL_STATIC_JAVA_LIBRARIES := \ android-common \ @@ -260,12 +273,12 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ dialer-disklrucache-target \ dialer-gifdecoder-target \ dialer-glide-target \ - dialer-guava-target \ dialer-grpc-all-target \ dialer-grpc-core-target \ dialer-grpc-okhttp-target \ dialer-grpc-protobuf-lite-target \ dialer-grpc-stub-target \ + dialer-guava-target \ dialer-javax-annotation-api-target \ dialer-javax-inject-target \ dialer-libshortcutbadger-target \ @@ -285,18 +298,18 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \ android-support-v7-recyclerview \ LOCAL_JAVA_LIBRARIES := \ - org.apache.http.legacy \ dialer-auto-value \ + org.apache.http.legacy \ # Libraries needed by the compiler (JACK) to generate code. PROCESSOR_LIBRARIES_TARGET := \ - dialer-dagger2-compiler \ + dialer-auto-value \ dialer-dagger2 \ + dialer-dagger2-compiler \ dialer-dagger2-producers \ dialer-guava \ dialer-javax-annotation-api \ dialer-javax-inject \ - dialer-auto-value \ # Resolve the jar paths. PROCESSOR_JARS := $(call java-lib-deps, $(PROCESSOR_LIBRARIES_TARGET)) @@ -352,16 +365,16 @@ PROCESSOR_JARS := include $(CLEAR_VARS) LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ - dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.7/dagger-compiler-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-auto-value:../../../prebuilts/tools/common/m2/repository/com/google/auto/value/auto-value/1.3/auto-value-1.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ + dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.7/dagger-compiler-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-dagger2:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.7/dagger-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.7/dagger-producers-2.7$(COMMON_JAVA_PACKAGE_SUFFIX) \ - dialer-guava:../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/20.0/guava-20.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-grpc-all:../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-all/1.0.3/grpc-all-1.0.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-grpc-core:../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-core/1.0.3/grpc-core-1.0.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-grpc-okhttp:../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-okhttp/1.0.3/grpc-okhttp-1.0.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-grpc-protobuf-lite:../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-protobuf-lite/1.0.3/grpc-protobuf-lite-1.0.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-grpc-stub:../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-stub/1.0.3/grpc-stub-1.0.3$(COMMON_JAVA_PACKAGE_SUFFIX) \ + dialer-guava:../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/20.0/guava-20.0$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-javax-annotation-api:../../../prebuilts/tools/common/m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2$(COMMON_JAVA_PACKAGE_SUFFIX) \ dialer-javax-inject:../../../prebuilts/tools/common/m2/repository/javax/inject/javax.inject/1/javax.inject-1$(COMMON_JAVA_PACKAGE_SUFFIX) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 8dc9f6bb9..f9abe4364 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -114,6 +114,7 @@ android:usesCleartextTraffic="false"> + </application> </manifest> diff --git a/CONTRIBUTING b/CONTRIBUTING deleted file mode 100644 index 2827b7d3f..000000000 --- a/CONTRIBUTING +++ /dev/null @@ -1,27 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement] -(https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. We -use Github pull requests for this purpose. - -### The small print -Contributions made by corporations are covered by a different agreement than -the one above, the -[Software Grant and Corporate Contributor License Agreement] -(https://cla.developers.google.com/about/google-corporate). diff --git a/java/com/android/contacts/common/res/values/colors.xml b/java/com/android/contacts/common/res/values/colors.xml index 434d193c7..20b28c9d9 100644 --- a/java/com/android/contacts/common/res/values/colors.xml +++ b/java/com/android/contacts/common/res/values/colors.xml @@ -60,6 +60,7 @@ <color name="textColorIconOverlayShadow">#000</color> + <array name="letter_tile_colors"> <item>#DB4437</item> <item>#E91E63</item> diff --git a/java/com/android/dialer/about/res/raw/third_party_license_metadata b/java/com/android/dialer/about/res/raw/third_party_license_metadata index 1acf3480c..1acf3480c 100644..100755 --- a/java/com/android/dialer/about/res/raw/third_party_license_metadata +++ b/java/com/android/dialer/about/res/raw/third_party_license_metadata diff --git a/java/com/android/dialer/about/res/raw/third_party_licenses b/java/com/android/dialer/about/res/raw/third_party_licenses index c56f8a42c..c56f8a42c 100644..100755 --- a/java/com/android/dialer/about/res/raw/third_party_licenses +++ b/java/com/android/dialer/about/res/raw/third_party_licenses diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png Binary files differindex 4e0d5649e..4e0d5649e 100644..100755 --- a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png +++ b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_add_call.png diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png Binary files differindex 2cf41d598..2cf41d598 100644..100755 --- a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png +++ b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_current_call.png diff --git a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png Binary files differindex 043685fd9..043685fd9 100644..100755 --- a/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png +++ b/java/com/android/dialer/app/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png diff --git a/java/com/android/dialer/binary/google/AndroidManifest.xml b/java/com/android/dialer/binary/google/AndroidManifest.xml new file mode 100644 index 000000000..f393b8b11 --- /dev/null +++ b/java/com/android/dialer/binary/google/AndroidManifest.xml @@ -0,0 +1,118 @@ +<!-- 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.google.android.google_stub_dialer" + android:versionCode="140000" + android:versionName="11.0"> + + <uses-sdk + android:minSdkVersion="23" + android:targetSdkVersion="26"/> + + <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.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.google.GoogleStubDialerApplication" + android:supportsRtl="true" + android:usesCleartextTraffic="false"> + + + + </application> + +</manifest> diff --git a/java/com/android/dialer/binary/google/GoogleStubDialerApplication.java b/java/com/android/dialer/binary/google/GoogleStubDialerApplication.java new file mode 100644 index 000000000..e9289af73 --- /dev/null +++ b/java/com/android/dialer/binary/google/GoogleStubDialerApplication.java @@ -0,0 +1,37 @@ +/* + * 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.binary.google; + +import android.support.annotation.NonNull; +import com.android.dialer.binary.common.DialerApplication; +import com.android.dialer.inject.ContextModule; + +/** + * The application class for the Google Stub Dialer. This is a version of the Dialer app that + * depends on Google Play Services. + */ +public class GoogleStubDialerApplication extends DialerApplication { + + /** Returns a new instance of the root component for the Google Stub Dialer. */ + @Override + @NonNull + protected Object buildRootComponent() { + return DaggerGoogleStubDialerRootComponent.builder() + .contextModule(new ContextModule(this)) + .build(); + } +} diff --git a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java new file mode 100644 index 000000000..2b4de974b --- /dev/null +++ b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java @@ -0,0 +1,52 @@ +/* + * 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.binary.google; + +import com.android.dialer.binary.basecomponent.BaseDialerRootComponent; +import com.android.dialer.calllog.CallLogModule; +import com.android.dialer.common.concurrent.DialerExecutorModule; +import com.android.dialer.configprovider.SharedPrefConfigProviderModule; +import com.android.dialer.enrichedcall.stub.StubEnrichedCallModule; +import com.android.dialer.inject.ContextModule; +import com.android.dialer.lightbringer.stub.StubLightbringerModule; +import com.android.dialer.simulator.impl.SimulatorModule; +import com.android.incallui.calllocation.impl.CallLocationModule; +import com.android.incallui.maps.impl.MapsModule; +import com.android.voicemail.impl.VoicemailModule; +import dagger.Component; +import javax.inject.Singleton; + +/** + * Root component for the Google Stub Dialer application. Unlike the AOSP variant, this component + * can pull in modules that depend on Google Play Services like the maps module. + */ +@Singleton +@Component( + modules = { + CallLocationModule.class, + CallLogModule.class, + ContextModule.class, + DialerExecutorModule.class, + SharedPrefConfigProviderModule.class, + SimulatorModule.class, + StubEnrichedCallModule.class, + MapsModule.class, + VoicemailModule.class, + StubLightbringerModule.class + } +) +public interface GoogleStubDialerRootComponent extends BaseDialerRootComponent {} diff --git a/java/com/android/dialer/buildtype/bugfood/BuildTypeAccessorImpl.java b/java/com/android/dialer/buildtype/bugfood/BuildTypeAccessorImpl.java new file mode 100644 index 000000000..45d72e05c --- /dev/null +++ b/java/com/android/dialer/buildtype/bugfood/BuildTypeAccessorImpl.java @@ -0,0 +1,30 @@ +/* + * 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.buildtype; + +import com.android.dialer.proguard.UsedByReflection; + +/** Gets the build type. */ +@UsedByReflection(value = "BuildType.java") +public class BuildTypeAccessorImpl implements BuildTypeAccessor { + + @Override + @BuildType.Type + public int getBuildType() { + return BuildType.BUGFOOD; + } +} diff --git a/java/com/android/dialer/buildtype/dogfood/BuildTypeAccessorImpl.java b/java/com/android/dialer/buildtype/dogfood/BuildTypeAccessorImpl.java new file mode 100644 index 000000000..e1f2cdc79 --- /dev/null +++ b/java/com/android/dialer/buildtype/dogfood/BuildTypeAccessorImpl.java @@ -0,0 +1,30 @@ +/* + * 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.buildtype; + +import com.android.dialer.proguard.UsedByReflection; + +/** Gets the build type. */ +@UsedByReflection(value = "BuildType.java") +public class BuildTypeAccessorImpl implements BuildTypeAccessor { + + @Override + @BuildType.Type + public int getBuildType() { + return BuildType.DOGFOOD; + } +} diff --git a/java/com/android/dialer/buildtype/fishfood/BuildTypeAccessorImpl.java b/java/com/android/dialer/buildtype/fishfood/BuildTypeAccessorImpl.java new file mode 100644 index 000000000..e5ad9015f --- /dev/null +++ b/java/com/android/dialer/buildtype/fishfood/BuildTypeAccessorImpl.java @@ -0,0 +1,30 @@ +/* + * 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.buildtype; + +import com.android.dialer.proguard.UsedByReflection; + +/** Gets the build type. */ +@UsedByReflection(value = "BuildType.java") +public class BuildTypeAccessorImpl implements BuildTypeAccessor { + + @Override + @BuildType.Type + public int getBuildType() { + return BuildType.FISHFOOD; + } +} diff --git a/java/com/android/dialer/buildtype/test/BuildTypeAccessorImpl.java b/java/com/android/dialer/buildtype/test/BuildTypeAccessorImpl.java new file mode 100644 index 000000000..80a1cb728 --- /dev/null +++ b/java/com/android/dialer/buildtype/test/BuildTypeAccessorImpl.java @@ -0,0 +1,30 @@ +/* + * 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.buildtype; + +import com.android.dialer.proguard.UsedByReflection; + +/** Gets the build type. */ +@UsedByReflection(value = "BuildType.java") +public class BuildTypeAccessorImpl implements BuildTypeAccessor { + + @Override + @BuildType.Type + public int getBuildType() { + return BuildType.TEST; + } +} diff --git a/java/com/android/dialer/callintent/call_initiation_type.proto b/java/com/android/dialer/callintent/call_initiation_type.proto index 994399fd9..3caf0305b 100644 --- a/java/com/android/dialer/callintent/call_initiation_type.proto +++ b/java/com/android/dialer/callintent/call_initiation_type.proto @@ -7,6 +7,7 @@ option optimize_for = LITE_RUNTIME; package com.android.dialer.callintent; + // Different ways a call can be initiated. message CallInitiationType { enum Type { diff --git a/java/com/android/dialer/calllog/testing/FakeCallLogApplication.java b/java/com/android/dialer/calllog/testing/FakeCallLogApplication.java deleted file mode 100644 index 8aee7dd56..000000000 --- a/java/com/android/dialer/calllog/testing/FakeCallLogApplication.java +++ /dev/null @@ -1,53 +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.dialer.calllog.testing; - -import android.app.Application; -import com.android.dialer.calllog.CallLogComponent; -import com.android.dialer.calllog.CallLogModule; -import com.android.dialer.calllog.database.CallLogDatabaseComponent; -import com.android.dialer.common.concurrent.DialerExecutorComponent; -import com.android.dialer.common.concurrent.testing.TestDialerExecutorModule; -import com.android.dialer.inject.ContextModule; -import com.android.dialer.inject.HasRootComponent; -import dagger.Component; -import javax.inject.Singleton; - -/** - * Fake application for call log robolectric tests which uses all real bindings but doesn't require - * tests to depend on and use all of DialerApplication. - */ -public final class FakeCallLogApplication extends Application implements HasRootComponent { - private Object rootComponent; - - @Override - public final synchronized Object component() { - if (rootComponent == null) { - rootComponent = - DaggerFakeCallLogApplication_FakeComponent.builder() - .contextModule(new ContextModule(this)) - .build(); - } - return rootComponent; - } - - @Singleton - @Component(modules = {CallLogModule.class, ContextModule.class, TestDialerExecutorModule.class}) - interface FakeComponent - extends CallLogDatabaseComponent.HasComponent, - CallLogComponent.HasComponent, - DialerExecutorComponent.HasComponent {} -} diff --git a/java/com/android/dialer/constants/googledialer/ConstantsImpl.java b/java/com/android/dialer/constants/googledialer/ConstantsImpl.java new file mode 100644 index 000000000..28d8b2514 --- /dev/null +++ b/java/com/android/dialer/constants/googledialer/ConstantsImpl.java @@ -0,0 +1,43 @@ +/* + * 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.constants; + +import android.support.annotation.NonNull; +import com.android.dialer.proguard.UsedByReflection; + +/** Provider config values for Google Dialer. */ +@UsedByReflection(value = "Constants.java") +public class ConstantsImpl extends Constants { + + @Override + @NonNull + public String getFilteredNumberProviderAuthority() { + return "com.google.android.dialer.blocking.filterednumberprovider"; + } + + @Override + @NonNull + public String getFileProviderAuthority() { + return "com.google.android.dialer.files"; + } + + @NonNull + @Override + public String getAnnotatedCallLogProviderAuthority() { + return "com.google.android.dialer.annotatedcalllog"; + } +} diff --git a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java index 0d3ed9e43..b97e6adaf 100644 --- a/java/com/android/dialer/enrichedcall/EnrichedCallManager.java +++ b/java/com/android/dialer/enrichedcall/EnrichedCallManager.java @@ -185,6 +185,15 @@ public interface EnrichedCallManager { @Nullable Session getSession(long sessionId); + /** + * Returns a list containing viewable string representations of all existing sessions. + * + * <p>Intended for debug display purposes only. + */ + @MainThread + @NonNull + List<String> getAllSessionsForDisplay(); + @NonNull Filter createIncomingCallComposerFilter(); diff --git a/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml b/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml new file mode 100644 index 000000000..003ff19d5 --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/AndroidManifest.xml @@ -0,0 +1,26 @@ +<!-- + ~ 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 + --> +<manifest + xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.dialer.calldetails"> + <application android:theme="@style/Theme.AppCompat"> + <activity + android:label="@string/enriched_call_simulator_activity" + android:name="com.android.dialer.enrichedcall.simulator.EnrichedCallSimulatorActivity" + android:theme="@style/DialerThemeBase.NoActionBar"> + </activity> + </application> +</manifest> diff --git a/java/com/android/dialer/enrichedcall/simulator/EnrichedCallSimulatorActivity.java b/java/com/android/dialer/enrichedcall/simulator/EnrichedCallSimulatorActivity.java new file mode 100644 index 000000000..bbc1ada6f --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/EnrichedCallSimulatorActivity.java @@ -0,0 +1,110 @@ +/* + * 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.simulator; + +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.Toolbar; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; +import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; +import com.android.dialer.enrichedcall.EnrichedCallComponent; +import com.android.dialer.enrichedcall.EnrichedCallManager; +import com.android.dialer.enrichedcall.EnrichedCallManager.StateChangedListener; + +/** + * Activity used to display Enriched call sessions that are currently in memory, and create new + * outgoing sessions with various bits of data. + * + * <p>This activity will dynamically refresh as new sessions are added or updated, but there's no + * update when sessions are deleted from memory. Use the refresh button to update the view. + */ +public class EnrichedCallSimulatorActivity extends AppCompatActivity + implements StateChangedListener, OnClickListener { + + public static Intent newIntent(@NonNull Context context) { + return new Intent(Assert.isNotNull(context), EnrichedCallSimulatorActivity.class); + } + + private Button refreshButton; + + private SessionsAdapter sessionsAdapter; + + @Override + protected void onCreate(@Nullable Bundle bundle) { + LogUtil.enterBlock("EnrichedCallSimulatorActivity.onCreate"); + super.onCreate(bundle); + setContentView(R.layout.enriched_call_simulator_activity); + Toolbar toolbar = findViewById(R.id.toolbar); + toolbar.setTitle(R.string.enriched_call_simulator_activity); + + refreshButton = findViewById(R.id.refresh); + refreshButton.setOnClickListener(this); + + RecyclerView recyclerView = findViewById(R.id.sessions_recycler_view); + recyclerView.setLayoutManager(new LinearLayoutManager(this)); + + sessionsAdapter = new SessionsAdapter(); + sessionsAdapter.setSessionStrings(getEnrichedCallManager().getAllSessionsForDisplay()); + recyclerView.setAdapter(sessionsAdapter); + } + + @Override + protected void onResume() { + LogUtil.enterBlock("EnrichedCallSimulatorActivity.onResume"); + super.onResume(); + getEnrichedCallManager().registerStateChangedListener(this); + } + + @Override + protected void onPause() { + LogUtil.enterBlock("EnrichedCallSimulatorActivity.onPause"); + super.onPause(); + getEnrichedCallManager().unregisterStateChangedListener(this); + } + + @Override + public void onEnrichedCallStateChanged() { + LogUtil.enterBlock("EnrichedCallSimulatorActivity.onEnrichedCallStateChanged"); + refreshSessions(); + } + + @Override + public void onClick(View v) { + if (v == refreshButton) { + LogUtil.i("EnrichedCallSimulatorActivity.onClick", "refreshing sessions"); + refreshSessions(); + } + } + + private void refreshSessions() { + sessionsAdapter.setSessionStrings(getEnrichedCallManager().getAllSessionsForDisplay()); + sessionsAdapter.notifyDataSetChanged(); + } + + private EnrichedCallManager getEnrichedCallManager() { + return EnrichedCallComponent.get(this).getEnrichedCallManager(); + } +} diff --git a/java/com/android/dialer/enrichedcall/simulator/SessionViewHolder.java b/java/com/android/dialer/enrichedcall/simulator/SessionViewHolder.java new file mode 100644 index 000000000..44431253d --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/SessionViewHolder.java @@ -0,0 +1,37 @@ +/* + * 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.simulator; + +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.View; +import android.widget.TextView; + +/** ViewHolder for an Enriched call session. */ +class SessionViewHolder extends RecyclerView.ViewHolder { + + private final TextView sessionStringView; + + SessionViewHolder(View view) { + super(view); + sessionStringView = view.findViewById(R.id.session_string); + } + + void updateSession(@NonNull String sessionString) { + sessionStringView.setText(sessionString); + } +} diff --git a/java/com/android/dialer/enrichedcall/simulator/SessionsAdapter.java b/java/com/android/dialer/enrichedcall/simulator/SessionsAdapter.java new file mode 100644 index 000000000..25edfc7dd --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/SessionsAdapter.java @@ -0,0 +1,51 @@ +/* + * 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.simulator; + +import android.support.annotation.NonNull; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.ViewGroup; +import com.android.dialer.common.Assert; +import java.util.List; + +/** Adapter for the RecyclerView in {@link EnrichedCallSimulatorActivity}. */ +class SessionsAdapter extends RecyclerView.Adapter<SessionViewHolder> { + + /** List of the string representation of all in-memory sessions */ + private List<String> sessionStrings; + + void setSessionStrings(@NonNull List<String> sessionStrings) { + this.sessionStrings = Assert.isNotNull(sessionStrings); + } + + @Override + public SessionViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { + LayoutInflater inflater = LayoutInflater.from(viewGroup.getContext()); + return new SessionViewHolder(inflater.inflate(R.layout.session_view_holder, viewGroup, false)); + } + + @Override + public void onBindViewHolder(SessionViewHolder viewHolder, int i) { + viewHolder.updateSession(sessionStrings.get(i)); + } + + @Override + public int getItemCount() { + return sessionStrings.size(); + } +} diff --git a/java/com/android/dialer/enrichedcall/simulator/res/layout/enriched_call_simulator_activity.xml b/java/com/android/dialer/enrichedcall/simulator/res/layout/enriched_call_simulator_activity.xml new file mode 100644 index 000000000..be9aa7dea --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/res/layout/enriched_call_simulator_activity.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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 + --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <com.android.dialer.widget.DialerToolbar + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + + <android.support.v7.widget.RecyclerView + android:id="@+id/sessions_recycler_view" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"/> + + <Button + android:id="@+id/refresh" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/refresh"/> +</LinearLayout>
\ No newline at end of file diff --git a/java/com/android/dialer/enrichedcall/simulator/res/layout/session_view_holder.xml b/java/com/android/dialer/enrichedcall/simulator/res/layout/session_view_holder.xml new file mode 100644 index 000000000..65543bd0f --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/res/layout/session_view_holder.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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 + --> + +<TextView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/session_string" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="2dp"/> diff --git a/java/com/android/dialer/enrichedcall/simulator/res/values/strings.xml b/java/com/android/dialer/enrichedcall/simulator/res/values/strings.xml new file mode 100644 index 000000000..5cc252761 --- /dev/null +++ b/java/com/android/dialer/enrichedcall/simulator/res/values/strings.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ 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 + --> +<resources> + <string name="enriched_call_simulator_activity" translatable="false">Enriched Call Simulator Activity</string> + + <string name="important" translatable="false">important</string> + <string name="not_important" translatable="false">not important</string> + + <string name="refresh" translatable="false">refresh</string> +</resources>
\ No newline at end of file diff --git a/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java b/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java index 0540d912e..65d440cb8 100644 --- a/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java +++ b/java/com/android/dialer/enrichedcall/stub/EnrichedCallManagerStub.java @@ -28,6 +28,7 @@ import com.android.dialer.enrichedcall.Session; import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult; import com.android.dialer.enrichedcall.videoshare.VideoShareListener; import com.android.dialer.multimedia.MultimediaData; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -85,6 +86,14 @@ public final class EnrichedCallManagerStub implements EnrichedCallManager { return null; } + @MainThread + @NonNull + @Override + public List<String> getAllSessionsForDisplay() { + Assert.isMainThread(); + return Collections.emptyList(); + } + @NonNull @Override public Filter createIncomingCallComposerFilter() { diff --git a/java/com/android/dialer/interactions/res/layout/phone_disambig_item.xml b/java/com/android/dialer/interactions/res/layout/phone_disambig_item.xml index 879ea0e96..879ea0e96 100644..100755 --- a/java/com/android/dialer/interactions/res/layout/phone_disambig_item.xml +++ b/java/com/android/dialer/interactions/res/layout/phone_disambig_item.xml diff --git a/java/com/android/dialer/logging/contact_lookup_result.proto b/java/com/android/dialer/logging/contact_lookup_result.proto index 13ea3c8e5..5237c6887 100644 --- a/java/com/android/dialer/logging/contact_lookup_result.proto +++ b/java/com/android/dialer/logging/contact_lookup_result.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message ContactLookupResult { // The different results of a contact lookup done using a phone number. enum Type { diff --git a/java/com/android/dialer/logging/contact_source.proto b/java/com/android/dialer/logging/contact_source.proto index ffd32de0e..9504c64ed 100644 --- a/java/com/android/dialer/logging/contact_source.proto +++ b/java/com/android/dialer/logging/contact_source.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message ContactSource { // Applies only to reports made from call history. If we have contact // information for the phone number, this field indicates its source. diff --git a/java/com/android/dialer/logging/dialer_impression.proto b/java/com/android/dialer/logging/dialer_impression.proto index ba8d92249..4e96a5073 100644 --- a/java/com/android/dialer/logging/dialer_impression.proto +++ b/java/com/android/dialer/logging/dialer_impression.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message DialerImpression { // Event enums to be used for Impression Logging in Dialer. // It's perfectly acceptable for this enum to be large @@ -48,6 +49,7 @@ message DialerImpression { // This happens when the user had initially blocked a number and also claimed the number was // spam and had now proceeded to undo that. REPORT_AS_NOT_SPAM_VIA_UNBLOCK_NUMBER = 1009 + ; // A number that was identified as spam and the user proceeded to block it. However this @@ -63,10 +65,12 @@ message DialerImpression { // the number via call log. This is for case where the user wants to block a number and also // report it as spam REPORT_CALL_AS_SPAM_VIA_CALL_LOG_BLOCK_REPORT_SPAM_SENT_VIA_BLOCK_NUMBER_DIALOG = 1011 + ; // User made it to the last step and actually blocked the number USER_ACTION_BLOCKED_NUMBER = 1012 + ; // User made it to the last step and actually unblocked the number @@ -89,16 +93,19 @@ message DialerImpression { // User added the number to contacts from the after call notification SPAM_AFTER_CALL_NOTIFICATION_ADD_TO_CONTACTS = 1019 + ; // User marked the number as spam on the after call notification flow SPAM_AFTER_CALL_NOTIFICATION_MARKED_NUMBER_AS_SPAM = 1020 + ; SPAM_AFTER_CALL_NOTIFICATION_MARKED_NUMBER_AS_NOT_SPAM_AND_BLOCKED = 1021; // User reported the number as not spam SPAM_AFTER_CALL_NOTIFICATION_REPORT_NUMBER_AS_NOT_SPAM = 1022 + ; // User dismissed the spam notification @@ -120,6 +127,7 @@ message DialerImpression { // able to stitch different types of events if they make sense e.g user pressed a speaker button // and we want to associate that to a call event USER_PARTICIPATED_IN_A_CALL = 1028 + ; // Incoming call is a spam call @@ -152,44 +160,54 @@ message DialerImpression { // User deleted a call log entry USER_DELETED_CALL_LOG_ITEM = 1048 + ; // User tapped on "Send a message" CALL_LOG_SEND_MESSAGE = 1049 + ; // User tapped on "Add to contact" CALL_LOG_ADD_TO_CONTACT = 1050 + ; // User tapped on "Create new contact" CALL_LOG_CREATE_NEW_CONTACT = 1051 + ; // User deleted an entry from the voicemail tab VOICEMAIL_DELETE_ENTRY = 1052 + ; // Voicemail call log entry was expanded. Could be either if the user tapped the voicemail // call log entry or pressed the play button when the voicemail call log entry was not expanded VOICEMAIL_EXPAND_ENTRY = 1053 + ; // The play button for voicemail call log entry was tapped directly (i.e when the voicemail // call log entry was not expanded and the playbutton was tapped) VOICEMAIL_PLAY_AUDIO_DIRECTLY= 1054 + ; // The play button after expanding the voicemail call log entry was tapped VOICEMAIL_PLAY_AUDIO_AFTER_EXPANDING_ENTRY= 1055 + ; // Incoming call was rejected from the notifications REJECT_INCOMING_CALL_FROM_NOTIFICATION= 1056 + ; // Incoming call was rejected from the answer screen including rejecting via sms and talkback REJECT_INCOMING_CALL_FROM_ANSWER_SCREEN= 1057 + ; // User tapped block and spam buttons in context menu, same as buttons in @@ -362,14 +380,19 @@ message DialerImpression { EMERGENCY_LAUNCHED_MAP = 1173; VIDEO_CALL_UPGRADE_REQUESTED = 1174 + ; VIDEO_CALL_REQUEST_ACCEPTED = 1175 + ; VIDEO_CALL_REQUEST_ACCEPTED_AS_AUDIO = 1176 + ; VIDEO_CALL_REQUEST_DECLINED = 1177 + ; VIDEO_CALL_REQUEST_RECEIVED = 1178 + ; RCS_VIDEO_SHARE_UPGRADE_REQUESTED = 1179; diff --git a/java/com/android/dialer/logging/interaction_event.proto b/java/com/android/dialer/logging/interaction_event.proto index 89cf46fc9..3d14a1a2d 100644 --- a/java/com/android/dialer/logging/interaction_event.proto +++ b/java/com/android/dialer/logging/interaction_event.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message InteractionEvent { // Next Tag: 38 enum Type { diff --git a/java/com/android/dialer/logging/reporting_location.proto b/java/com/android/dialer/logging/reporting_location.proto index d436564df..ddaa37331 100644 --- a/java/com/android/dialer/logging/reporting_location.proto +++ b/java/com/android/dialer/logging/reporting_location.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message ReportingLocation { // Spam reporting location enum Type { diff --git a/java/com/android/dialer/logging/screen_event.proto b/java/com/android/dialer/logging/screen_event.proto index ca624774d..ddf663286 100644 --- a/java/com/android/dialer/logging/screen_event.proto +++ b/java/com/android/dialer/logging/screen_event.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message ScreenEvent { enum Type { diff --git a/java/com/android/dialer/logging/ui_action.proto b/java/com/android/dialer/logging/ui_action.proto index 784dbed9b..f1cbdf8bd 100644 --- a/java/com/android/dialer/logging/ui_action.proto +++ b/java/com/android/dialer/logging/ui_action.proto @@ -6,6 +6,7 @@ option java_multiple_files = true; option optimize_for = LITE_RUNTIME; + message UiAction { enum Type { UNKNOWN = 0; diff --git a/java/com/android/dialer/searchfragment/README.md b/java/com/android/dialer/searchfragment/README.md index b3b9135e5..baeaa9caf 100644 --- a/java/com/android/dialer/searchfragment/README.md +++ b/java/com/android/dialer/searchfragment/README.md @@ -13,11 +13,11 @@ cp2 containing all of the relevant info needed to rendering. ### Business Search -// TODO(calderwoodra) +// TODO ### Google Directory Search -// TODO(calderwoodra) +// TODO ## Rendering diff --git a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java index 8257d9853..f2749b2c5 100644 --- a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java +++ b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java @@ -30,6 +30,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutor.Worker; import com.android.dialer.common.concurrent.DialerExecutors; +import com.android.dialer.enrichedcall.simulator.EnrichedCallSimulatorActivity; import com.android.dialer.persistentlog.PersistentLogger; /** Implements the simulator submenu. */ @@ -114,6 +115,13 @@ final class SimulatorActionProvider extends ActionProvider { .executeSerial(null); return true; }); + subMenu + .add("Enriched call simulator") + .setOnMenuItemClickListener( + (item) -> { + context.startActivity(EnrichedCallSimulatorActivity.newIntent(context)); + return true; + }); } private void populateDatabase() { diff --git a/java/com/android/incallui/calllocation/impl/AndroidManifest.xml b/java/com/android/incallui/calllocation/impl/AndroidManifest.xml index 550c5808c..fda940483 100644 --- a/java/com/android/incallui/calllocation/impl/AndroidManifest.xml +++ b/java/com/android/incallui/calllocation/impl/AndroidManifest.xml @@ -19,6 +19,7 @@ package="com.android.incallui.calllocation.impl"> <application> + <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> diff --git a/java/com/android/incallui/maps/impl/AndroidManifest.xml b/java/com/android/incallui/maps/impl/AndroidManifest.xml index 4ad0b3b7e..bc921e906 100644 --- a/java/com/android/incallui/maps/impl/AndroidManifest.xml +++ b/java/com/android/incallui/maps/impl/AndroidManifest.xml @@ -19,6 +19,7 @@ package="com.android.incallui.maps.impl"> <application> + <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> diff --git a/java/com/android/voicemail/impl/res/xml/vvm_config.xml b/java/com/android/voicemail/impl/res/xml/vvm_config.xml index 2bac66be5..c7ed5ca92 100644 --- a/java/com/android/voicemail/impl/res/xml/vvm_config.xml +++ b/java/com/android/voicemail/impl/res/xml/vvm_config.xml @@ -21,6 +21,7 @@ <item value="TEST"/> </string-array> </pbundle_as_map> + <pbundle_as_map> <!-- T-Mobile USA--> <string-array name="mccmnc"> |