Merge "[RTT2] Add API for testing whether feature exists on platform"

This commit is contained in:
Etan Cohen
2017-10-03 20:14:31 +00:00
committed by Android (Google) Code Review
3 changed files with 57 additions and 3 deletions

View File

@@ -1092,8 +1092,15 @@ public final class SystemServer {
if (!disableRtt) {
traceBeginAndSlog("StartWifiRtt");
mSystemServiceManager.startService("com.android.server.wifi.RttService");
mSystemServiceManager.startService("com.android.server.wifi.rtt.RttService");
traceEnd();
if (context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_WIFI_RTT)) {
traceBeginAndSlog("StartRttService");
mSystemServiceManager.startService(
"com.android.server.wifi.rtt.RttService");
traceEnd();
}
}
if (context.getPackageManager().hasSystemFeature(
@@ -1101,8 +1108,6 @@ public final class SystemServer {
traceBeginAndSlog("StartWifiAware");
mSystemServiceManager.startService(WIFI_AWARE_SERVICE_CLASS);
traceEnd();
} else {
Slog.i(TAG, "No Wi-Fi Aware Service (Aware support Not Present)");
}
if (context.getPackageManager().hasSystemFeature(