summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-10-22 12:23:33 -0700
committerRoshan Pius <rpius@google.com>2019-10-22 23:25:51 +0000
commita0f3319245acfcb29a868ffb016bf657d89b5fbd (patch)
treeb75a3df61680bcd61f438deb9324a49eb0dd8cfe /service
parent4aa627bb5bd98b380e6a3a2c6f2986066a31aa6c (diff)
WifiStack: Replace Slog with Log
Slog is @hide and there are no plans to formalize the surface. Bug: 142092850 Test: Device boots up and connects to wifi networks. Change-Id: Id37e56a18dd1325f2ed3f0af56e2d45cf9dfbee6
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/SupplicantStateTracker.java3
-rw-r--r--service/java/com/android/server/wifi/WifiLockManager.java38
-rw-r--r--service/java/com/android/server/wifi/WifiMulticastLockManager.java4
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java70
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java7
-rw-r--r--service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java8
-rw-r--r--service/java/com/android/server/wifi/util/WifiPermissionsUtil.java7
7 files changed, 66 insertions, 71 deletions
diff --git a/service/java/com/android/server/wifi/SupplicantStateTracker.java b/service/java/com/android/server/wifi/SupplicantStateTracker.java
index a82f45d2f..11148c5ff 100644
--- a/service/java/com/android/server/wifi/SupplicantStateTracker.java
+++ b/service/java/com/android/server/wifi/SupplicantStateTracker.java
@@ -28,7 +28,6 @@ import android.os.Parcelable;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;
-import android.util.Slog;
import com.android.internal.app.IBatteryStats;
import com.android.internal.util.State;
@@ -195,7 +194,7 @@ public class SupplicantStateTracker extends StateMachine {
case UNINITIALIZED: supplState = BatteryStats.WIFI_SUPPL_STATE_UNINITIALIZED; break;
case INVALID: supplState = BatteryStats.WIFI_SUPPL_STATE_INVALID; break;
default:
- Slog.w(TAG, "Unknown supplicant state " + state);
+ Log.w(TAG, "Unknown supplicant state " + state);
supplState = BatteryStats.WIFI_SUPPL_STATE_INVALID;
break;
}
diff --git a/service/java/com/android/server/wifi/WifiLockManager.java b/service/java/com/android/server/wifi/WifiLockManager.java
index a8040eedf..8086fc945 100644
--- a/service/java/com/android/server/wifi/WifiLockManager.java
+++ b/service/java/com/android/server/wifi/WifiLockManager.java
@@ -25,7 +25,7 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.os.WorkSource;
import android.os.WorkSource.WorkChain;
-import android.util.Slog;
+import android.util.Log;
import android.util.SparseArray;
import android.util.StatsLog;
@@ -270,7 +270,7 @@ public class WifiLockManager {
WorkSource newWorkSource = new WorkSource(ws);
if (mVerboseLoggingEnabled) {
- Slog.d(TAG, "updateWifiLockWakeSource: " + wl + ", newWorkSource=" + newWorkSource);
+ Log.d(TAG, "updateWifiLockWakeSource: " + wl + ", newWorkSource=" + newWorkSource);
}
// Note:
@@ -309,7 +309,7 @@ public class WifiLockManager {
mForceHiPerfMode = isEnabled;
mForceLowLatencyMode = false;
if (!updateOpMode()) {
- Slog.e(TAG, "Failed to force hi-perf mode, returning to normal mode");
+ Log.e(TAG, "Failed to force hi-perf mode, returning to normal mode");
mForceHiPerfMode = false;
return false;
}
@@ -326,7 +326,7 @@ public class WifiLockManager {
mForceLowLatencyMode = isEnabled;
mForceHiPerfMode = false;
if (!updateOpMode()) {
- Slog.e(TAG, "Failed to force low-latency mode, returning to normal mode");
+ Log.e(TAG, "Failed to force low-latency mode, returning to normal mode");
mForceLowLatencyMode = false;
return false;
}
@@ -338,7 +338,7 @@ public class WifiLockManager {
*/
public void handleScreenStateChanged(boolean screenOn) {
if (mVerboseLoggingEnabled) {
- Slog.d(TAG, "handleScreenStateChanged: screenOn = " + screenOn);
+ Log.d(TAG, "handleScreenStateChanged: screenOn = " + screenOn);
}
mScreenOn = screenOn;
@@ -418,14 +418,14 @@ public class WifiLockManager {
private void removeUidFromLlWatchList(int uid) {
UidRec uidRec = mLowLatencyUidWatchList.get(uid);
if (uidRec == null) {
- Slog.e(TAG, "Failed to find uid in low-latency watch list");
+ Log.e(TAG, "Failed to find uid in low-latency watch list");
return;
}
if (uidRec.mLockCount > 0) {
uidRec.mLockCount--;
} else {
- Slog.e(TAG, "Error, uid record conatains no locks");
+ Log.e(TAG, "Error, uid record conatains no locks");
}
if (uidRec.mLockCount == 0) {
mLowLatencyUidWatchList.remove(uid);
@@ -475,12 +475,12 @@ public class WifiLockManager {
private synchronized boolean addLock(WifiLock lock) {
if (mVerboseLoggingEnabled) {
- Slog.d(TAG, "addLock: " + lock);
+ Log.d(TAG, "addLock: " + lock);
}
if (findLockByBinder(lock.getBinder()) != null) {
if (mVerboseLoggingEnabled) {
- Slog.d(TAG, "attempted to add a lock when already holding one");
+ Log.d(TAG, "attempted to add a lock when already holding one");
}
return false;
}
@@ -527,7 +527,7 @@ public class WifiLockManager {
}
if (mVerboseLoggingEnabled) {
- Slog.d(TAG, "releaseLock: " + wifiLock);
+ Log.d(TAG, "releaseLock: " + wifiLock);
}
switch(wifiLock.mMode) {
@@ -568,14 +568,14 @@ public class WifiLockManager {
}
if (mVerboseLoggingEnabled) {
- Slog.d(TAG, "Current opMode: " + mCurrentOpMode + " New LockMode: " + newLockMode);
+ Log.d(TAG, "Current opMode: " + mCurrentOpMode + " New LockMode: " + newLockMode);
}
// Otherwise, we need to change current mode, first reset it to normal
switch (mCurrentOpMode) {
case WifiManager.WIFI_MODE_FULL_HIGH_PERF:
if (!mClientModeImpl.setPowerSave(true)) {
- Slog.e(TAG, "Failed to reset the OpMode from hi-perf to Normal");
+ Log.e(TAG, "Failed to reset the OpMode from hi-perf to Normal");
return false;
}
mWifiMetrics.addWifiLockActiveSession(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
@@ -584,7 +584,7 @@ public class WifiLockManager {
case WifiManager.WIFI_MODE_FULL_LOW_LATENCY:
if (!setLowLatencyMode(false)) {
- Slog.e(TAG, "Failed to reset the OpMode from low-latency to Normal");
+ Log.e(TAG, "Failed to reset the OpMode from low-latency to Normal");
return false;
}
mWifiMetrics.addWifiLockActiveSession(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
@@ -604,7 +604,7 @@ public class WifiLockManager {
switch (newLockMode) {
case WifiManager.WIFI_MODE_FULL_HIGH_PERF:
if (!mClientModeImpl.setPowerSave(false)) {
- Slog.e(TAG, "Failed to set the OpMode to hi-perf");
+ Log.e(TAG, "Failed to set the OpMode to hi-perf");
return false;
}
mCurrentSessionStartTimeMs = mClock.getElapsedSinceBootMillis();
@@ -612,7 +612,7 @@ public class WifiLockManager {
case WifiManager.WIFI_MODE_FULL_LOW_LATENCY:
if (!setLowLatencyMode(true)) {
- Slog.e(TAG, "Failed to set the OpMode to low-latency");
+ Log.e(TAG, "Failed to set the OpMode to low-latency");
return false;
}
mCurrentSessionStartTimeMs = mClock.getElapsedSinceBootMillis();
@@ -624,7 +624,7 @@ public class WifiLockManager {
default:
// Invalid mode, don't change currentOpMode , and exit with error
- Slog.e(TAG, "Invalid new opMode: " + newLockMode);
+ Log.e(TAG, "Invalid new opMode: " + newLockMode);
return false;
}
@@ -663,12 +663,12 @@ public class WifiLockManager {
if (lowLatencySupport == LOW_LATENCY_SUPPORTED) {
if (!mClientModeImpl.setLowLatencyMode(enabled)) {
- Slog.e(TAG, "Failed to set low latency mode");
+ Log.e(TAG, "Failed to set low latency mode");
return false;
}
if (!mClientModeImpl.setPowerSave(!enabled)) {
- Slog.e(TAG, "Failed to set power save mode");
+ Log.e(TAG, "Failed to set power save mode");
// Revert the low latency mode
mClientModeImpl.setLowLatencyMode(!enabled);
return false;
@@ -676,7 +676,7 @@ public class WifiLockManager {
} else if (lowLatencySupport == LOW_LATENCY_NOT_SUPPORTED) {
// Only set power save mode
if (!mClientModeImpl.setPowerSave(!enabled)) {
- Slog.e(TAG, "Failed to set power save mode");
+ Log.e(TAG, "Failed to set power save mode");
return false;
}
}
diff --git a/service/java/com/android/server/wifi/WifiMulticastLockManager.java b/service/java/com/android/server/wifi/WifiMulticastLockManager.java
index f7cd5811b..ade4dfa8e 100644
--- a/service/java/com/android/server/wifi/WifiMulticastLockManager.java
+++ b/service/java/com/android/server/wifi/WifiMulticastLockManager.java
@@ -19,7 +19,7 @@ package com.android.server.wifi;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
-import android.util.Slog;
+import android.util.Log;
import android.util.StatsLog;
import com.android.internal.app.IBatteryStats;
@@ -75,7 +75,7 @@ public class WifiMulticastLockManager {
@Override
public void binderDied() {
- Slog.e(TAG, "Multicaster binderDied");
+ Log.e(TAG, "Multicaster binderDied");
synchronized (mMulticasters) {
int i = mMulticasters.indexOf(this);
if (i != -1) {
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index 3fca21892..fb597005a 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -93,7 +93,6 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import android.util.MutableBoolean;
-import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -236,20 +235,20 @@ public class WifiServiceImpl extends BaseWifiService {
if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) {
mClientModeImplChannel = mCmiChannel;
} else {
- Slog.e(TAG, "ClientModeImpl connection failure, error=" + msg.arg1);
+ Log.e(TAG, "ClientModeImpl connection failure, error=" + msg.arg1);
mClientModeImplChannel = null;
}
break;
}
case AsyncChannel.CMD_CHANNEL_DISCONNECTED: {
- Slog.e(TAG, "ClientModeImpl channel lost, msg.arg1 =" + msg.arg1);
+ Log.e(TAG, "ClientModeImpl channel lost, msg.arg1 =" + msg.arg1);
mClientModeImplChannel = null;
//Re-establish connection to state machine
mCmiChannel.connect(mContext, this, mClientModeImpl.getHandler());
break;
}
default: {
- Slog.d(TAG, "ClientModeImplHandler.handleMessage ignoring msg=" + msg);
+ Log.d(TAG, "ClientModeImplHandler.handleMessage ignoring msg=" + msg);
break;
}
}
@@ -313,8 +312,7 @@ public class WifiServiceImpl extends BaseWifiService {
public void checkAndStartWifi() {
// Check if wi-fi needs to be enabled
boolean wifiEnabled = mSettingsStore.isWifiToggleEnabled();
- Slog.i(TAG, "WifiService starting up with Wi-Fi " +
- (wifiEnabled ? "enabled" : "disabled"));
+ Log.i(TAG, "WifiService starting up with Wi-Fi " + (wifiEnabled ? "enabled" : "disabled"));
registerForScanModeChange();
mContext.registerReceiver(
@@ -429,7 +427,7 @@ public class WifiServiceImpl extends BaseWifiService {
return false;
}
} catch (SecurityException e) {
- Slog.e(TAG, "Permission violation - startScan not allowed for"
+ Log.e(TAG, "Permission violation - startScan not allowed for"
+ " uid=" + callingUid + ", packageName=" + packageName + ", reason=" + e);
return false;
} finally {
@@ -783,7 +781,7 @@ public class WifiServiceImpl extends BaseWifiService {
mActiveModeWarden.startSoftAp(softApConfig);
return true;
}
- Slog.e(TAG, "Invalid WifiConfiguration");
+ Log.e(TAG, "Invalid WifiConfiguration");
return false;
}
@@ -954,7 +952,7 @@ public class WifiServiceImpl extends BaseWifiService {
public void updateInterfaceIpState(String ifaceName, int mode) {
// update interface IP state related to local-only hotspot
synchronized (mLocalOnlyHotspotRequests) {
- Slog.d(TAG, "updateInterfaceIpState: ifaceName=" + ifaceName + " mode=" + mode
+ Log.d(TAG, "updateInterfaceIpState: ifaceName=" + ifaceName + " mode=" + mode
+ " previous LOHS mode= " + mLohsInterfaceMode);
switch (mode) {
@@ -980,7 +978,7 @@ public class WifiServiceImpl extends BaseWifiService {
* If concurrent SAPs are allowed, the interface names will differ,
* so we don't have to check the config here.
*/
- Slog.e(TAG, "Unexpected IP mode change on " + ifaceName);
+ Log.e(TAG, "Unexpected IP mode change on " + ifaceName);
mLohsInterfaceName = null;
mLohsInterfaceMode = WifiManager.IFACE_IP_MODE_UNSPECIFIED;
sendHotspotFailedMessageToAllLOHSRequestInfoEntriesLocked(
@@ -1177,7 +1175,7 @@ public class WifiServiceImpl extends BaseWifiService {
public void onStateChanged(int state, int failureReason) {
// The AP state update from ClientModeImpl for softap
synchronized (mLocalOnlyHotspotRequests) {
- Slog.d(TAG, "lohs.onStateChanged: currentState=" + state
+ Log.d(TAG, "lohs.onStateChanged: currentState=" + state
+ " previousState=" + mLohsState + " errorCode= " + failureReason
+ " ifaceName=" + mLohsInterfaceName);
@@ -1464,7 +1462,7 @@ public class WifiServiceImpl extends BaseWifiService {
mWifiThreadRunner.post(() -> mWifiApConfigStore.setApConfiguration(wifiConfig));
return true;
} else {
- Slog.e(TAG, "Invalid WifiConfiguration");
+ Log.e(TAG, "Invalid WifiConfiguration");
return false;
}
}
@@ -1642,7 +1640,7 @@ public class WifiServiceImpl extends BaseWifiService {
return null;
}
} else {
- Slog.e(TAG, "mClientModeImplChannel is not initialized");
+ Log.e(TAG, "mClientModeImplChannel is not initialized");
return null;
}
}
@@ -1663,7 +1661,7 @@ public class WifiServiceImpl extends BaseWifiService {
try {
mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, callingUid);
} catch (SecurityException e) {
- Slog.e(TAG, "Permission violation - getConfiguredNetworks not allowed for uid="
+ Log.e(TAG, "Permission violation - getConfiguredNetworks not allowed for uid="
+ callingUid + ", packageName=" + packageName + ", reason=" + e);
return new ParceledListSlice<>(new ArrayList<>());
} finally {
@@ -1724,7 +1722,7 @@ public class WifiServiceImpl extends BaseWifiService {
try {
mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, callingUid);
} catch (SecurityException e) {
- Slog.e(TAG, "Permission violation - getPrivilegedConfiguredNetworks not allowed for"
+ Log.e(TAG, "Permission violation - getPrivilegedConfiguredNetworks not allowed for"
+ " uid=" + callingUid + ", packageName=" + packageName + ", reason=" + e);
return null;
} finally {
@@ -1855,7 +1853,7 @@ public class WifiServiceImpl extends BaseWifiService {
mLog.info("addOrUpdateNetwork uid=%").c(Binder.getCallingUid()).flush();
if (config == null) {
- Slog.e(TAG, "bad network configuration");
+ Log.e(TAG, "bad network configuration");
return -1;
}
mWifiMetrics.incrementNumAddOrUpdateNetworkCalls();
@@ -1866,7 +1864,7 @@ public class WifiServiceImpl extends BaseWifiService {
PasspointConfiguration passpointConfig =
PasspointProvider.convertFromWifiConfig(config);
if (passpointConfig == null || passpointConfig.getCredential() == null) {
- Slog.e(TAG, "Missing credential for Passpoint profile");
+ Log.e(TAG, "Missing credential for Passpoint profile");
return -1;
}
@@ -1882,14 +1880,14 @@ public class WifiServiceImpl extends BaseWifiService {
passpointConfig.getCredential().setClientPrivateKey(
config.enterpriseConfig.getClientPrivateKey());
if (!addOrUpdatePasspointConfiguration(passpointConfig, packageName)) {
- Slog.e(TAG, "Failed to add Passpoint profile");
+ Log.e(TAG, "Failed to add Passpoint profile");
return -1;
}
// There is no network ID associated with a Passpoint profile.
return 0;
}
- Slog.i("addOrUpdateNetwork", " uid = " + Binder.getCallingUid()
+ Log.i("addOrUpdateNetwork", " uid = " + Binder.getCallingUid()
+ " SSID " + config.SSID
+ " nid=" + config.networkId);
return mWifiThreadRunner.call(
@@ -2089,7 +2087,7 @@ public class WifiServiceImpl extends BaseWifiService {
mScanRequestProxy::getScanResults, Collections.emptyList());
return scanResults;
} catch (SecurityException e) {
- Slog.e(TAG, "Permission violation - getScanResults not allowed for uid="
+ Log.e(TAG, "Permission violation - getScanResults not allowed for uid="
+ uid + ", packageName=" + callingPackage + ", reason=" + e);
return new ArrayList<>();
} finally {
@@ -2341,16 +2339,16 @@ public class WifiServiceImpl extends BaseWifiService {
}
if (macAddress == null) {
- Slog.w(TAG, "Did not find remoteAddress {" + remoteIpAddress + "} in " +
- "/proc/net/arp");
+ Log.w(TAG, "Did not find remoteAddress {" + remoteIpAddress + "} in "
+ + "/proc/net/arp");
} else {
enableTdlsWithMacAddress(macAddress, enable);
}
} catch (FileNotFoundException e) {
- Slog.e(TAG, "Could not open /proc/net/arp to lookup mac address");
+ Log.e(TAG, "Could not open /proc/net/arp to lookup mac address");
} catch (IOException e) {
- Slog.e(TAG, "Could not read /proc/net/arp to lookup mac address");
+ Log.e(TAG, "Could not read /proc/net/arp to lookup mac address");
}
return 0;
}
@@ -2779,16 +2777,16 @@ public class WifiServiceImpl extends BaseWifiService {
enforceNetworkSettingsPermission();
mLog.info("retrieveBackupData uid=%").c(Binder.getCallingUid()).flush();
if (mClientModeImplChannel == null) {
- Slog.e(TAG, "mClientModeImplChannel is not initialized");
+ Log.e(TAG, "mClientModeImplChannel is not initialized");
return null;
}
- Slog.d(TAG, "Retrieving backup data");
+ Log.d(TAG, "Retrieving backup data");
List<WifiConfiguration> wifiConfigurations = mWifiThreadRunner.call(
() -> mWifiConfigManager.getConfiguredNetworksWithPasswords(), null);
byte[] backupData =
mWifiBackupRestore.retrieveBackupDataFromConfigurations(wifiConfigurations);
- Slog.d(TAG, "Retrieved backup data");
+ Log.d(TAG, "Retrieved backup data");
return backupData;
}
@@ -2799,7 +2797,7 @@ public class WifiServiceImpl extends BaseWifiService {
*/
private void restoreNetworks(List<WifiConfiguration> configurations) {
if (configurations == null) {
- Slog.e(TAG, "Backup data parse failed");
+ Log.e(TAG, "Backup data parse failed");
return;
}
int callingUid = Binder.getCallingUid();
@@ -2810,7 +2808,7 @@ public class WifiServiceImpl extends BaseWifiService {
mWifiConfigManager.addOrUpdateNetwork(configuration, callingUid)
.getNetworkId();
if (networkId == WifiConfiguration.INVALID_NETWORK_ID) {
- Slog.e(TAG, "Restore network failed: " + configuration.configKey());
+ Log.e(TAG, "Restore network failed: " + configuration.configKey());
continue;
}
// Enable all networks restored.
@@ -2829,15 +2827,15 @@ public class WifiServiceImpl extends BaseWifiService {
enforceNetworkSettingsPermission();
mLog.info("restoreBackupData uid=%").c(Binder.getCallingUid()).flush();
if (mClientModeImplChannel == null) {
- Slog.e(TAG, "mClientModeImplChannel is not initialized");
+ Log.e(TAG, "mClientModeImplChannel is not initialized");
return;
}
- Slog.d(TAG, "Restoring backup data");
+ Log.d(TAG, "Restoring backup data");
List<WifiConfiguration> wifiConfigurations =
mWifiBackupRestore.retrieveConfigurationsFromBackupData(data);
restoreNetworks(wifiConfigurations);
- Slog.d(TAG, "Restored backup data");
+ Log.d(TAG, "Restored backup data");
}
/**
@@ -2851,16 +2849,16 @@ public class WifiServiceImpl extends BaseWifiService {
enforceNetworkSettingsPermission();
mLog.trace("restoreSupplicantBackupData uid=%").c(Binder.getCallingUid()).flush();
if (mClientModeImplChannel == null) {
- Slog.e(TAG, "mClientModeImplChannel is not initialized");
+ Log.e(TAG, "mClientModeImplChannel is not initialized");
return;
}
- Slog.d(TAG, "Restoring supplicant backup data");
+ Log.d(TAG, "Restoring supplicant backup data");
List<WifiConfiguration> wifiConfigurations =
mWifiBackupRestore.retrieveConfigurationsFromSupplicantBackupData(
supplicantData, ipConfigData);
restoreNetworks(wifiConfigurations);
- Slog.d(TAG, "Restored supplicant backup data");
+ Log.d(TAG, "Restored supplicant backup data");
}
/**
@@ -2950,7 +2948,7 @@ public class WifiServiceImpl extends BaseWifiService {
if (channel != null) {
return mClientModeImpl.syncGetSupportedFeatures(channel);
} else {
- Slog.e(TAG, "mClientModeImplChannel is not initialized");
+ Log.e(TAG, "mClientModeImplChannel is not initialized");
return 0;
}
}
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
index ec480af81..fb048f6c5 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -72,7 +72,6 @@ import android.os.UserManager;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
-import android.util.Slog;
import android.util.SparseArray;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -397,7 +396,7 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
mP2pStateMachine.sendMessage(Message.obtain(msg));
break;
default:
- Slog.d(TAG, "ClientHandler.handleMessage ignoring msg=" + msg);
+ Log.d(TAG, "ClientHandler.handleMessage ignoring msg=" + msg);
break;
}
}
@@ -3779,12 +3778,12 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
@Override
protected void logd(String s) {
- Slog.d(TAG, s);
+ Log.d(TAG, s);
}
@Override
protected void loge(String s) {
- Slog.e(TAG, s);
+ Log.e(TAG, s);
}
/**
diff --git a/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java b/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java
index 01d64e9f5..2749aedf3 100644
--- a/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java
+++ b/service/java/com/android/server/wifi/scanner/BackgroundScanScheduler.java
@@ -23,9 +23,9 @@ import android.net.wifi.WifiScanner;
import android.net.wifi.WifiScanner.ScanData;
import android.net.wifi.WifiScanner.ScanSettings;
import android.util.ArraySet;
+import android.util.Log;
import android.util.Pair;
import android.util.Rational;
-import android.util.Slog;
import com.android.server.wifi.WifiNative;
import com.android.server.wifi.scanner.ChannelHelper.ChannelCollection;
@@ -425,7 +425,7 @@ public class BackgroundScanScheduler {
if (maxScheduledBucket != null) {
return maxScheduledBucket.bucketId;
} else {
- Slog.wtf(TAG, "No bucket found for settings");
+ Log.wtf(TAG, "No bucket found for settings");
return -1;
}
}
@@ -474,7 +474,7 @@ public class BackgroundScanScheduler {
}
if (gcd < PERIOD_MIN_GCD_MS) {
- Slog.wtf(TAG, "found gcd less than min gcd");
+ Log.wtf(TAG, "found gcd less than min gcd");
gcd = PERIOD_MIN_GCD_MS;
}
@@ -517,7 +517,7 @@ public class BackgroundScanScheduler {
}
}
if (index == -1) {
- Slog.wtf(TAG, "Could not find best bucket for period " + requestedPeriod + " in "
+ Log.wtf(TAG, "Could not find best bucket for period " + requestedPeriod + " in "
+ maxNumBuckets + " buckets");
}
return index;
diff --git a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
index 50595b972..877e905f4 100644
--- a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
+++ b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
@@ -30,7 +30,6 @@ import android.os.Build;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Log;
-import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
import com.android.server.wifi.WifiInjector;
@@ -289,7 +288,7 @@ public class WifiPermissionsUtil {
try {
checkPackage(uid, pkgName);
} catch (SecurityException se) {
- Slog.e(TAG, "Package check exception - " + se);
+ Log.e(TAG, "Package check exception - " + se);
return false;
}
@@ -300,7 +299,7 @@ public class WifiPermissionsUtil {
// Location mode must be enabled if needed.
if (needLocationModeEnabled && !isLocationModeEnabled()) {
- Slog.e(TAG, "Location mode is disabled for the device");
+ Log.e(TAG, "Location mode is disabled for the device");
return false;
}
@@ -308,7 +307,7 @@ public class WifiPermissionsUtil {
// location information.
if (!checkCallersLocationPermission(pkgName, uid,
/* coarseForTargetSdkLessThanQ */ false)) {
- Slog.e(TAG, "UID " + uid + " has no location permission");
+ Log.e(TAG, "UID " + uid + " has no location permission");
return false;
}
return true;