summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2016-11-18 12:49:00 (GMT)
committerAdrian DC <radian.dc@gmail.com>2016-12-03 23:34:44 (GMT)
commit257f72aa48f014687831bbf12af152122aff7b73 (patch)
treea5de07272a2eec81459d542b1bde42d70e9c9985
parentfa6fd70b3b5c5b4f34e124b203885a54540baa71 (diff)
downloadandroid_packages_apps_Messaging-stable/cm-13.0-ZNH5Y.zip
android_packages_apps_Messaging-stable/cm-13.0-ZNH5Y.tar.gz
android_packages_apps_Messaging-stable/cm-13.0-ZNH5Y.tar.bz2
Messaging: Fix incorrect equality checkstable/cm-13.0-ZNH5Y
The change https://review.cyanogenmod.org/#/c/163343/ introduced an incorrect equality check resulting in sms not being sent when sms preference is set to "Always choose". Correctly use equals() to fix this issue. RM-290 Change-Id: Ic1a4667163c8da5c3e2108e460c25c07e0903241
-rw-r--r--src/com/android/messaging/ui/conversation/ComposeMessageView.java2
-rwxr-xr-xsrc/com/cyanogenmod/messaging/quickmessage/QuickMessagePopup.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/messaging/ui/conversation/ComposeMessageView.java b/src/com/android/messaging/ui/conversation/ComposeMessageView.java
index ae1bbec..ffec347 100644
--- a/src/com/android/messaging/ui/conversation/ComposeMessageView.java
+++ b/src/com/android/messaging/ui/conversation/ComposeMessageView.java
@@ -253,7 +253,7 @@ public class ComposeMessageView extends LinearLayout
int subId = 0; // defaulting to 0, just in case
while (phoneAccounts.hasNext()) {
PhoneAccountHandle p = phoneAccounts.next();
- if (p.getId() == selectedAccountHandle.getId()) {
+ if (p.getId().equals(selectedAccountHandle.getId())) {
PhoneAccount phoneAccount = telecomMgr.getPhoneAccount(p);
subId = telephonyManager.getSubIdForPhoneAccount(phoneAccount);
}
diff --git a/src/com/cyanogenmod/messaging/quickmessage/QuickMessagePopup.java b/src/com/cyanogenmod/messaging/quickmessage/QuickMessagePopup.java
index 0bf8b7f..b5f7918 100755
--- a/src/com/cyanogenmod/messaging/quickmessage/QuickMessagePopup.java
+++ b/src/com/cyanogenmod/messaging/quickmessage/QuickMessagePopup.java
@@ -410,7 +410,7 @@ public class QuickMessagePopup extends Activity {
int subId = 0; // defaulting to 0, just in case
while (phoneAccounts.hasNext()) {
PhoneAccountHandle p = phoneAccounts.next();
- if (p.getId() == selectedAccountHandle.getId()) {
+ if (p.getId().equals(selectedAccountHandle.getId())) {
PhoneAccount phoneAccount = telecomMgr.getPhoneAccount(p);
subId = telephonyManager.getSubIdForPhoneAccount(phoneAccount);
}