Merge "Add FLAG_IMMUTABLE to PendingIntent in LegacyModeSmsHandler." into pi-dev am: 44b02956c4 am: 06572a0820 am: 5625595e77 am: 0642423c12 am: 30d5474b58

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Dialer/+/16199731

Change-Id: I89efaae4c04351dfc65838ff14772a48d28949ae
diff --git a/Android.mk b/Android.mk
index b7a4a8f..7736fd6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -143,11 +143,11 @@
 	android-support-v7-recyclerview \
 
 LOCAL_JAVA_LIBRARIES := \
-	dialer-auto-value-target \
+	auto_value_annotations \
 	org.apache.http.legacy \
 
 LOCAL_ANNOTATION_PROCESSORS := \
-	dialer-auto-value \
+	auto_value_plugin \
 	javapoet-prebuilt-jar \
 	dialer-dagger2 \
 	dialer-dagger2-compiler \
@@ -176,7 +176,11 @@
 LOCAL_PRODUCT_MODULE := true
 LOCAL_USE_AAPT2 := true
 LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.dialer
+LOCAL_USES_LIBRARIES := org.apache.http.legacy
 
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 include $(BUILD_PACKAGE)
 
 # Cleanup local state
@@ -191,7 +195,6 @@
 include $(CLEAR_VARS)
 
 LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
-    dialer-auto-value:../../../prebuilts/tools/common/m2/repository/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.jar \
     dialer-dagger2-compiler:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-compiler/2.7/dagger-compiler-2.7.jar \
     dialer-dagger2:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.7/dagger-2.7.jar \
     dialer-dagger2-producers:../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger-producers/2.7/dagger-producers-2.7.jar \
@@ -205,8 +208,6 @@
     dialer-guava:../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/23.0/guava-23.0.jar \
     dialer-javax-annotation-api:../../../prebuilts/tools/common/m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar \
     dialer-javax-inject:../../../prebuilts/tools/common/m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar \
-    dialer-auto-service:../../../prebuilts/tools/common/m2/repository/com/google/auto/service/auto-service/1.0-rc2/auto-service-1.0-rc2.jar \
-    dialer-auto-common:../../../prebuilts/tools/common/m2/repository/com/google/auto/auto-common/0.9/auto-common-0.9.jar \
 
 include $(BUILD_HOST_PREBUILT)
 
@@ -216,6 +217,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-guava-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/guava/guava/23.0/guava-23.0.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -226,6 +230,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-error-prone-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -236,6 +243,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-dagger2-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/dagger/dagger/2.7/dagger-2.7.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -246,6 +256,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-disklrucache-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/disklrucache/SNAPSHOT/disklrucache-SNAPSHOT.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -256,6 +269,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-gifdecoder-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/gifdecoder/SNAPSHOT/gifdecoder-SNAPSHOT.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -266,6 +282,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-glide-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/glide/SNAPSHOT/glide-SNAPSHOT.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -276,6 +295,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-glide-annotation-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/maven_repo/bumptech/com/github/bumptech/glide/annotation/SNAPSHOT/annotation-SNAPSHOT.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -286,6 +308,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-javax-annotation-api-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -296,6 +321,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-libshortcutbadger-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/me/leolin/ShortcutBadger/1.1.13/ShortcutBadger-1.1.13.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -306,6 +334,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-javax-inject-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -316,6 +347,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-commons-io-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -326,6 +360,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-mime4j-core-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/org/apache/james/apache-mime4j-core/0.7.2/apache-mime4j-core-0.7.2.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -336,6 +373,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-mime4j-dom-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/org/apache/james/apache-mime4j-dom/0.7.2/apache-mime4j-dom-0.7.2.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -346,6 +386,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-grpc-core-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-core/1.0.3/grpc-core-1.0.3.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -356,6 +399,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-grpc-okhttp-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-okhttp/1.0.3/grpc-okhttp-1.0.3.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -366,6 +412,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-grpc-protobuf-lite-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-protobuf-lite/1.0.3/grpc-protobuf-lite-1.0.3.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -376,6 +425,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-grpc-stub-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-stub/1.0.3/grpc-stub-1.0.3.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -386,6 +438,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-grpc-all-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-all/1.0.3/grpc-all-1.0.3.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -396,26 +451,23 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-grpc-context-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/io/grpc/grpc-context/1.0.3/grpc-context-1.0.3.jar
 LOCAL_UNINSTALLABLE_MODULE := true
 
 include $(BUILD_PREBUILT)
 
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE := dialer-auto-value-target
-LOCAL_SDK_VERSION := current
-LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_PREBUILT)
 
 include $(CLEAR_VARS)
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-zxing-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../external/zxing/core/core.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -426,6 +478,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-okhttp-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/squareup/okhttp/okhttp/2.7.4/okhttp-2.7.4.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -436,6 +491,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-okio-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/squareup/okio/okio/1.9.0/okio-1.9.0.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -446,6 +504,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-j2objc-annotations-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -456,6 +517,9 @@
 
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_MODULE := dialer-animal-sniffer-annotations-target
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_SDK_VERSION := current
 LOCAL_SRC_FILES := ../../../prebuilts/tools/common/m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
 LOCAL_UNINSTALLABLE_MODULE := true
@@ -465,6 +529,9 @@
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := dialer-rootcomponentprocessor
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 LOCAL_IS_HOST_MODULE := true
 BASE_DIR := java/com/android
@@ -482,8 +549,8 @@
 	dialer-guava \
 	dialer-dagger2 \
 	javapoet-prebuilt-jar \
-	dialer-auto-service \
-	dialer-auto-common \
+	auto_service_annotations \
+	auto_common \
 	dialer-javax-annotation-api \
 	dialer-javax-inject
 
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index fe8147f..a93fe2a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -21,7 +21,7 @@
 
   <uses-sdk
     android:minSdkVersion="24"
-    android:targetSdkVersion="28"/>
+    android:targetSdkVersion="29"/>
 
   <uses-permission android:name="android.permission.CALL_PHONE"/>
   <uses-permission android:name="android.permission.READ_CONTACTS"/>
diff --git a/assets/quantum/AndroidManifest.xml b/assets/quantum/AndroidManifest.xml
index f574665..4cfcd97 100644
--- a/assets/quantum/AndroidManifest.xml
+++ b/assets/quantum/AndroidManifest.xml
@@ -16,6 +16,6 @@
   -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.google.android.assets.quantum">
-  <uses-sdk android:targetSdkVersion="28" />
+  <uses-sdk android:targetSdkVersion="29" />
   <application/>
 </manifest>
diff --git a/java/com/android/contacts/common/AndroidManifest.xml b/java/com/android/contacts/common/AndroidManifest.xml
index e972215..8ab5e6e 100644
--- a/java/com/android/contacts/common/AndroidManifest.xml
+++ b/java/com/android/contacts/common/AndroidManifest.xml
@@ -21,6 +21,7 @@
     <activity
       android:name="com.android.contacts.common.dialog.CallSubjectDialog"
       android:theme="@style/Theme.CallSubjectDialogTheme"
+      android:exported="true"
       android:windowSoftInputMode="stateVisible|adjustResize">
       <intent-filter>
         <action android:name="android.intent.action.VIEW"/>
diff --git a/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java b/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java
index ca8ed29..a1dc89d 100644
--- a/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java
+++ b/java/com/android/contacts/common/compat/telecom/TelecomManagerCompat.java
@@ -15,6 +15,8 @@
  */
 package com.android.contacts.common.compat.telecom;
 
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
 import android.support.annotation.Nullable;
 import android.telecom.PhoneAccountHandle;
 import android.telecom.TelecomManager;
@@ -50,13 +52,16 @@
     return null;
   }
 
-  /**
-   * Handovers are supported from Android O-DR onward. Since there is no API bump from O to O-DR, we
-   * need to use reflection to check the existence of TelecomManager.EXTRA_IS_HANDOVER in
-   * http://cs/android/frameworks/base/telecomm/java/android/telecom/TelecomManager.java.
-   */
+  /** Returns true if the Android version supports Handover. */
   public static boolean supportsHandover() {
-    //
+    // Starting with Android P, handover is supported via a public API.
+    if (VERSION.SDK_INT >= VERSION_CODES.P) {
+      return true;
+    }
+    // Handovers are supported from Android O-DR onward. Since there is no API
+    // bump from O to O-DR, we need to use reflection to check the existence
+    // of TelecomManager.EXTRA_IS_HANDOVER in
+    // http://cs/android/frameworks/base/telecomm/java/android/telecom/TelecomManager.java.
     try {
       Field field = TelecomManager.class.getDeclaredField("EXTRA_IS_HANDOVER");
       return "android.telecom.extra.IS_HANDOVER".equals(field.get(null /* obj (static field) */));
diff --git a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogOptionsUtil.java b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogOptionsUtil.java
index 5a44ae7..1880d65 100644
--- a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogOptionsUtil.java
+++ b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogOptionsUtil.java
@@ -16,9 +16,15 @@
 
 package com.android.contacts.common.widget;
 
+import android.os.Parcel;
+import android.os.UserHandle;
+import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
 import com.android.dialer.common.Assert;
 import com.android.dialer.telecom.TelecomUtil;
+
+import com.google.protobuf.ByteString;
+
 import java.util.Collection;
 
 /** Provides common operation on a {@link SelectPhoneAccountDialogOptions} */
@@ -27,9 +33,21 @@
 
   public static PhoneAccountHandle getPhoneAccountHandle(
       SelectPhoneAccountDialogOptions.Entry entry) {
+    UserHandle userHandle;
+    Parcel parcel = Parcel.obtain();
+    try {
+      byte[] marshalledUserHandle = entry.getUserHandle().toByteArray();
+      parcel.unmarshall(marshalledUserHandle, 0, marshalledUserHandle.length);
+      parcel.setDataPosition(0);
+      userHandle = parcel.readParcelable(UserHandle.class.getClassLoader());
+    } catch (NullPointerException e) {
+      userHandle = null;
+    }
+    parcel.recycle();
     return Assert.isNotNull(
         TelecomUtil.composePhoneAccountHandle(
-            entry.getPhoneAccountHandleComponentName(), entry.getPhoneAccountHandleId()));
+            entry.getPhoneAccountHandleComponentName(), entry.getPhoneAccountHandleId(),
+                userHandle));
   }
 
   public static SelectPhoneAccountDialogOptions.Entry.Builder setPhoneAccountHandle(
@@ -38,6 +56,10 @@
     entryBuilder.setPhoneAccountHandleComponentName(
         phoneAccountHandle.getComponentName().flattenToString());
     entryBuilder.setPhoneAccountHandleId(phoneAccountHandle.getId());
+    Parcel parcel = Parcel.obtain();
+    parcel.writeParcelable(phoneAccountHandle.getUserHandle(), 0);
+    entryBuilder.setUserHandle(ByteString.copyFrom(parcel.marshall()));
+    parcel.recycle();
     return entryBuilder;
   }
 
diff --git a/java/com/android/contacts/common/widget/select_phone_account_dialog_options.proto b/java/com/android/contacts/common/widget/select_phone_account_dialog_options.proto
index cc40c64..fc443f0 100644
--- a/java/com/android/contacts/common/widget/select_phone_account_dialog_options.proto
+++ b/java/com/android/contacts/common/widget/select_phone_account_dialog_options.proto
@@ -16,7 +16,6 @@
 
 option java_package = "com.android.contacts.common.widget";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.contacts.common.widget;
@@ -50,5 +49,7 @@
     // in a call so the other SIM cannot be used. Hint should also be set to
     // inform the user why the account is unavailable.
     optional bool enabled = 4 [default = true];
+
+    optional bytes user_handle = 5;
   }
 }
\ No newline at end of file
diff --git a/java/com/android/dialer/app/AndroidManifest.xml b/java/com/android/dialer/app/AndroidManifest.xml
index 190f098..be0015b 100644
--- a/java/com/android/dialer/app/AndroidManifest.xml
+++ b/java/com/android/dialer/app/AndroidManifest.xml
@@ -56,7 +56,7 @@
 
   <uses-sdk
     android:minSdkVersion="24"
-    android:targetSdkVersion="28"/>
+    android:targetSdkVersion="29"/>
 
   <application>
 
@@ -78,7 +78,8 @@
       android:theme="@style/DialtactsTheme">
     </activity>
 
-    <receiver android:name="com.android.dialer.app.calllog.CallLogReceiver">
+    <receiver android:name="com.android.dialer.app.calllog.CallLogReceiver"
+        android:exported="true">
       <intent-filter>
         <action android:name="android.intent.action.NEW_VOICEMAIL"/>
         <data
@@ -115,6 +116,7 @@
 
     <receiver
       android:directBootAware="true"
+      android:exported="true"
       android:name="com.android.dialer.app.calllog.MissedCallNotificationReceiver">
       <intent-filter>
         <action android:name="android.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION"/>
@@ -122,6 +124,7 @@
     </receiver>
     <!-- Handles voicemail notifications from telephony. Requires O -->
     <receiver android:name=".voicemail.LegacyVoicemailNotificationReceiver"
+      android:exported="true"
       android:directBootAware="true">
       <intent-filter>
         <action android:name="android.telephony.action.SHOW_VOICEMAIL_NOTIFICATION"/>
diff --git a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java
index f9f8e0e..7f0a6bc 100644
--- a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java
+++ b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java
@@ -57,7 +57,7 @@
   // make room for the contact name and number label at the bottom of the image.
   private static final float DEFAULT_IMAGE_LETTER_OFFSET = -0.12f;
   private static final float DEFAULT_IMAGE_LETTER_SCALE = 0.70f;
-  // Dummy clip data object that is attached to drag shadows so that text views
+  // Placeholder clip data object that is attached to drag shadows so that text views
   // don't crash with an NPE if the drag shadow is released in their bounds
   private static final ClipData EMPTY_CLIP_DATA = ClipData.newPlainText("", "");
   /** View that contains the transparent shadow that is overlaid on top of the contact image. */
diff --git a/java/com/android/dialer/assisteddialing/AndroidManifest.xml b/java/com/android/dialer/assisteddialing/AndroidManifest.xml
index 3825c50..0c2302b 100644
--- a/java/com/android/dialer/assisteddialing/AndroidManifest.xml
+++ b/java/com/android/dialer/assisteddialing/AndroidManifest.xml
@@ -17,6 +17,6 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
 </manifest>
diff --git a/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml b/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml
index b0a1011..1405841 100644
--- a/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml
+++ b/java/com/android/dialer/assisteddialing/ui/AndroidManifest.xml
@@ -17,13 +17,14 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
   <application>
     <activity
         android:label="@string/assisted_dialing_setting_title"
         android:name=".AssistedDialingSettingActivity"
         android:parentActivityName="com.android.dialer.app.settings.DialerSettingsActivity"
+        android:exported="true"
         android:theme="@style/SettingsStyle">
       <intent-filter>
         <action android:name="com.android.dialer.app.settings.SHOW_ASSISTED_DIALING_SETTINGS"/>
diff --git a/java/com/android/dialer/binary/google/AndroidManifest.xml b/java/com/android/dialer/binary/google/AndroidManifest.xml
index 051556b..d504d21 100644
--- a/java/com/android/dialer/binary/google/AndroidManifest.xml
+++ b/java/com/android/dialer/binary/google/AndroidManifest.xml
@@ -21,7 +21,7 @@
 
   <uses-sdk
     android:minSdkVersion="24"
-    android:targetSdkVersion="28"/>
+    android:targetSdkVersion="29"/>
 
   <uses-permission android:name="android.permission.CALL_PHONE"/>
   <uses-permission android:name="android.permission.READ_CONTACTS"/>
diff --git a/java/com/android/dialer/blockreportspam/block_report_spam_dialog_info.proto b/java/com/android/dialer/blockreportspam/block_report_spam_dialog_info.proto
index 70872c7..a9a7c2a 100644
--- a/java/com/android/dialer/blockreportspam/block_report_spam_dialog_info.proto
+++ b/java/com/android/dialer/blockreportspam/block_report_spam_dialog_info.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.blockreportspam";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.blockreportspam;
diff --git a/java/com/android/dialer/callcomposer/camera/CameraManager.java b/java/com/android/dialer/callcomposer/camera/CameraManager.java
index c61f570..e802cc2 100644
--- a/java/com/android/dialer/callcomposer/camera/CameraManager.java
+++ b/java/com/android/dialer/callcomposer/camera/CameraManager.java
@@ -85,7 +85,7 @@
 
   private static final int NO_CAMERA_SELECTED = -1;
 
-  private static final Camera.ShutterCallback DUMMY_SHUTTER_CALLBACK =
+  private static final Camera.ShutterCallback NOOP_SHUTTER_CALLBACK =
       new Camera.ShutterCallback() {
         @Override
         public void onShutter() {
@@ -493,7 +493,7 @@
     try {
       this.camera.takePicture(
           // A shutter callback is required to enable shutter sound
-          DUMMY_SHUTTER_CALLBACK, null /* raw */, null /* postView */, jpegCallback);
+              NOOP_SHUTTER_CALLBACK, null /* raw */, null /* postView */, jpegCallback);
     } catch (final RuntimeException e) {
       LogUtil.e("CameraManager.takePicture", "RuntimeException in CameraManager.takePicture", e);
       takingPicture = false;
diff --git a/java/com/android/dialer/calldetails/proto/call_details_entries.proto b/java/com/android/dialer/calldetails/proto/call_details_entries.proto
index 0f11b53..1ab3af6 100644
--- a/java/com/android/dialer/calldetails/proto/call_details_entries.proto
+++ b/java/com/android/dialer/calldetails/proto/call_details_entries.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.calldetails";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 import "java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto";
diff --git a/java/com/android/dialer/calldetails/proto/call_details_header_info.proto b/java/com/android/dialer/calldetails/proto/call_details_header_info.proto
index e2532d5..d650a40 100644
--- a/java/com/android/dialer/calldetails/proto/call_details_header_info.proto
+++ b/java/com/android/dialer/calldetails/proto/call_details_header_info.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.calldetails";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 import "java/com/android/dialer/phonenumberproto/dialer_phone_number.proto";
diff --git a/java/com/android/dialer/callintent/call_initiation_type.proto b/java/com/android/dialer/callintent/call_initiation_type.proto
index 3823e49..0f74f07 100644
--- a/java/com/android/dialer/callintent/call_initiation_type.proto
+++ b/java/com/android/dialer/callintent/call_initiation_type.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.callintent";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.callintent;
diff --git a/java/com/android/dialer/callintent/call_specific_app_data.proto b/java/com/android/dialer/callintent/call_specific_app_data.proto
index 065a7ab..2ec9030 100644
--- a/java/com/android/dialer/callintent/call_specific_app_data.proto
+++ b/java/com/android/dialer/callintent/call_specific_app_data.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.callintent";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.callintent;
diff --git a/java/com/android/dialer/callintent/speed_dial_contact_type.proto b/java/com/android/dialer/callintent/speed_dial_contact_type.proto
index ecb1c3f..df14f41 100644
--- a/java/com/android/dialer/callintent/speed_dial_contact_type.proto
+++ b/java/com/android/dialer/callintent/speed_dial_contact_type.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.callintent";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.callintent;
diff --git a/java/com/android/dialer/calllog/AndroidManifest.xml b/java/com/android/dialer/calllog/AndroidManifest.xml
index 27e11a0..a487233 100644
--- a/java/com/android/dialer/calllog/AndroidManifest.xml
+++ b/java/com/android/dialer/calllog/AndroidManifest.xml
@@ -18,7 +18,7 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
   <application>
 
diff --git a/java/com/android/dialer/calllog/config/AndroidManifest.xml b/java/com/android/dialer/calllog/config/AndroidManifest.xml
index 2d447af..73a0f1f 100644
--- a/java/com/android/dialer/calllog/config/AndroidManifest.xml
+++ b/java/com/android/dialer/calllog/config/AndroidManifest.xml
@@ -18,7 +18,7 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
   <application>
 
diff --git a/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto b/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto
index 059f957..c34e01b 100644
--- a/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto
+++ b/java/com/android/dialer/calllog/database/contract/coalesced_ids.proto
@@ -16,7 +16,6 @@
 
 option java_package = "com.android.dialer";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer;
diff --git a/java/com/android/dialer/calllog/database/contract/number_attributes.proto b/java/com/android/dialer/calllog/database/contract/number_attributes.proto
index 2c46d1b..97d69d7 100644
--- a/java/com/android/dialer/calllog/database/contract/number_attributes.proto
+++ b/java/com/android/dialer/calllog/database/contract/number_attributes.proto
@@ -16,7 +16,6 @@
 
 option java_package = "com.android.dialer";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer;
diff --git a/java/com/android/dialer/calllog/model/coalesced_row.proto b/java/com/android/dialer/calllog/model/coalesced_row.proto
index 913f072..cfa42c8 100644
--- a/java/com/android/dialer/calllog/model/coalesced_row.proto
+++ b/java/com/android/dialer/calllog/model/coalesced_row.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.calllog.model";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.calllog.model;
diff --git a/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java b/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java
index cf42606..f7f79e1 100644
--- a/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java
+++ b/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java
@@ -92,7 +92,8 @@
   private static final String[] COLUMNS = new String[] {Photo._ID, Photo.PHOTO};
 
   /**
-   * Dummy object used to indicate that a bitmap for a given key could not be stored in the cache.
+   * Placeholder object used to indicate that a bitmap for a given key could not be stored in the
+   * cache.
    */
   private static final BitmapHolder BITMAP_UNAVAILABLE;
   /** Cache size for {@link #bitmapHolderCache} for devices with "large" RAM. */
diff --git a/java/com/android/dialer/database/FilteredNumberContract.java b/java/com/android/dialer/database/FilteredNumberContract.java
index 3efbaaf..5a7153e 100644
--- a/java/com/android/dialer/database/FilteredNumberContract.java
+++ b/java/com/android/dialer/database/FilteredNumberContract.java
@@ -30,7 +30,7 @@
 
   public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
 
-  /** The type of filtering to be applied, e.g. block the number or whitelist the number. */
+  /** The type of filtering to be applied, e.g. block the number or allow the number. */
   public interface FilteredNumberTypes {
 
     int UNDEFINED = 0;
diff --git a/java/com/android/dialer/dialercontact/dialer_contact.proto b/java/com/android/dialer/dialercontact/dialer_contact.proto
index 2d1dfbd..fe108a0 100644
--- a/java/com/android/dialer/dialercontact/dialer_contact.proto
+++ b/java/com/android/dialer/dialercontact/dialer_contact.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.dialercontact";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.dialercontact;
diff --git a/java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto b/java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto
index 8efb35c..6aed395 100644
--- a/java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto
+++ b/java/com/android/dialer/enrichedcall/historyquery/proto/history_result.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.enrichedcall.historyquery.proto";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.enrichedcall.historyquery.proto;
diff --git a/java/com/android/dialer/glidephotomanager/photo_info.proto b/java/com/android/dialer/glidephotomanager/photo_info.proto
index 07908d8..4e18e03 100644
--- a/java/com/android/dialer/glidephotomanager/photo_info.proto
+++ b/java/com/android/dialer/glidephotomanager/photo_info.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.glidephotomanager";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.glidephotomanager;
diff --git a/java/com/android/dialer/historyitemactions/history_item_action_module_info.proto b/java/com/android/dialer/historyitemactions/history_item_action_module_info.proto
index f7022c2..2e8d2a0 100644
--- a/java/com/android/dialer/historyitemactions/history_item_action_module_info.proto
+++ b/java/com/android/dialer/historyitemactions/history_item_action_module_info.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.historyitemactions";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.historyitemactions;
diff --git a/java/com/android/dialer/historyitemactions/history_item_bottom_sheet_header_info.proto b/java/com/android/dialer/historyitemactions/history_item_bottom_sheet_header_info.proto
index 04d9f22..c36c50f 100644
--- a/java/com/android/dialer/historyitemactions/history_item_bottom_sheet_header_info.proto
+++ b/java/com/android/dialer/historyitemactions/history_item_bottom_sheet_header_info.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.historyitemactions";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.historyitemactions;
diff --git a/java/com/android/dialer/interactions/AndroidManifest.xml b/java/com/android/dialer/interactions/AndroidManifest.xml
index 4571a69..a4b0978 100644
--- a/java/com/android/dialer/interactions/AndroidManifest.xml
+++ b/java/com/android/dialer/interactions/AndroidManifest.xml
@@ -8,7 +8,8 @@
       android:exported="false"
       android:name="com.android.dialer.interactions.ContactUpdateService"/>
 
-    <receiver android:name="com.android.dialer.interactions.UndemoteOutgoingCallReceiver">
+    <receiver android:name="com.android.dialer.interactions.UndemoteOutgoingCallReceiver"
+        android:exported="true">
       <intent-filter>
         <action android:name="android.intent.action.NEW_OUTGOING_CALL"/>
       </intent-filter>
diff --git a/java/com/android/dialer/logging/contact_lookup_result.proto b/java/com/android/dialer/logging/contact_lookup_result.proto
index 6dda2a6..4372158 100644
--- a/java/com/android/dialer/logging/contact_lookup_result.proto
+++ b/java/com/android/dialer/logging/contact_lookup_result.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/contact_source.proto b/java/com/android/dialer/logging/contact_source.proto
index fbff642..0c01996 100644
--- a/java/com/android/dialer/logging/contact_source.proto
+++ b/java/com/android/dialer/logging/contact_source.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/dialer_impression.proto b/java/com/android/dialer/logging/dialer_impression.proto
index f3173f8..0f362d9 100644
--- a/java/com/android/dialer/logging/dialer_impression.proto
+++ b/java/com/android/dialer/logging/dialer_impression.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/interaction_event.proto b/java/com/android/dialer/logging/interaction_event.proto
index 47ea534..d7a09bd 100644
--- a/java/com/android/dialer/logging/interaction_event.proto
+++ b/java/com/android/dialer/logging/interaction_event.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/people_api_lookup_error.proto b/java/com/android/dialer/logging/people_api_lookup_error.proto
index e37d10a..4506416 100644
--- a/java/com/android/dialer/logging/people_api_lookup_error.proto
+++ b/java/com/android/dialer/logging/people_api_lookup_error.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/reporting_location.proto b/java/com/android/dialer/logging/reporting_location.proto
index 1d6ba47..d2fd6dd 100644
--- a/java/com/android/dialer/logging/reporting_location.proto
+++ b/java/com/android/dialer/logging/reporting_location.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/screen_event.proto b/java/com/android/dialer/logging/screen_event.proto
index f4d0735..8081f6e 100644
--- a/java/com/android/dialer/logging/screen_event.proto
+++ b/java/com/android/dialer/logging/screen_event.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/ui_action.proto b/java/com/android/dialer/logging/ui_action.proto
index 886fe04..d14bfbb 100644
--- a/java/com/android/dialer/logging/ui_action.proto
+++ b/java/com/android/dialer/logging/ui_action.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/logging/video_tech.proto b/java/com/android/dialer/logging/video_tech.proto
index b5cd351..1f274be 100644
--- a/java/com/android/dialer/logging/video_tech.proto
+++ b/java/com/android/dialer/logging/video_tech.proto
@@ -3,7 +3,6 @@
 package com.android.dialer.logging;
 option java_package = "com.android.dialer.logging";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 
diff --git a/java/com/android/dialer/phonelookup/phone_lookup_info.proto b/java/com/android/dialer/phonelookup/phone_lookup_info.proto
index f5ab5f0..c0fa31d 100644
--- a/java/com/android/dialer/phonelookup/phone_lookup_info.proto
+++ b/java/com/android/dialer/phonelookup/phone_lookup_info.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.phonelookup";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.phonelookup;
@@ -141,7 +140,7 @@
   }
   optional PeopleApiInfo people_api_info = 3;
 
-  // Whether a number is blocked or not. Used by both the system blacklist and
+  // Whether a number is blocked or not. Used by both the system block list and
   // dialer fallback
   enum BlockedState {
     UNKNOWN = 0;
diff --git a/java/com/android/dialer/phonenumberproto/dialer_phone_number.proto b/java/com/android/dialer/phonenumberproto/dialer_phone_number.proto
index ad8a8f9..143e2c8 100644
--- a/java/com/android/dialer/phonenumberproto/dialer_phone_number.proto
+++ b/java/com/android/dialer/phonenumberproto/dialer_phone_number.proto
@@ -16,7 +16,6 @@
 
 option java_package = "com.android.dialer";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer;
diff --git a/java/com/android/dialer/postcall/AndroidManifest.xml b/java/com/android/dialer/postcall/AndroidManifest.xml
index ca7fb71..82101a0 100644
--- a/java/com/android/dialer/postcall/AndroidManifest.xml
+++ b/java/com/android/dialer/postcall/AndroidManifest.xml
@@ -21,7 +21,7 @@
   <activity
       android:name="com.android.dialer.postcall.PostCallActivity"
       android:exported="false"
-      android:theme="@style/Theme.AppCompat.Light"
+      android:theme="@style/Dialer.ThemeBase.NoActionBar"
       android:windowSoftInputMode="adjustResize"/>
   </application>
 </manifest>
diff --git a/java/com/android/dialer/postcall/PostCall.java b/java/com/android/dialer/postcall/PostCall.java
index 542b8d0..376cb45 100644
--- a/java/com/android/dialer/postcall/PostCall.java
+++ b/java/com/android/dialer/postcall/PostCall.java
@@ -72,13 +72,14 @@
 
   private static void promptUserToSendMessage(Activity activity, View rootView) {
     LogUtil.i("PostCall.promptUserToSendMessage", "returned from call, showing post call SnackBar");
+    String number = Assert.isNotNull(getPhoneNumber(activity));
     String message = activity.getString(R.string.post_call_message);
     EnrichedCallManager manager = EnrichedCallComponent.get(activity).getEnrichedCallManager();
-    EnrichedCallCapabilities capabilities = manager.getCapabilities(getPhoneNumber(activity));
+    EnrichedCallCapabilities capabilities = manager.getCapabilities(number);
     LogUtil.i(
         "PostCall.promptUserToSendMessage",
         "number: %s, capabilities: %s",
-        LogUtil.sanitizePhoneNumber(getPhoneNumber(activity)),
+        LogUtil.sanitizePhoneNumber(number),
         capabilities);
 
     boolean isRcsPostCall = capabilities != null && capabilities.isPostCallCapable();
@@ -87,7 +88,6 @@
             ? activity.getString(R.string.post_call_add_message)
             : activity.getString(R.string.post_call_send_message);
 
-    String number = Assert.isNotNull(getPhoneNumber(activity));
     OnClickListener onClickListener =
         v -> {
           Logger.get(activity)
diff --git a/java/com/android/dialer/promotion/impl/AndroidManifest.xml b/java/com/android/dialer/promotion/impl/AndroidManifest.xml
index c938b9a..209072b 100644
--- a/java/com/android/dialer/promotion/impl/AndroidManifest.xml
+++ b/java/com/android/dialer/promotion/impl/AndroidManifest.xml
@@ -18,6 +18,6 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
 </manifest>
diff --git a/java/com/android/dialer/rtt/rtt_transcript.proto b/java/com/android/dialer/rtt/rtt_transcript.proto
index a580b0d..c674ba6 100644
--- a/java/com/android/dialer/rtt/rtt_transcript.proto
+++ b/java/com/android/dialer/rtt/rtt_transcript.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.rtt";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.rtt;
diff --git a/java/com/android/dialer/shortcuts/AndroidManifest.xml b/java/com/android/dialer/shortcuts/AndroidManifest.xml
index c0f07bf..826ad9c 100644
--- a/java/com/android/dialer/shortcuts/AndroidManifest.xml
+++ b/java/com/android/dialer/shortcuts/AndroidManifest.xml
@@ -18,7 +18,7 @@
 
   <uses-sdk
     android:minSdkVersion="24"
-    android:targetSdkVersion="28"/>
+    android:targetSdkVersion="29"/>
 
   <application>
 
diff --git a/java/com/android/dialer/spannable/AndroidManifest.xml b/java/com/android/dialer/spannable/AndroidManifest.xml
index 0b05144..afc1675 100644
--- a/java/com/android/dialer/spannable/AndroidManifest.xml
+++ b/java/com/android/dialer/spannable/AndroidManifest.xml
@@ -18,5 +18,5 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 </manifest>
diff --git a/java/com/android/dialer/telecom/TelecomUtil.java b/java/com/android/dialer/telecom/TelecomUtil.java
index c088146..633a53e 100644
--- a/java/com/android/dialer/telecom/TelecomUtil.java
+++ b/java/com/android/dialer/telecom/TelecomUtil.java
@@ -25,6 +25,7 @@
 import android.net.Uri;
 import android.os.Build.VERSION;
 import android.os.Build.VERSION_CODES;
+import android.os.UserHandle;
 import android.provider.CallLog.Calls;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
@@ -169,6 +170,14 @@
   @Nullable
   public static PhoneAccountHandle composePhoneAccountHandle(
       @Nullable String componentString, @Nullable String accountId) {
+    return composePhoneAccountHandle(componentString, accountId, null);
+  }
+
+  /** Compose {@link PhoneAccountHandle} object from component name, account id and user handle. */
+  @Nullable
+  public static PhoneAccountHandle composePhoneAccountHandle(
+          @Nullable String componentString, @Nullable String accountId,
+          @Nullable UserHandle userHandle) {
     if (TextUtils.isEmpty(componentString) || TextUtils.isEmpty(accountId)) {
       return null;
     }
@@ -176,7 +185,11 @@
     if (componentName == null) {
       return null;
     }
-    return new PhoneAccountHandle(componentName, accountId);
+    if (userHandle == null) {
+      return new PhoneAccountHandle(componentName, accountId);
+    } else {
+      return new PhoneAccountHandle(componentName, accountId, userHandle);
+    }
   }
 
   /**
diff --git a/java/com/android/dialer/voicemail/model/voicemail_entry.proto b/java/com/android/dialer/voicemail/model/voicemail_entry.proto
index c9ca352..c954f96 100644
--- a/java/com/android/dialer/voicemail/model/voicemail_entry.proto
+++ b/java/com/android/dialer/voicemail/model/voicemail_entry.proto
@@ -2,7 +2,6 @@
 
 option java_package = "com.android.dialer.voicemail.model";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer.voicemail.model;
diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml
index 4cb6001..e2afd9a 100644
--- a/java/com/android/incallui/AndroidManifest.xml
+++ b/java/com/android/incallui/AndroidManifest.xml
@@ -19,7 +19,7 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
   <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
   <!-- We use this to disable the status bar buttons of home, back and recent
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index 2a9600a..f2f7a40 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -208,18 +208,22 @@
     int newRoute;
     if (audioState.getRoute() == CallAudioState.ROUTE_SPEAKER) {
       newRoute = CallAudioState.ROUTE_WIRED_OR_EARPIECE;
-      Logger.get(context)
-          .logCallImpression(
-              DialerImpression.Type.IN_CALL_SCREEN_TURN_ON_WIRED_OR_EARPIECE,
-              call.getUniqueCallId(),
-              call.getTimeAddedMs());
+      if (call != null) {
+        Logger.get(context)
+                .logCallImpression(
+                        DialerImpression.Type.IN_CALL_SCREEN_TURN_ON_WIRED_OR_EARPIECE,
+                        call.getUniqueCallId(),
+                        call.getTimeAddedMs());
+      }
     } else {
       newRoute = CallAudioState.ROUTE_SPEAKER;
-      Logger.get(context)
-          .logCallImpression(
-              DialerImpression.Type.IN_CALL_SCREEN_TURN_ON_SPEAKERPHONE,
-              call.getUniqueCallId(),
-              call.getTimeAddedMs());
+      if (call != null) {
+        Logger.get(context)
+                .logCallImpression(
+                        DialerImpression.Type.IN_CALL_SCREEN_TURN_ON_SPEAKERPHONE,
+                        call.getUniqueCallId(),
+                        call.getTimeAddedMs());
+      }
     }
 
     setAudioRoute(newRoute);
diff --git a/java/com/android/incallui/DtmfKeyListener.java b/java/com/android/incallui/DtmfKeyListener.java
index a2a0de0..330630a 100644
--- a/java/com/android/incallui/DtmfKeyListener.java
+++ b/java/com/android/incallui/DtmfKeyListener.java
@@ -55,8 +55,8 @@
    * necessary to copy the implementation.
    *
    * <p>The Spannable is only used to determine which meta keys are pressed, e.g. shift, alt, see
-   * {@link android.text.method.MetaKeyKeyListener#getMetaState(CharSequence)}, so using a dummy
-   * value is fine here.
+   * {@link android.text.method.MetaKeyKeyListener#getMetaState(CharSequence)}, so using a
+   * placeholder value is fine here.
    */
   private static final Spannable EMPTY_SPANNABLE = new SpannableString("");
 
diff --git a/java/com/android/incallui/answer/impl/hint/AndroidManifest.xml b/java/com/android/incallui/answer/impl/hint/AndroidManifest.xml
index dfbba1c..f0d0fef 100644
--- a/java/com/android/incallui/answer/impl/hint/AndroidManifest.xml
+++ b/java/com/android/incallui/answer/impl/hint/AndroidManifest.xml
@@ -3,7 +3,8 @@
   xmlns:android="http://schemas.android.com/apk/res/android">
 
   <application>
-    <receiver android:name=".PawSecretCodeListener">
+    <receiver android:name=".PawSecretCodeListener"
+        android:exported="true">
       <intent-filter>
         <action android:name="android.provider.Telephony.SECRET_CODE" />
         <data android:scheme="android_secret_code" />
diff --git a/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java b/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java
index baec308..b30afa0 100644
--- a/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java
+++ b/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java
@@ -32,7 +32,7 @@
   private static final float MIN_VELOCITY_DP_PER_SECOND = 250;
   private static final float HIGH_VELOCITY_DP_PER_SECOND = 3000;
 
-  /** Crazy math. http://en.wikipedia.org/wiki/B%C3%A9zier_curve */
+  /** Fancy math. http://en.wikipedia.org/wiki/B%C3%A9zier_curve */
   private static final float LINEAR_OUT_SLOW_IN_START_GRADIENT = 1.0f / LINEAR_OUT_SLOW_IN_X2;
 
   private Interpolator linearOutSlowIn;
diff --git a/java/com/android/incallui/autoresizetext/AndroidManifest.xml b/java/com/android/incallui/autoresizetext/AndroidManifest.xml
index f6eb34b..9bff6f2 100644
--- a/java/com/android/incallui/autoresizetext/AndroidManifest.xml
+++ b/java/com/android/incallui/autoresizetext/AndroidManifest.xml
@@ -19,7 +19,7 @@
 
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 
   <application />
 </manifest>
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index f9afd2d..76d3e8b 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -344,6 +344,7 @@
               // now update the UI to possibly re-enable the Merge button based on the number of
               // currently conferenceable calls available or Connection Capabilities.
             case android.telecom.Connection.EVENT_CALL_MERGE_FAILED:
+              isMergeInProcess = false;
               update();
               break;
             case TelephonyManagerCompat.EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE:
diff --git a/java/com/android/incallui/callconfiguration/call_configuration.proto b/java/com/android/incallui/callconfiguration/call_configuration.proto
index 2cf3c06..3ff3922 100644
--- a/java/com/android/incallui/callconfiguration/call_configuration.proto
+++ b/java/com/android/incallui/callconfiguration/call_configuration.proto
@@ -16,7 +16,6 @@
 
 option java_package = "com.android.dialer";
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 
 package com.android.dialer;
diff --git a/java/com/android/incallui/video/protocol/AndroidManifest.xml b/java/com/android/incallui/video/protocol/AndroidManifest.xml
index f58284e..c73ce10 100644
--- a/java/com/android/incallui/video/protocol/AndroidManifest.xml
+++ b/java/com/android/incallui/video/protocol/AndroidManifest.xml
@@ -18,5 +18,5 @@
     package="com.android.incallui.video.protocol">
   <uses-sdk
       android:minSdkVersion="24"
-      android:targetSdkVersion="28"/>
+      android:targetSdkVersion="29"/>
 </manifest>
diff --git a/java/com/android/voicemail/AndroidManifest.xml b/java/com/android/voicemail/AndroidManifest.xml
index d39dfee..ccd89a9 100644
--- a/java/com/android/voicemail/AndroidManifest.xml
+++ b/java/com/android/voicemail/AndroidManifest.xml
@@ -18,7 +18,7 @@
 
   <uses-sdk
     android:minSdkVersion="24"
-    android:targetSdkVersion="28"/>
+    android:targetSdkVersion="29"/>
 
   <!-- Applications using this module should merge these permissions using android_manifest_merge -->
 
diff --git a/java/com/android/voicemail/impl/mail/FetchProfile.java b/java/com/android/voicemail/impl/mail/FetchProfile.java
index 28a7080..5b83fd8 100644
--- a/java/com/android/voicemail/impl/mail/FetchProfile.java
+++ b/java/com/android/voicemail/impl/mail/FetchProfile.java
@@ -56,10 +56,10 @@
     STRUCTURE,
 
     /**
-     * A sane portion of the entire message, cut off at a provider determined limit. This should
-     * generally be around 50kB.
+     * A truncated portion of the entire message, cut off at a provider determined limit. This
+     * should generally be around 50kB.
      */
-    BODY_SANE,
+    BODY_TRUNCATED,
 
     /** The entire message. */
     BODY,
diff --git a/java/com/android/voicemail/impl/mail/store/ImapFolder.java b/java/com/android/voicemail/impl/mail/store/ImapFolder.java
index 3c76ec3..cd3803d 100644
--- a/java/com/android/voicemail/impl/mail/store/ImapFolder.java
+++ b/java/com/android/voicemail/impl/mail/store/ImapFolder.java
@@ -257,7 +257,7 @@
      * ENVELOPE  - UID FETCH (INTERNALDATE UID RFC822.SIZE FLAGS BODY.PEEK[
      *                            HEADER.FIELDS (date subject from content-type to cc)])
      * STRUCTURE - UID FETCH (BODYSTRUCTURE)
-     * BODY_SANE - UID FETCH (BODY.PEEK[]<0.N>) where N = max bytes returned
+     * BODY_TRUNCATED - UID FETCH (BODY.PEEK[]<0.N>) where N = max bytes returned
      * BODY      - UID FETCH (BODY.PEEK[])
      * Part      - UID FETCH (BODY.PEEK[ID]) where ID = mime part ID
      */
@@ -277,8 +277,8 @@
       fetchFields.add(ImapConstants.BODYSTRUCTURE);
     }
 
-    if (fp.contains(FetchProfile.Item.BODY_SANE)) {
-      fetchFields.add(ImapConstants.FETCH_FIELD_BODY_PEEK_SANE);
+    if (fp.contains(FetchProfile.Item.BODY_TRUNCATED)) {
+      fetchFields.add(ImapConstants.FETCH_FIELD_BODY_PEEK_TRUNCATED);
     }
     if (fp.contains(FetchProfile.Item.BODY)) {
       fetchFields.add(ImapConstants.FETCH_FIELD_BODY_PEEK);
@@ -363,7 +363,8 @@
               }
             }
           }
-          if (fp.contains(FetchProfile.Item.BODY) || fp.contains(FetchProfile.Item.BODY_SANE)) {
+          if (fp.contains(FetchProfile.Item.BODY)
+                  || fp.contains(FetchProfile.Item.BODY_TRUNCATED)) {
             // Body is keyed by "BODY[]...".
             // Previously used "BODY[..." but this can be confused with "BODY[HEADER..."
             // TODO Should we accept "RFC822" as well??
diff --git a/java/com/android/voicemail/impl/mail/store/ImapStore.java b/java/com/android/voicemail/impl/mail/store/ImapStore.java
index 6b88080..44b78be 100644
--- a/java/com/android/voicemail/impl/mail/store/ImapStore.java
+++ b/java/com/android/voicemail/impl/mail/store/ImapStore.java
@@ -30,9 +30,9 @@
 public class ImapStore {
   /**
    * A global suggestion to Store implementors on how much of the body should be returned on
-   * FetchProfile.Item.BODY_SANE requests. We'll use 125k now.
+   * FetchProfile.Item.BODY_TRUNCATED requests. We'll use 125k now.
    */
-  public static final int FETCH_BODY_SANE_SUGGESTED_SIZE = (125 * 1024);
+  public static final int FETCH_BODY_TRUNCATED_SUGGESTED_SIZE = (125 * 1024);
 
   private final Context context;
   private final ImapHelper helper;
diff --git a/java/com/android/voicemail/impl/mail/store/imap/ImapConstants.java b/java/com/android/voicemail/impl/mail/store/imap/ImapConstants.java
index fd56952..2dc2254 100644
--- a/java/com/android/voicemail/impl/mail/store/imap/ImapConstants.java
+++ b/java/com/android/voicemail/impl/mail/store/imap/ImapConstants.java
@@ -24,8 +24,8 @@
 
   public static final String FETCH_FIELD_BODY_PEEK_BARE = "BODY.PEEK";
   public static final String FETCH_FIELD_BODY_PEEK = FETCH_FIELD_BODY_PEEK_BARE + "[]";
-  public static final String FETCH_FIELD_BODY_PEEK_SANE =
-      String.format(Locale.US, "BODY.PEEK[]<0.%d>", ImapStore.FETCH_BODY_SANE_SUGGESTED_SIZE);
+  public static final String FETCH_FIELD_BODY_PEEK_TRUNCATED =
+      String.format(Locale.US, "BODY.PEEK[]<0.%d>", ImapStore.FETCH_BODY_TRUNCATED_SUGGESTED_SIZE);
   public static final String FETCH_FIELD_HEADERS =
       "BODY.PEEK[HEADER.FIELDS (date subject from content-type to cc message-id content-duration)]";
 
diff --git a/java/com/android/voicemail/impl/mail/store/imap/ImapTempFileLiteral.java b/java/com/android/voicemail/impl/mail/store/imap/ImapTempFileLiteral.java
index 417adcc..f452c9d 100644
--- a/java/com/android/voicemail/impl/mail/store/imap/ImapTempFileLiteral.java
+++ b/java/com/android/voicemail/impl/mail/store/imap/ImapTempFileLiteral.java
@@ -74,7 +74,7 @@
       // It's probably possible if we're low on storage and the system clears the cache dir.
       LogUtils.w(TAG, "ImapTempFileLiteral: Temp file not found");
 
-      // Return 0 byte stream as a dummy...
+      // Return 0 byte stream as a placeholder...
       return new ByteArrayInputStream(new byte[0]);
     }
   }
diff --git a/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto b/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
index 8248b02..117efae 100644
--- a/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
+++ b/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
@@ -5,7 +5,6 @@
 package google.internal.communications.voicemailtranscription.v1;
 
 option java_multiple_files = true;
-option optimize_for = LITE_RUNTIME;
 
 option java_package = "com.google.internal.communications.voicemailtranscription.v1";