Merge "Add permission check for CaptivePortal#reevaluateNetwork" am: d0f3cb625e
Change-Id: I2f9de2582025c8fc3782870b8c561ce2002abaf8
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
package android.net;
|
package android.net;
|
||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
|
import android.annotation.RequiresPermission;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.annotation.TestApi;
|
import android.annotation.TestApi;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
@@ -153,6 +154,7 @@ public class CaptivePortal implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@TestApi
|
@TestApi
|
||||||
|
@RequiresPermission(android.Manifest.permission.NETWORK_STACK)
|
||||||
public void reevaluateNetwork() {
|
public void reevaluateNetwork() {
|
||||||
try {
|
try {
|
||||||
ICaptivePortal.Stub.asInterface(mBinder).appRequest(APP_REQUEST_REEVALUATION_REQUIRED);
|
ICaptivePortal.Stub.asInterface(mBinder).appRequest(APP_REQUEST_REEVALUATION_REQUIRED);
|
||||||
|
|||||||
@@ -3739,6 +3739,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
if (nm == null) return;
|
if (nm == null) return;
|
||||||
|
|
||||||
if (request == CaptivePortal.APP_REQUEST_REEVALUATION_REQUIRED) {
|
if (request == CaptivePortal.APP_REQUEST_REEVALUATION_REQUIRED) {
|
||||||
|
checkNetworkStackPermission();
|
||||||
nm.forceReevaluation(Binder.getCallingUid());
|
nm.forceReevaluation(Binder.getCallingUid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user