summaryrefslogtreecommitdiffstats
path: root/java/com/android/dialer/multimedia
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-02-22 16:32:36 -0800
committerEric Erfanian <erfanian@google.com>2017-03-01 09:56:52 -0800
commitccca31529c07970e89419fb85a9e8153a5396838 (patch)
treea7034c0a01672b97728c13282a2672771cd28baa /java/com/android/dialer/multimedia
parente7ae4624ba6f25cb8e648db74e0d64c0113a16ba (diff)
downloadandroid_packages_apps_Dialer-ccca31529c07970e89419fb85a9e8153a5396838.tar.gz
android_packages_apps_Dialer-ccca31529c07970e89419fb85a9e8153a5396838.tar.bz2
android_packages_apps_Dialer-ccca31529c07970e89419fb85a9e8153a5396838.zip
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
Diffstat (limited to 'java/com/android/dialer/multimedia')
-rw-r--r--java/com/android/dialer/multimedia/AutoValue_MultimediaData.java165
-rw-r--r--java/com/android/dialer/multimedia/MultimediaData.java100
2 files changed, 265 insertions, 0 deletions
diff --git a/java/com/android/dialer/multimedia/AutoValue_MultimediaData.java b/java/com/android/dialer/multimedia/AutoValue_MultimediaData.java
new file mode 100644
index 000000000..cc6815094
--- /dev/null
+++ b/java/com/android/dialer/multimedia/AutoValue_MultimediaData.java
@@ -0,0 +1,165 @@
+/*
+ * 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.multimedia;
+
+import android.location.Location;
+import android.net.Uri;
+import android.support.annotation.Nullable;
+import javax.annotation.Generated;
+
+@Generated("com.google.auto.value.processor.AutoValueProcessor")
+ final class AutoValue_MultimediaData extends MultimediaData {
+
+ private final String subject;
+ private final Location location;
+ private final Uri imageUri;
+ private final String imageContentType;
+ private final boolean important;
+
+ private AutoValue_MultimediaData(
+ @Nullable String subject,
+ @Nullable Location location,
+ @Nullable Uri imageUri,
+ @Nullable String imageContentType,
+ boolean important) {
+ this.subject = subject;
+ this.location = location;
+ this.imageUri = imageUri;
+ this.imageContentType = imageContentType;
+ this.important = important;
+ }
+
+ @Nullable
+ @Override
+ public String getSubject() {
+ return subject;
+ }
+
+ @Nullable
+ @Override
+ public Location getLocation() {
+ return location;
+ }
+
+ @Nullable
+ @Override
+ public Uri getImageUri() {
+ return imageUri;
+ }
+
+ @Nullable
+ @Override
+ public String getImageContentType() {
+ return imageContentType;
+ }
+
+ @Override
+ public boolean isImportant() {
+ return important;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o instanceof MultimediaData) {
+ MultimediaData that = (MultimediaData) o;
+ return ((this.subject == null) ? (that.getSubject() == null) : this.subject.equals(that.getSubject()))
+ && ((this.location == null) ? (that.getLocation() == null) : this.location.equals(that.getLocation()))
+ && ((this.imageUri == null) ? (that.getImageUri() == null) : this.imageUri.equals(that.getImageUri()))
+ && ((this.imageContentType == null) ? (that.getImageContentType() == null) : this.imageContentType.equals(that.getImageContentType()))
+ && (this.important == that.isImportant());
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ int h = 1;
+ h *= 1000003;
+ h ^= (subject == null) ? 0 : this.subject.hashCode();
+ h *= 1000003;
+ h ^= (location == null) ? 0 : this.location.hashCode();
+ h *= 1000003;
+ h ^= (imageUri == null) ? 0 : this.imageUri.hashCode();
+ h *= 1000003;
+ h ^= (imageContentType == null) ? 0 : this.imageContentType.hashCode();
+ h *= 1000003;
+ h ^= this.important ? 1231 : 1237;
+ return h;
+ }
+
+ static final class Builder extends MultimediaData.Builder {
+ private String subject;
+ private Location location;
+ private Uri imageUri;
+ private String imageContentType;
+ private Boolean important;
+ Builder() {
+ }
+ private Builder(MultimediaData source) {
+ this.subject = source.getSubject();
+ this.location = source.getLocation();
+ this.imageUri = source.getImageUri();
+ this.imageContentType = source.getImageContentType();
+ this.important = source.isImportant();
+ }
+ @Override
+ public MultimediaData.Builder setSubject(@Nullable String subject) {
+ this.subject = subject;
+ return this;
+ }
+ @Override
+ public MultimediaData.Builder setLocation(@Nullable Location location) {
+ this.location = location;
+ return this;
+ }
+ @Override
+ MultimediaData.Builder setImageUri(@Nullable Uri imageUri) {
+ this.imageUri = imageUri;
+ return this;
+ }
+ @Override
+ MultimediaData.Builder setImageContentType(@Nullable String imageContentType) {
+ this.imageContentType = imageContentType;
+ return this;
+ }
+ @Override
+ public MultimediaData.Builder setImportant(boolean important) {
+ this.important = important;
+ return this;
+ }
+ @Override
+ public MultimediaData build() {
+ String missing = "";
+ if (this.important == null) {
+ missing += " important";
+ }
+ if (!missing.isEmpty()) {
+ throw new IllegalStateException("Missing required properties:" + missing);
+ }
+ return new AutoValue_MultimediaData(
+ this.subject,
+ this.location,
+ this.imageUri,
+ this.imageContentType,
+ this.important);
+ }
+ }
+
+}
diff --git a/java/com/android/dialer/multimedia/MultimediaData.java b/java/com/android/dialer/multimedia/MultimediaData.java
new file mode 100644
index 000000000..ebd41a918
--- /dev/null
+++ b/java/com/android/dialer/multimedia/MultimediaData.java
@@ -0,0 +1,100 @@
+/*
+ * 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.multimedia;
+
+import android.location.Location;
+import android.net.Uri;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import com.android.dialer.common.LogUtil;
+
+
+/** Holds the data associated with an enriched call session. */
+
+public abstract class MultimediaData {
+
+ public static final MultimediaData EMPTY = builder().build();
+
+ @NonNull
+ public static Builder builder() {
+ return new AutoValue_MultimediaData.Builder().setImportant(false);
+ }
+
+ /** Returns the call composer subject if set, or null if this isn't a call composer session. */
+ @Nullable
+ public abstract String getSubject();
+
+ /** Returns the call composer location if set, or null if this isn't a call composer session. */
+ @Nullable
+ public abstract Location getLocation();
+
+ /** Returns {@code true} if this session contains image data. */
+ public boolean hasImageData() {
+ // imageUri and content are always either both null or nonnull
+ return getImageUri() != null && getImageContentType() != null;
+ }
+
+ /** Returns the call composer photo if set, or null if this isn't a call composer session. */
+ @Nullable
+ public abstract Uri getImageUri();
+
+ /**
+ * Returns the content type of the image, either image/png or image/jpeg, if set, or null if this
+ * isn't a call composer session.
+ */
+ @Nullable
+ public abstract String getImageContentType();
+
+ /** Returns {@code true} if this is a call composer session that's marked as important. */
+ public abstract boolean isImportant();
+
+ /** Returns the string form of this MultimediaData with no PII. */
+ @Override
+ public String toString() {
+ return String.format(
+ "MultimediaData{subject: %s, location: %s, imageUrl: %s, imageContentType: %s, "
+ + "important: %b}",
+ LogUtil.sanitizePii(getSubject()),
+ LogUtil.sanitizePii(getLocation()),
+ LogUtil.sanitizePii(getImageUri()),
+ getImageContentType(),
+ isImportant());
+ }
+
+ /** Creates instances of {@link MultimediaData}. */
+
+ public abstract static class Builder {
+
+ public abstract Builder setSubject(@NonNull String subject);
+
+ public abstract Builder setLocation(@NonNull Location location);
+
+ public Builder setImage(@NonNull Uri image, @NonNull String imageContentType) {
+ setImageUri(image);
+ setImageContentType(imageContentType);
+ return this;
+ }
+
+ abstract Builder setImageUri(@NonNull Uri image);
+
+ abstract Builder setImageContentType(@NonNull String imageContentType);
+
+ public abstract Builder setImportant(boolean isImportant);
+
+ public abstract MultimediaData build();
+ }
+}