diff options
| author | 2018-10-15 17:08:18 +0000 | |
|---|---|---|
| committer | 2018-10-15 17:08:18 +0000 | |
| commit | 4ed4874429cbbe6ce2c598656821e59ee14062f0 (patch) | |
| tree | 45f3348e7a0e82381f48cde840d887a89c9061b8 | |
| parent | 514aed297526b22d52ea488c3e7b84dcbfbff426 (diff) | |
| parent | 7914b7246bf87f8d025d51710d5afac93b8bc997 (diff) | |
Merge "Moved WifiWakeReasonAndCounts.java out of base/wifi"
| -rw-r--r-- | wifi/java/android/net/wifi/WifiWakeReasonAndCounts.java | 163 |
1 files changed, 0 insertions, 163 deletions
diff --git a/wifi/java/android/net/wifi/WifiWakeReasonAndCounts.java b/wifi/java/android/net/wifi/WifiWakeReasonAndCounts.java deleted file mode 100644 index f5cad139bd23..000000000000 --- a/wifi/java/android/net/wifi/WifiWakeReasonAndCounts.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.net.wifi; - -import android.os.Parcel; -import android.os.Parcelable; - -/** - * A class representing wifi wake reason accounting. - */ - -/** @hide */ -public class WifiWakeReasonAndCounts implements Parcelable { - private static final String TAG = "WifiWakeReasonAndCounts"; - /** - * Wlan can wake host, only when it is cmd/event, local driver-fw - * functions(non-data, non cmd/event) and rx data.The first packet - * from wlan that woke up a sleep host is what is accounted here. - * Total wlan wake to application processor would be: - * [cmdEventWake + driverFwLocalWake + totalRxDataWake] - * A further classification is provided for identifying the reasons - * for wakeup. - */ - public int totalCmdEventWake; - public int totalDriverFwLocalWake; - public int totalRxDataWake; - - public int rxUnicast; - public int rxMulticast; - public int rxBroadcast; - - public int icmp; - public int icmp6; - public int icmp6Ra; - public int icmp6Na; - public int icmp6Ns; - - public int ipv4RxMulticast; - public int ipv6Multicast; - public int otherRxMulticast; - public int[] cmdEventWakeCntArray; - public int[] driverFWLocalWakeCntArray; - - /* {@hide} */ - public WifiWakeReasonAndCounts () { - } - - @Override - /* {@hide} */ - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append(" totalCmdEventWake ").append(totalCmdEventWake); - sb.append(" totalDriverFwLocalWake ").append(totalDriverFwLocalWake); - sb.append(" totalRxDataWake ").append(totalRxDataWake); - - sb.append(" rxUnicast ").append(rxUnicast); - sb.append(" rxMulticast ").append(rxMulticast); - sb.append(" rxBroadcast ").append(rxBroadcast); - - sb.append(" icmp ").append(icmp); - sb.append(" icmp6 ").append(icmp6); - sb.append(" icmp6Ra ").append(icmp6Ra); - sb.append(" icmp6Na ").append(icmp6Na); - sb.append(" icmp6Ns ").append(icmp6Ns); - - sb.append(" ipv4RxMulticast ").append(ipv4RxMulticast); - sb.append(" ipv6Multicast ").append(ipv6Multicast); - sb.append(" otherRxMulticast ").append(otherRxMulticast); - for (int i = 0; i < cmdEventWakeCntArray.length; i++) { - sb.append(" cmdEventWakeCntArray[" + i + "] " + cmdEventWakeCntArray[i]); - } - for (int i = 0; i < driverFWLocalWakeCntArray.length; i++) { - sb.append(" driverFWLocalWakeCntArray[" + i + "] " + driverFWLocalWakeCntArray[i]); - } - - return sb.toString(); - } - - /* Implement the Parcelable interface - * {@hide} - */ - @Override - public int describeContents() { - return 0; - } - - /* Implement the Parcelable interface - * {@hide} - */ - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(totalCmdEventWake); - dest.writeInt(totalDriverFwLocalWake); - dest.writeInt(totalRxDataWake); - - dest.writeInt(rxUnicast); - dest.writeInt(rxMulticast); - dest.writeInt(rxBroadcast); - - dest.writeInt(icmp); - dest.writeInt(icmp6); - dest.writeInt(icmp6Ra); - dest.writeInt(icmp6Na); - dest.writeInt(icmp6Ns); - - dest.writeInt(ipv4RxMulticast); - dest.writeInt(ipv6Multicast); - dest.writeInt(otherRxMulticast); - dest.writeIntArray(cmdEventWakeCntArray); - dest.writeIntArray(driverFWLocalWakeCntArray); - } - - /* Implement the Parcelable interface - * {@hide} - */ - public static final Creator<WifiWakeReasonAndCounts> CREATOR = - new Creator<WifiWakeReasonAndCounts>() { - public WifiWakeReasonAndCounts createFromParcel(Parcel in) { - WifiWakeReasonAndCounts counts = new WifiWakeReasonAndCounts(); - counts.totalCmdEventWake = in.readInt(); - counts.totalDriverFwLocalWake = in.readInt(); - counts.totalRxDataWake = in.readInt(); - - counts.rxUnicast = in.readInt(); - counts.rxMulticast = in.readInt(); - counts.rxBroadcast = in.readInt(); - - counts.icmp = in.readInt(); - counts.icmp6 = in.readInt(); - counts.icmp6Ra = in.readInt(); - counts.icmp6Na = in.readInt(); - counts.icmp6Ns = in.readInt(); - - counts.ipv4RxMulticast = in.readInt(); - counts.ipv6Multicast = in.readInt(); - counts.otherRxMulticast = in.readInt(); - in.readIntArray(counts.cmdEventWakeCntArray); - in.readIntArray(counts.driverFWLocalWakeCntArray); - return counts; - } - /* Implement the Parcelable interface - * {@hide} - */ - @Override - public WifiWakeReasonAndCounts[] newArray(int size) { - return new WifiWakeReasonAndCounts[size]; - } - }; -} |