Loading java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java +17 −20 Original line number Diff line number Diff line Loading @@ -142,10 +142,14 @@ public class OmtpVvmCarrierConfigHelper { @VisibleForTesting OmtpVvmCarrierConfigHelper( Context context, PersistableBundle carrierConfig, PersistableBundle telephonyConfig) { Context context, PersistableBundle carrierConfig, PersistableBundle telephonyConfig, @Nullable PhoneAccountHandle phoneAccountHandle) { this.context = context; this.carrierConfig = carrierConfig; this.telephonyConfig = telephonyConfig; this.phoneAccountHandle = phoneAccountHandle; overrideConfig = null; vvmType = getVvmType(); protocol = VisualVoicemailProtocolFactory.create(this.context.getResources(), vvmType); Loading Loading @@ -345,7 +349,6 @@ public class OmtpVvmCarrierConfigHelper { } public void startActivation() { Assert.checkArgument(isValid()); PhoneAccountHandle phoneAccountHandle = getPhoneAccountHandle(); if (phoneAccountHandle == null) { // This should never happen Loading @@ -353,18 +356,13 @@ public class OmtpVvmCarrierConfigHelper { return; } if (vvmType == null || vvmType.isEmpty()) { // The VVM type is invalid; we should never have gotten here in the first place since // this is loaded initially in the constructor, and callers should check isValid() // before trying to start activation anyways. VvmLog.e(TAG, "startActivation : vvmType is null or empty for account " + phoneAccountHandle); if (!isValid()) { VvmLog.e(TAG, "startActivation : invalid config for account " + phoneAccountHandle); return; } if (protocol != null) { ActivationTask.start(context, this.phoneAccountHandle, null); } } public void activateSmsFilter() { Assert.checkArgument(isValid()); Loading @@ -378,8 +376,8 @@ public class OmtpVvmCarrierConfigHelper { } public void startDeactivation() { Assert.checkArgument(isValid()); VvmLog.i(TAG, "startDeactivation"); if (isValid()) { if (!isLegacyModeEnabled()) { // SMS should still be filtered in legacy mode context Loading @@ -388,7 +386,6 @@ public class OmtpVvmCarrierConfigHelper { .setVisualVoicemailSmsFilterSettings(null); VvmLog.i(TAG, "filter disabled"); } if (protocol != null) { protocol.startDeactivation(this); } VvmAccountManager.removeAccount(context, getPhoneAccountHandle()); Loading Loading
java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java +17 −20 Original line number Diff line number Diff line Loading @@ -142,10 +142,14 @@ public class OmtpVvmCarrierConfigHelper { @VisibleForTesting OmtpVvmCarrierConfigHelper( Context context, PersistableBundle carrierConfig, PersistableBundle telephonyConfig) { Context context, PersistableBundle carrierConfig, PersistableBundle telephonyConfig, @Nullable PhoneAccountHandle phoneAccountHandle) { this.context = context; this.carrierConfig = carrierConfig; this.telephonyConfig = telephonyConfig; this.phoneAccountHandle = phoneAccountHandle; overrideConfig = null; vvmType = getVvmType(); protocol = VisualVoicemailProtocolFactory.create(this.context.getResources(), vvmType); Loading Loading @@ -345,7 +349,6 @@ public class OmtpVvmCarrierConfigHelper { } public void startActivation() { Assert.checkArgument(isValid()); PhoneAccountHandle phoneAccountHandle = getPhoneAccountHandle(); if (phoneAccountHandle == null) { // This should never happen Loading @@ -353,18 +356,13 @@ public class OmtpVvmCarrierConfigHelper { return; } if (vvmType == null || vvmType.isEmpty()) { // The VVM type is invalid; we should never have gotten here in the first place since // this is loaded initially in the constructor, and callers should check isValid() // before trying to start activation anyways. VvmLog.e(TAG, "startActivation : vvmType is null or empty for account " + phoneAccountHandle); if (!isValid()) { VvmLog.e(TAG, "startActivation : invalid config for account " + phoneAccountHandle); return; } if (protocol != null) { ActivationTask.start(context, this.phoneAccountHandle, null); } } public void activateSmsFilter() { Assert.checkArgument(isValid()); Loading @@ -378,8 +376,8 @@ public class OmtpVvmCarrierConfigHelper { } public void startDeactivation() { Assert.checkArgument(isValid()); VvmLog.i(TAG, "startDeactivation"); if (isValid()) { if (!isLegacyModeEnabled()) { // SMS should still be filtered in legacy mode context Loading @@ -388,7 +386,6 @@ public class OmtpVvmCarrierConfigHelper { .setVisualVoicemailSmsFilterSettings(null); VvmLog.i(TAG, "filter disabled"); } if (protocol != null) { protocol.startDeactivation(this); } VvmAccountManager.removeAccount(context, getPhoneAccountHandle()); Loading