Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2eea7ac2 authored by Anil Admal's avatar Anil Admal Committed by android-build-merger
Browse files

Merge "Extend support for requestRouteToHostAddress for backward compatibility" am: fa45c06a

am: b85b487e

Change-Id: Ifa60d8f2d60aba4c4e2894dc612c224d45e3992d
parents 2373c8a1 b85b487e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ import android.os.ServiceSpecificException;
import android.os.ShellCallback;
import android.os.ShellCommand;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
@@ -1628,8 +1629,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
     */
    private boolean disallowedBecauseSystemCaller() {
        // TODO: start throwing a SecurityException when GnssLocationProvider stops calling
        // requestRouteToHost.
        if (isSystem(Binder.getCallingUid())) {
        // requestRouteToHost. In Q, GnssLocationProvider is changed to not call requestRouteToHost
        // for devices launched with Q and above. However, existing devices upgrading to Q and
        // above must continued to be supported for few more releases.
        if (isSystem(Binder.getCallingUid()) && SystemProperties.getInt(
                "ro.product.first_api_level", 0) > Build.VERSION_CODES.P) {
            log("This method exists only for app backwards compatibility"
                    + " and must not be called by system services.");
            return true;