am 4d9749fd: am 2f5cb843: am 6490d869: Merge "Add subId as parameter for get/setDataEnabled." into lmp-mr1-dev
* commit '4d9749fd5d2852bb17c7c3b19df03a8c9e061593': Add subId as parameter for get/setDataEnabled.
This commit is contained in:
@@ -37,6 +37,7 @@ import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.Log;
|
||||
@@ -1297,9 +1298,15 @@ public class ConnectivityManager {
|
||||
if (b != null) {
|
||||
try {
|
||||
ITelephony it = ITelephony.Stub.asInterface(b);
|
||||
return it.getDataEnabled();
|
||||
int subId = SubscriptionManager.getDefaultDataSubId();
|
||||
Log.d("ConnectivityManager", "getMobileDataEnabled()+ subId=" + subId);
|
||||
boolean retVal = it.getDataEnabled(subId);
|
||||
Log.d("ConnectivityManager", "getMobileDataEnabled()- subId=" + subId
|
||||
+ " retVal=" + retVal);
|
||||
return retVal;
|
||||
} catch (RemoteException e) { }
|
||||
}
|
||||
Log.d("ConnectivityManager", "getMobileDataEnabled()- remote exception retVal=false");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user