Loading src/com/android/server/telecom/PhoneAccountRegistrar.java +5 −2 Original line number Diff line number Diff line Loading @@ -448,6 +448,8 @@ public class PhoneAccountRegistrar { */ public boolean enablePhoneAccount(PhoneAccountHandle accountHandle, boolean isEnabled) { PhoneAccount account = getPhoneAccountUnchecked(accountHandle); Log.i(this, "Phone account %s %s.", accountHandle.toString(), isEnabled ? "enabled" : "disabled"); if (account == null) { Log.w(this, "Could not find account to enable: " + accountHandle); return false; Loading Loading @@ -1481,10 +1483,11 @@ public class PhoneAccountRegistrar { parser.next(); userSerialNumberString = parser.getText(); } else if (parser.getName().equals(GROUP_ID)) { parser.next(); if (parser.next() == XmlPullParser.TEXT) { groupId = parser.getText(); } } } UserHandle userHandle = null; if (userSerialNumberString != null) { try { Loading tests/src/com/android/server/telecom/tests/PhoneAccountRegistrarTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,16 @@ public class PhoneAccountRegistrarTest extends TelecomTestCase { assertPhoneAccountEquals(input, result); } @MediumTest public void testDefaultPhoneAccountHandleEmptyGroup() throws Exception { DefaultPhoneAccountHandle input = new DefaultPhoneAccountHandle(Process.myUserHandle(), makeQuickAccountHandle("i1"), ""); DefaultPhoneAccountHandle result = roundTripXml(this, input, PhoneAccountRegistrar.sDefaultPhoneAcountHandleXml, mContext); assertDefaultPhoneAccountHandleEquals(input, result); } /** * Test to ensure non-supported values * @throws Exception Loading Loading
src/com/android/server/telecom/PhoneAccountRegistrar.java +5 −2 Original line number Diff line number Diff line Loading @@ -448,6 +448,8 @@ public class PhoneAccountRegistrar { */ public boolean enablePhoneAccount(PhoneAccountHandle accountHandle, boolean isEnabled) { PhoneAccount account = getPhoneAccountUnchecked(accountHandle); Log.i(this, "Phone account %s %s.", accountHandle.toString(), isEnabled ? "enabled" : "disabled"); if (account == null) { Log.w(this, "Could not find account to enable: " + accountHandle); return false; Loading Loading @@ -1481,10 +1483,11 @@ public class PhoneAccountRegistrar { parser.next(); userSerialNumberString = parser.getText(); } else if (parser.getName().equals(GROUP_ID)) { parser.next(); if (parser.next() == XmlPullParser.TEXT) { groupId = parser.getText(); } } } UserHandle userHandle = null; if (userSerialNumberString != null) { try { Loading
tests/src/com/android/server/telecom/tests/PhoneAccountRegistrarTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,16 @@ public class PhoneAccountRegistrarTest extends TelecomTestCase { assertPhoneAccountEquals(input, result); } @MediumTest public void testDefaultPhoneAccountHandleEmptyGroup() throws Exception { DefaultPhoneAccountHandle input = new DefaultPhoneAccountHandle(Process.myUserHandle(), makeQuickAccountHandle("i1"), ""); DefaultPhoneAccountHandle result = roundTripXml(this, input, PhoneAccountRegistrar.sDefaultPhoneAcountHandleXml, mContext); assertDefaultPhoneAccountHandleEquals(input, result); } /** * Test to ensure non-supported values * @throws Exception Loading