Merge "Extend support for requestRouteToHostAddress for backward compatibility"
am: 1470d8a3b8
Change-Id: I1ecdf945f60d09216e6e8b54754d4feba0437ac1
This commit is contained in:
@@ -133,6 +133,7 @@ import android.os.ServiceSpecificException;
|
|||||||
import android.os.ShellCallback;
|
import android.os.ShellCallback;
|
||||||
import android.os.ShellCommand;
|
import android.os.ShellCommand;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
import android.os.SystemProperties;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -1628,8 +1629,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
*/
|
*/
|
||||||
private boolean disallowedBecauseSystemCaller() {
|
private boolean disallowedBecauseSystemCaller() {
|
||||||
// TODO: start throwing a SecurityException when GnssLocationProvider stops calling
|
// TODO: start throwing a SecurityException when GnssLocationProvider stops calling
|
||||||
// requestRouteToHost.
|
// requestRouteToHost. In Q, GnssLocationProvider is changed to not call requestRouteToHost
|
||||||
if (isSystem(Binder.getCallingUid())) {
|
// 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"
|
log("This method exists only for app backwards compatibility"
|
||||||
+ " and must not be called by system services.");
|
+ " and must not be called by system services.");
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user