Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccca3152 authored by Eric Erfanian's avatar Eric Erfanian
Browse files

Update dialer sources.

Test: Built package and system image.

This change clobbers the old source, and is an export
from an internal Google repository.

The internal repository was forked form Android in March,
and this change includes modifications since then, to
near the v8 release.

Since the fork, we've moved code from monolithic to independent modules. In addition,
we've switched to Blaze/Bazel as the build sysetm. This export, however, still uses make.

New dependencies have been added:
- Dagger
- Auto-Value
- Glide
- Libshortcutbadger

Going forward, development will still be in Google3, and the Gerrit release
will become an automated export, with the next drop happening in ~ two weeks.

Android.mk includes local modifications from ToT.

Abridged changelog:

Bug fixes
● Not able to mute, add a call when using Phone app in multiwindow mode
● Double tap on keypad triggering multiple key and tones
● Reported spam numbers not showing as spam in the call log
● Crash when user tries to block number while Phone app is not set as default
● Crash when user picks a number from search auto-complete list

Visual Voicemail (VVM) improvements
● Share Voicemail audio via standard exporting mechanisms that support file attachment
(email, MMS, etc.)
● Make phone number, email and web sites in VVM transcript clickable
● Set PIN before declining VVM Terms of Service {Carrier}
● Set client type for outbound visual voicemail SMS {Carrier}

New incoming call and incall UI on older devices
(Android M)
● Updated Phone app icon
● New incall UI (large buttons, button labels)
● New and animated Answer/Reject gestures

Accessibility
● Add custom answer/decline call buttons on answer screen for touch exploration
accessibility services
● Increase size of touch target
● Add verbal feedback when a Voicemail fails to load
● Fix pressing of Phone buttons while in a phone call using Switch Access
● Fix selecting and opening contacts in talkback mode
● Split focus for ‘Learn More’ link in caller id & spam to help distinguish similar text

Other
● Backup & Restore for App Preferences
● Prompt user to enable Wi-Fi calling if the call ends due to out of service and Wi-Fi is
connected
● Rename “Dialpad” to “Keypad”
● Show "Private number" for restricted calls
● Delete unused items (vcard, add contact, call history) from Phone menu

Change-Id: I2a7e53532a24c21bf308bf0a6d178d7ddbca4958
parent e7ae4624
Loading
Loading
Loading
Loading
+227 −49
Original line number Original line Diff line number Diff line
# Local modifications:
# * All location/maps code has been removed from the incallui.
# * Precompiled AutoValue classes have been included.
# * Precompiled Dagger classes have been included.
# * All autovalue imports and annotations have been stripped.
# * Precompiled proto classes have been included.
LOCAL_PATH:= $(call my-dir)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
include $(CLEAR_VARS)


LOCAL_MODULE_TAGS := optional

incallui_dir := InCallUI
contacts_common_dir := ../ContactsCommon
phone_common_dir := ../PhoneCommon

ifeq ($(TARGET_BUILD_APPS),)
ifeq ($(TARGET_BUILD_APPS),)
support_library_root_dir := frameworks/support
support_library_root_dir := frameworks/support
else
else
support_library_root_dir := prebuilts/sdk/current/support
support_library_root_dir := prebuilts/sdk/current/support
endif
endif


src_dirs := src \
# The base directory for Dialer sources.
    $(incallui_dir)/src \
BASE_DIR := java/com/android
    $(contacts_common_dir)/src \
    $(phone_common_dir)/src


res_dirs := res \
# Primary dialer module sources.
    $(incallui_dir)/res \
SRC_DIRS := \
    $(contacts_common_dir)/res \
	$(BASE_DIR)/contacts/common \
    $(contacts_common_dir)/icons/res \
	$(BASE_DIR)/dialer \
    $(phone_common_dir)/res
	$(BASE_DIR)/incallui \
	$(BASE_DIR)/voicemailomtp


src_dirs += \
# All Dialers resources.
    src-N
# find . -type d -name "res" | uniq | sort
RES_DIRS := \
	assets/product/res \
	assets/quantum/res \
	$(BASE_DIR)/contacts/common/res \
	$(BASE_DIR)/dialer/app/res \
	$(BASE_DIR)/dialer/app/voicemail/error/res \
	$(BASE_DIR)/dialer/blocking/res \
	$(BASE_DIR)/dialer/callcomposer/camera/camerafocus/res \
	$(BASE_DIR)/dialer/callcomposer/cameraui/res \
	$(BASE_DIR)/dialer/callcomposer/res \
	$(BASE_DIR)/dialer/common/res \
	$(BASE_DIR)/dialer/dialpadview/res \
	$(BASE_DIR)/dialer/interactions/res \
	$(BASE_DIR)/dialer/phonenumberutil/res \
	$(BASE_DIR)/dialer/shortcuts/res \
	$(BASE_DIR)/dialer/theme/res \
	$(BASE_DIR)/dialer/util/res \
	$(BASE_DIR)/dialer/voicemailstatus/res \
	$(BASE_DIR)/dialer/widget/res \
	$(BASE_DIR)/incallui/answer/impl/affordance/res \
	$(BASE_DIR)/incallui/answer/impl/answermethod/res \
	$(BASE_DIR)/incallui/answer/impl/hint/res \
	$(BASE_DIR)/incallui/answer/impl/res \
	$(BASE_DIR)/incallui/audioroute/res \
	$(BASE_DIR)/incallui/autoresizetext/res \
	$(BASE_DIR)/incallui/commontheme/res \
	$(BASE_DIR)/incallui/contactgrid/res \
	$(BASE_DIR)/incallui/hold/res \
	$(BASE_DIR)/incallui/incall/impl/res \
	$(BASE_DIR)/incallui/res \
	$(BASE_DIR)/incallui/sessiondata/res \
	$(BASE_DIR)/incallui/video/impl/res \
	$(BASE_DIR)/incallui/wifi/res \
	$(BASE_DIR)/voicemailomtp/res


LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs))
# Dialer manifest files to merge.
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) \
# find . -type f -name "AndroidManifest.xml" | uniq | sort
    $(support_library_root_dir)/v7/cardview/res \
DIALER_MANIFEST_FILES += \
    $(support_library_root_dir)/v7/recyclerview/res \
	$(BASE_DIR)/contacts/common/AndroidManifest.xml \
    $(support_library_root_dir)/v7/appcompat/res \
	$(BASE_DIR)/dialer/app/AndroidManifest.xml \
	$(BASE_DIR)/dialer/app/manifests/activities/AndroidManifest.xml \
	$(BASE_DIR)/dialer/app/voicemail/error/AndroidManifest.xml \
	$(BASE_DIR)/dialer/backup/AndroidManifest.xml \
	$(BASE_DIR)/dialer/blocking/AndroidManifest.xml \
	$(BASE_DIR)/dialer/callcomposer/AndroidManifest.xml \
	$(BASE_DIR)/dialer/callcomposer/camera/AndroidManifest.xml \
	$(BASE_DIR)/dialer/callcomposer/camera/camerafocus/AndroidManifest.xml \
	$(BASE_DIR)/dialer/callcomposer/cameraui/AndroidManifest.xml \
	$(BASE_DIR)/dialer/common/AndroidManifest.xml \
	$(BASE_DIR)/dialer/debug/AndroidManifest.xml \
	$(BASE_DIR)/dialer/debug/impl/AndroidManifest.xml \
	$(BASE_DIR)/dialer/dialpadview/AndroidManifest.xml \
	$(BASE_DIR)/dialer/interactions/AndroidManifest.xml \
	$(BASE_DIR)/dialer/phonenumberutil/AndroidManifest.xml \
	$(BASE_DIR)/dialer/shortcuts/AndroidManifest.xml \
	$(BASE_DIR)/dialer/simulator/impl/AndroidManifest.xml \
	$(BASE_DIR)/dialer/theme/AndroidManifest.xml \
	$(BASE_DIR)/dialer/util/AndroidManifest.xml \
	$(BASE_DIR)/dialer/voicemailstatus/AndroidManifest.xml \
	$(BASE_DIR)/dialer/widget/AndroidManifest.xml \
	$(BASE_DIR)/incallui/AndroidManifest.xml \
	$(BASE_DIR)/incallui/answer/impl/affordance/AndroidManifest.xml \
	$(BASE_DIR)/incallui/answer/impl/AndroidManifest.xml \
	$(BASE_DIR)/incallui/answer/impl/answermethod/AndroidManifest.xml \
	$(BASE_DIR)/incallui/answer/impl/hint/AndroidManifest.xml \
	$(BASE_DIR)/incallui/audioroute/AndroidManifest.xml \
	$(BASE_DIR)/incallui/autoresizetext/AndroidManifest.xml \
	$(BASE_DIR)/incallui/commontheme/AndroidManifest.xml \
	$(BASE_DIR)/incallui/contactgrid/AndroidManifest.xml \
	$(BASE_DIR)/incallui/hold/AndroidManifest.xml \
	$(BASE_DIR)/incallui/incall/impl/AndroidManifest.xml \
	$(BASE_DIR)/incallui/sessiondata/AndroidManifest.xml \
	$(BASE_DIR)/incallui/video/impl/AndroidManifest.xml \
	$(BASE_DIR)/incallui/wifi/AndroidManifest.xml \
	$(BASE_DIR)/voicemailomtp/AndroidManifest.xml

# Merge all manifest files.
LOCAL_FULL_LIBS_MANIFEST_FILES := \
	$(addprefix $(LOCAL_PATH)/, $(DIALER_MANIFEST_FILES))
LOCAL_SRC_FILES := $(call all-java-files-under, $(SRC_DIRS))
LOCAL_RESOURCE_DIR := \
	$(addprefix $(LOCAL_PATH)/, $(RES_DIRS)) \
	$(support_library_root_dir)/design/res \
	$(support_library_root_dir)/design/res \
    $(support_library_root_dir)/transition/res
	$(support_library_root_dir)/v7/appcompat/res \
	$(support_library_root_dir)/v7/cardview/res \
	$(support_library_root_dir)/v7/recyclerview/res


# We specify each package explicitly to glob resource files.
LOCAL_AAPT_FLAGS := \
LOCAL_AAPT_FLAGS := \
	--auto-add-overlay \
	--auto-add-overlay \
	--extra-packages android.support.design \
	--extra-packages android.support.transition \
	--extra-packages android.support.v7.appcompat \
	--extra-packages android.support.v7.appcompat \
	--extra-packages android.support.v7.cardview \
	--extra-packages android.support.v7.cardview \
	--extra-packages android.support.v7.recyclerview \
	--extra-packages android.support.v7.recyclerview \
    --extra-packages android.support.design \
    --extra-packages android.support.transition \
    --extra-packages com.android.incallui \
	--extra-packages com.android.contacts.common \
	--extra-packages com.android.contacts.common \
    --extra-packages com.android.phone.common
	--extra-packages com.android.dialer.app \
	--extra-packages com.android.dialer.app.voicemail.error \
	--extra-packages com.android.dialer.blocking \
	--extra-packages com.android.dialer.callcomposer \
	--extra-packages com.android.dialer.callcomposer \
	--extra-packages com.android.dialer.callcomposer.camera \
	--extra-packages com.android.dialer.callcomposer.camera.camerafocus \
	--extra-packages com.android.dialer.callcomposer.cameraui \
	--extra-packages com.android.dialer.common \
	--extra-packages com.android.dialer.dialpadview \
	--extra-packages com.android.dialer.interactions \
	--extra-packages com.android.dialer.phonenumberutil \
	--extra-packages com.android.dialer.shortcuts \
	--extra-packages com.android.dialer.util \
	--extra-packages com.android.dialer.voicemailstatus \
	--extra-packages com.android.dialer.widget \
	--extra-packages com.android.incallui \
	--extra-packages com.android.incallui.answer.impl \
	--extra-packages com.android.incallui.answer.impl.affordance \
	--extra-packages com.android.incallui.answer.impl.affordance \
	--extra-packages com.android.incallui.answer.impl.answermethod \
	--extra-packages com.android.incallui.answer.impl.hint \
	--extra-packages com.android.incallui.audioroute \
	--extra-packages com.android.incallui.autoresizetext \
	--extra-packages com.android.incallui.commontheme \
	--extra-packages com.android.incallui.contactgrid \
	--extra-packages com.android.incallui.hold \
	--extra-packages com.android.incallui.incall.impl \
	--extra-packages com.android.incallui.sessiondata \
	--extra-packages com.android.incallui.video \
	--extra-packages com.android.incallui.video.impl \
	--extra-packages com.android.incallui.wifi \
	--extra-packages com.android.phone.common \
	--extra-packages com.android.voicemailomtp \
	--extra-packages com.android.voicemailomtp.settings \
	--extra-packages me.leolin.shortcutbadger


LOCAL_STATIC_JAVA_LIBRARIES := \
LOCAL_STATIC_JAVA_LIBRARIES := \
	android-common \
	android-common \
	android-support-design \
	android-support-v13 \
	android-support-v13 \
	android-support-v4 \
	android-support-v4 \
	android-support-v7-appcompat \
	android-support-v7-appcompat \
	android-support-v7-cardview \
	android-support-v7-cardview \
	android-support-v7-recyclerview \
	android-support-v7-recyclerview \
    android-support-design \
    android-support-transition \
	com.android.vcard \
	com.android.vcard \
    guava \
	dailer-dagger2-compiler \
    libphonenumber
	dialer-dagger2 \
	dialer-dagger2-producers \
	dialer-glide  \
	dialer-javax-annotation-api \
	dialer-javax-inject \
	dialer-libshortcutbadger \
	jsr305 \
	libphonenumber \
	libprotobuf-java-nano \
	org.apache.http.legacy.boot \
	volley


LOCAL_JAVA_LIBRARIES := \
	android-support-annotations \
	android-support-transition \
	dailer-dagger2-compiler \
	dialer-dagger2 \
	dialer-dagger2-producers \
	dialer-glide  \
	dialer-guava \
	dialer-javax-annotation-api \
	dialer-javax-inject \
	dialer-libshortcutbadger \
	jsr305 \
	libprotobuf-java-nano

# Libraries needed by the compiler (JACK) to generate code.
PROCESSOR_LIBRARIES_TARGET := \
	dailer-dagger2-compiler \
	dialer-dagger2 \
	dialer-dagger2-producers \
	dialer-guava \
	dialer-javax-annotation-api \
	dialer-javax-inject

# TODO: Include when JACK properly supports AutoValue b/35360557
# (builders not generated successfully, javac duplicate issues) in
# LOCAL_STATIC_JAVA_LIBRARIES, LOCAL_JAVA_LIBRARIES, PROCESSOR_LIBRARIES_TARGET
# 	dialer-auto-value

# Resolve the jar paths.
PROCESSOR_JARS := $(call java-lib-deps, $(PROCESSOR_LIBRARIES_TARGET))
LOCAL_ADDITIONAL_DEPENDENCIES += $(PROCESSOR_JARS)

LOCAL_JACK_FLAGS += --processorpath $(call normalize-path-list,$(PROCESSOR_JARS))

LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(incallui_dir)/proguard.flags

LOCAL_SDK_VERSION := current
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := Dialer
LOCAL_PACKAGE_NAME := Dialer
LOCAL_CERTIFICATE := shared
LOCAL_CERTIFICATE := shared
LOCAL_PRIVILEGED_MODULE := true
LOCAL_PRIVILEGED_MODULE := true
include $(BUILD_PACKAGE)


LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(incallui_dir)/proguard.flags
# Cleanup local state
BASE_DIR :=
SRC_DIRS :=
RES_DIRS :=
DIALER_MANIFEST_FILES :=
PROCESSOR_LIBRARIES_TARGET :=
PROCESSOR_JARS :=


LOCAL_SDK_VERSION := current
# Create references to prebuilt libraries.
include $(CLEAR_VARS)


include $(BUILD_PACKAGE)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
	dailer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.6/dagger-compiler-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
	dialer-auto-common:../../../prebuilts/tools/common/m2/repository/com/google/auto/auto-common/0.6/auto-common-0.6$(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:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.6/dagger-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
	dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.6/dagger-producers-2.6$(COMMON_JAVA_PACKAGE_SUFFIX) \
	dialer-glide:../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/glide/4.0.0-SNAPSHOT/glide-4.0.0-SNAPSHOT$(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) \
	dialer-libshortcutbadger:../../../prebuilts/tools/common/m2/repository/me/leolin/ShortcutBadger/1.1.13/ShortcutBadger-1.1.13$(COMMON_JAVA_PACKAGE_SUFFIX)


# Use the following include to make our test apk.
include $(BUILD_MULTI_PREBUILT)
include $(call all-makefiles-under,$(LOCAL_PATH))

include $(CLEAR_VARS)
+101 −336

File changed.

Preview size limit exceeded, changes collapsed.

CONTRIBUTING

0 → 100644
+27 −0
Original line number Original line Diff line number Diff line
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).

InCallUI/AndroidManifest.xml

deleted100644 → 0
+0 −24
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2016 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.incallui">
    <uses-sdk
        android:minSdkVersion="23"
        android:targetSdkVersion="23" />
</manifest>

InCallUI/build.gradle

deleted100644 → 0
+0 −14
Original line number Original line Diff line number Diff line
apply plugin: 'com.android.library'

android {
    sourceSets.main {
        manifest.srcFile 'AndroidManifest.xml'
        res.srcDirs = ['res']
    }
}

dependencies {
    compile 'com.android.support:support-v4:23.1.+'
    compile project(':phonecommon')
    compile project(':contactscommon')
}
Loading