summaryrefslogtreecommitdiffstats
path: root/java/com/android/voicemail/impl
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-10-24 14:05:52 -0700
committerEric Erfanian <erfanian@google.com>2017-10-24 14:05:52 -0700
commit938468da6f5c225ebb161a68bd949c9cf3261892 (patch)
tree232533fa35dc9d140fdfe0dac82b2bd21ad1b5c4 /java/com/android/voicemail/impl
parent958b292fc04ad15879fff47df929d6d1a826615c (diff)
downloadandroid_packages_apps_Dialer-938468da6f5c225ebb161a68bd949c9cf3261892.tar.gz
android_packages_apps_Dialer-938468da6f5c225ebb161a68bd949c9cf3261892.tar.bz2
android_packages_apps_Dialer-938468da6f5c225ebb161a68bd949c9cf3261892.zip
Rename the new bubble package name from "bubble" to "newbubble".
It fixes AOSP for package name conflict. Test: manual PiperOrigin-RevId: 173298696 Change-Id: Id10ebe0bcf029e61f65cf6580c7198abd8395081
Diffstat (limited to 'java/com/android/voicemail/impl')
-rw-r--r--java/com/android/voicemail/impl/OmtpService.java13
-rw-r--r--java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java31
-rw-r--r--java/com/android/voicemail/impl/VvmPhoneStateListener.java4
-rw-r--r--java/com/android/voicemail/impl/protocol/Vvm3EventHandler.java2
-rw-r--r--java/com/android/voicemail/impl/protocol/Vvm3Protocol.java2
-rw-r--r--java/com/android/voicemail/impl/res/xml/vvm_config.xml6
-rw-r--r--java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java2
-rw-r--r--java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java2
-rw-r--r--java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java2
-rw-r--r--java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto5
10 files changed, 47 insertions, 22 deletions
diff --git a/java/com/android/voicemail/impl/OmtpService.java b/java/com/android/voicemail/impl/OmtpService.java
index 4db1aeb7e..4e8860c02 100644
--- a/java/com/android/voicemail/impl/OmtpService.java
+++ b/java/com/android/voicemail/impl/OmtpService.java
@@ -25,6 +25,7 @@ import android.preference.PreferenceManager;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.telecom.PhoneAccountHandle;
+import android.telephony.TelephonyManager;
import android.telephony.VisualVoicemailService;
import android.telephony.VisualVoicemailSms;
import com.android.dialer.logging.DialerImpression;
@@ -63,6 +64,7 @@ public class OmtpService extends VisualVoicemailService {
}
if (!isServiceEnabled(phoneAccountHandle)) {
+ disableFilter(phoneAccountHandle);
task.finish();
return;
}
@@ -87,6 +89,8 @@ public class OmtpService extends VisualVoicemailService {
}
if (!isServiceEnabled(sms.getPhoneAccountHandle())) {
+ VvmLog.e(TAG, "onSmsReceived received when service is disabled");
+ disableFilter(sms.getPhoneAccountHandle());
task.finish();
return;
}
@@ -178,6 +182,15 @@ public class OmtpService extends VisualVoicemailService {
return true;
}
+ private void disableFilter(PhoneAccountHandle phoneAccountHandle) {
+ TelephonyManager telephonyManager =
+ getSystemService(TelephonyManager.class).createForPhoneAccountHandle(phoneAccountHandle);
+ if (telephonyManager != null) {
+ VvmLog.i(TAG, "disabling SMS filter");
+ telephonyManager.setVisualVoicemailSmsFilterSettings(null);
+ }
+ }
+
private static boolean isUserUnlocked(@NonNull Context context) {
UserManager userManager = context.getSystemService(UserManager.class);
return userManager.isUserUnlocked();
diff --git a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
index 90303f59f..f8dc4bd79 100644
--- a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
+++ b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
@@ -87,6 +87,8 @@ public class OmtpVvmCarrierConfigHelper {
public static final String KEY_VVM_CLIENT_PREFIX_STRING = "vvm_client_prefix_string";
+ @Nullable private static PersistableBundle sOverrideConfigForTest;
+
private final Context mContext;
private final PersistableBundle mCarrierConfig;
private final String mVvmType;
@@ -114,16 +116,22 @@ public class OmtpVvmCarrierConfigHelper {
return;
}
- if (ConfigOverrideFragment.isOverridden(context)) {
- mOverrideConfig = ConfigOverrideFragment.getConfig(context);
- VvmLog.w(TAG, "Config override is activated: " + mOverrideConfig);
+ if (sOverrideConfigForTest != null) {
+ mOverrideConfig = sOverrideConfigForTest;
+ mCarrierConfig = new PersistableBundle();
+ mTelephonyConfig = new PersistableBundle();
} else {
- mOverrideConfig = null;
- }
+ if (ConfigOverrideFragment.isOverridden(context)) {
+ mOverrideConfig = ConfigOverrideFragment.getConfig(context);
+ VvmLog.w(TAG, "Config override is activated: " + mOverrideConfig);
+ } else {
+ mOverrideConfig = null;
+ }
- mCarrierConfig = getCarrierConfig(telephonyManager);
- mTelephonyConfig =
- new TelephonyVvmConfigManager(context).getConfig(telephonyManager.getSimOperator());
+ mCarrierConfig = getCarrierConfig(telephonyManager);
+ mTelephonyConfig =
+ new TelephonyVvmConfigManager(context).getConfig(telephonyManager.getSimOperator());
+ }
mVvmType = getVvmType();
mProtocol = VisualVoicemailProtocolFactory.create(mContext.getResources(), mVvmType);
@@ -275,7 +283,7 @@ public class OmtpVvmCarrierConfigHelper {
* Hidden Config.
*
* <p>Sometimes the server states it supports a certain feature but we found they have bug on the
- * server side. For example, in b/28717550 the server reported AUTH=DIGEST-MD5 capability but
+ * server side. For example, in a bug the server reported AUTH=DIGEST-MD5 capability but
* using it to login will cause subsequent response to be erroneous.
*
* @return A set of capabilities that is reported by the IMAP CAPABILITY command, but determined
@@ -485,4 +493,9 @@ public class OmtpVvmCarrierConfigHelper {
}
return defaultValue;
}
+
+ @VisibleForTesting
+ public static void setOverrideConfigForTest(PersistableBundle config) {
+ sOverrideConfigForTest = config;
+ }
}
diff --git a/java/com/android/voicemail/impl/VvmPhoneStateListener.java b/java/com/android/voicemail/impl/VvmPhoneStateListener.java
index 00c1358ab..914120b69 100644
--- a/java/com/android/voicemail/impl/VvmPhoneStateListener.java
+++ b/java/com/android/voicemail/impl/VvmPhoneStateListener.java
@@ -24,7 +24,7 @@ import com.android.voicemail.impl.sync.VoicemailStatusQueryHelper;
import com.android.voicemail.impl.sync.VvmAccountManager;
/**
- * Check if service is lost and indicate this in the voicemail status. TODO(b/35125657): Not used
+ * Check if service is lost and indicate this in the voicemail status. TODO(a bug): Not used
* for now, restore it.
*/
public class VvmPhoneStateListener extends PhoneStateListener {
@@ -36,7 +36,7 @@ public class VvmPhoneStateListener extends PhoneStateListener {
private int mPreviousState = -1;
public VvmPhoneStateListener(Context context, PhoneAccountHandle accountHandle) {
- // TODO(twyen): b/32637799 too much trouble to call super constructor through reflection,
+ // TODO(twyen): a bug too much trouble to call super constructor through reflection,
// just use non-phoneAccountHandle version for now.
super();
mContext = context;
diff --git a/java/com/android/voicemail/impl/protocol/Vvm3EventHandler.java b/java/com/android/voicemail/impl/protocol/Vvm3EventHandler.java
index 8bc3cc21c..24f530f6e 100644
--- a/java/com/android/voicemail/impl/protocol/Vvm3EventHandler.java
+++ b/java/com/android/voicemail/impl/protocol/Vvm3EventHandler.java
@@ -34,7 +34,7 @@ import java.lang.annotation.RetentionPolicy;
* Handles {@link OmtpEvents} when {@link Vvm3Protocol} is being used. This handler writes custom
* error codes into the voicemail status table so support on the dialer side is required.
*
- * <p>TODO(b/29577838) disable VVM3 by default so support on system dialer can be ensured.
+ * <p>TODO(a bug) disable VVM3 by default so support on system dialer can be ensured.
*/
public class Vvm3EventHandler {
diff --git a/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java b/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java
index fc7fdf3d4..5454bac54 100644
--- a/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java
+++ b/java/com/android/voicemail/impl/protocol/Vvm3Protocol.java
@@ -216,7 +216,7 @@ public class Vvm3Protocol extends VisualVoicemailProtocol {
new ImapHelper(config.getContext(), phoneAccountHandle, network, status)) {
// VVM3 has inconsistent error language code to OMTP. Just issue a raw command
// here.
- // TODO(b/29082671): use LocaleList
+ // TODO(a bug): use LocaleList
if (Locale.getDefault().getLanguage().equals(new Locale(ISO639_Spanish).getLanguage())) {
// Spanish
helper.changeVoicemailTuiLanguage(VVM3_VM_LANGUAGE_SPANISH_STANDARD_NO_GUEST_PROMPTS);
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 d95f315bb..1e5190a7c 100644
--- a/java/com/android/voicemail/impl/res/xml/vvm_config.xml
+++ b/java/com/android/voicemail/impl/res/xml/vvm_config.xml
@@ -38,7 +38,7 @@
value="true"/>
<!-- Carrier VVM app com.orange.vvm only supports Orange FR-->
<string-array name="vvm_disabled_capabilities_string_array">
- <!-- b/32365569 -->
+ <!-- a bug -->
<item value="STARTTLS"/>
</string-array>
</pbundle_as_map>
@@ -62,7 +62,7 @@
name="vvm_cellular_data_required_bool"
value="true"/>
<string-array name="vvm_disabled_capabilities_string_array">
- <!-- b/32365569 -->
+ <!-- a bug -->
<item value="STARTTLS"/>
</string-array>
</pbundle_as_map>
@@ -101,7 +101,7 @@
</string-array>
<string name="vvm_type_string">vvm_type_cvvm</string>>
<string-array name="vvm_disabled_capabilities_string_array">
- <!-- b/28717550 -->
+ <!-- a bug -->
<item value="AUTH=DIGEST-MD5"/>
</string-array>
</pbundle_as_map>
diff --git a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
index 5b5d6b054..f7c8f29c7 100644
--- a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
+++ b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
@@ -122,7 +122,7 @@ public class OmtpVvmSyncService {
success = downloadOneVoicemail(imapHelper, voicemail, phoneAccount);
}
if (success) {
- // TODO: b/30569269 failure should interrupt all subsequent task via exceptions
+ // TODO: a bug failure should interrupt all subsequent task via exceptions
imapHelper.updateQuota();
autoDeleteAndArchiveVM(imapHelper, phoneAccount);
imapHelper.handleEvent(OmtpEvents.DATA_IMAP_OPERATION_COMPLETED);
diff --git a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
index 316e1ca61..1af5e688e 100644
--- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
+++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
@@ -83,7 +83,7 @@ public class VoicemailsQueryHelper {
/**
* Utility method to make queries to the voicemail database.
*
- * <p>TODO(b/36588206) add PhoneAccountHandle filtering back
+ * <p>TODO(a bug) add PhoneAccountHandle filtering back
*
* @param selection A filter declaring which rows to return. {@code null} returns all rows.
* @return A list of voicemails according to the selection statement.
diff --git a/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java b/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java
index 068b19b70..17f5c1608 100644
--- a/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java
+++ b/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java
@@ -128,7 +128,7 @@ public abstract class VvmNetworkRequestCallback extends ConnectivityManager.Netw
@CallSuper
public void onUnavailable() {
- // TODO(twyen): b/32637799 this is hidden, do we really need this?
+ // TODO(twyen): a bug this is hidden, do we really need this?
mResultReceived = true;
onFailed(NETWORK_REQUEST_FAILED_TIMEOUT);
}
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 697e9e337..b06017075 100644
--- a/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
+++ b/java/com/android/voicemail/impl/transcribe/grpc/voicemail_transcription.proto
@@ -1,4 +1,4 @@
-// LINT.IfChange
+
syntax = "proto2";
@@ -151,5 +151,4 @@ service VoicemailTranscriptionService {
}
}
-// LINT.ThenChange(//depot/google3/google/internal/communications/voicemailtranscription/v1/\
-// voicemail_transcription.proto)
+