summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorSohani Rao <sohanirao@google.com>2016-11-22 15:10:10 -0800
committerSohani Rao <sohanirao@google.com>2016-12-16 12:59:35 -0800
commit5d5603055452debfeb6e958a17c419be516f4572 (patch)
tree1bdc4df202d19b445808d2c1408362866598c7a9 /service
parent7275c974c1d7b9451d1e67ae8d56a9d57742303c (diff)
Add logging for messages sent to WifiP2pService
Use WifiHandler in WifiP2pService in order to log incoming messages. Bug: 33089660 Test: Unit test and sanity test Change-Id: I52df6301daca5bed8c2d756e24ae72c00b23efc4
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
index 6c40139a3..ecdd4021a 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -50,7 +50,6 @@ import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
-import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.INetworkManagementService;
@@ -83,6 +82,7 @@ import com.android.server.wifi.WifiMonitor;
import com.android.server.wifi.WifiNative;
import com.android.server.wifi.WifiStateMachine;
import com.android.server.wifi.util.WifiAsyncChannel;
+import com.android.server.wifi.util.WifiHandler;
import com.android.server.wifi.util.WifiPermissionsUtil;
import com.android.server.wifi.util.WifiPermissionsWrapper;
@@ -316,14 +316,15 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
/**
* Handles client connections
*/
- private class ClientHandler extends Handler {
+ private class ClientHandler extends WifiHandler {
- ClientHandler(android.os.Looper looper) {
- super(looper);
+ ClientHandler(String tag, android.os.Looper looper) {
+ super(tag, looper);
}
@Override
public void handleMessage(Message msg) {
+ super.handleMessage(msg);
switch (msg.what) {
case WifiP2pManager.SET_DEVICE_NAME:
case WifiP2pManager.SET_WFD_INFO:
@@ -372,7 +373,7 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
HandlerThread wifiP2pThread = new HandlerThread("WifiP2pService");
wifiP2pThread.start();
- mClientHandler = new ClientHandler(wifiP2pThread.getLooper());
+ mClientHandler = new ClientHandler(TAG, wifiP2pThread.getLooper());
mP2pStateMachine = new P2pStateMachine(TAG, wifiP2pThread.getLooper(), mP2pSupported);
mP2pStateMachine.start();
}