Skip to content

Commit

Permalink
Don't use invalid phone IDs as index.
Browse files Browse the repository at this point in the history
phoneId can be -1 via this path, triggered via SimBootReceiver:
java.lang.Throwable
     at com.android.internal.telephony.dataconnection.DctController$SwitchInfo.<init>(DctController.java:743)
     at com.android.internal.telephony.dataconnection.DctController.setDefaultDataSubId(DctController.java:781)
     at com.android.internal.telephony.SubscriptionController.setDefaultDataSubId(SubscriptionController.java:1443)
     at com.android.internal.telephony.SubscriptionController.clearDefaultsForInactiveSubIds(SubscriptionController.java:1533)
     at com.android.internal.telephony.ISub$Stub.onTransact(ISub.java:307)
     at android.os.Binder.execTransact(Binder.java:446

Change-Id: Idf050fe5fff9b24cdbf890d0abc12d52fba21b3f
  • Loading branch information
maniac103 authored and Alberto97 committed May 31, 2015
1 parent f994ed0 commit c22973d
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,18 @@ public void handleMessage (Message msg) {
mSubController.getCurrentDds());
mPhones[prefPhoneId].unregisterForAllDataDisconnected(this);
}
Message allowedDataDone = Message.obtain(this,
EVENT_SET_DATA_ALLOW_TRUE_DONE, s);
Phone phone = mPhones[phoneId].getActivePhone();

informDefaultDdsToPropServ(phoneId);
if (phoneId >= 0) {
Message allowedDataDone = Message.obtain(this,
EVENT_SET_DATA_ALLOW_TRUE_DONE, s);
Phone phone = mPhones[phoneId].getActivePhone();

DcTrackerBase dcTracker =((PhoneBase)phone).mDcTracker;
dcTracker.setDataAllowed(true, allowedDataDone);
informDefaultDdsToPropServ(phoneId);

break;
DcTrackerBase dcTracker =((PhoneBase)phone).mDcTracker;
dcTracker.setDataAllowed(true, allowedDataDone);
}
break;
}

case EVENT_DELAYED_RETRY: {
Expand Down

0 comments on commit c22973d

Please sign in to comment.