Use main looper for PhoneStateListener

Also init all subIds to INVALID in constructor

Change-Id: Ic66a2e5a24dbc10d52db0069f0e863c96ec12513
Fixes: 118070636
Test: Manual
This commit is contained in:
jackqdyulei
2018-10-22 10:22:00 -07:00
parent 71a091901f
commit 6ac8d80fcb
5 changed files with 12 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ public class MobileDataPreferenceController extends TogglePreferenceController
super(context, key);
mSubscriptionManager = context.getSystemService(SubscriptionManager.class);
mDataContentObserver = new DataContentObserver(new Handler(Looper.getMainLooper()));
mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
}
@Override