Merge "Notify NetworkPolicyManagerService on tethering changes" am: 4062bec04e am: 8d7e3b0205
am: 8402cf5078
Change-Id: I4d1081c832c1d3bff9a0946c670929eca4f0f695
This commit is contained in:
@@ -816,7 +816,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
mTestMode = SystemProperties.get("cm.test.mode").equals("true")
|
mTestMode = SystemProperties.get("cm.test.mode").equals("true")
|
||||||
&& SystemProperties.get("ro.build.type").equals("eng");
|
&& SystemProperties.get("ro.build.type").equals("eng");
|
||||||
|
|
||||||
mTethering = new Tethering(mContext, mNetd, statsService);
|
mTethering = new Tethering(mContext, mNetd, statsService, mPolicyManager);
|
||||||
|
|
||||||
mPermissionMonitor = new PermissionMonitor(mContext, mNetd);
|
mPermissionMonitor = new PermissionMonitor(mContext, mNetd);
|
||||||
|
|
||||||
@@ -3036,12 +3036,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
ConnectivityManager.enforceTetherChangePermission(mContext);
|
ConnectivityManager.enforceTetherChangePermission(mContext);
|
||||||
if (isTetheringSupported()) {
|
if (isTetheringSupported()) {
|
||||||
final int status = mTethering.tether(iface);
|
final int status = mTethering.tether(iface);
|
||||||
if (status == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
|
|
||||||
try {
|
|
||||||
mPolicyManager.onTetheringChanged(iface, true);
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return status;
|
return status;
|
||||||
} else {
|
} else {
|
||||||
return ConnectivityManager.TETHER_ERROR_UNSUPPORTED;
|
return ConnectivityManager.TETHER_ERROR_UNSUPPORTED;
|
||||||
@@ -3055,12 +3049,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
|
|
||||||
if (isTetheringSupported()) {
|
if (isTetheringSupported()) {
|
||||||
final int status = mTethering.untether(iface);
|
final int status = mTethering.untether(iface);
|
||||||
if (status == ConnectivityManager.TETHER_ERROR_NO_ERROR) {
|
|
||||||
try {
|
|
||||||
mPolicyManager.onTetheringChanged(iface, false);
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return status;
|
return status;
|
||||||
} else {
|
} else {
|
||||||
return ConnectivityManager.TETHER_ERROR_UNSUPPORTED;
|
return ConnectivityManager.TETHER_ERROR_UNSUPPORTED;
|
||||||
|
|||||||
Reference in New Issue
Block a user