summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-10-09 22:09:45 -0700
committerLinux Build Service Account <lnxbuild@localhost>2018-10-09 22:09:45 -0700
commit69b0e5f769fd9689fc18e94ec0361e5259000995 (patch)
tree411a2df193b74633da727424e07c057c06c23ba0
parent1d269d38451da7bae4312c289ff31389c12ac17a (diff)
parent64aa6bd9bc430409f354f0e906cbe1620df9e913 (diff)
Merge 64aa6bd9bc430409f354f0e906cbe1620df9e913 on remote branch
Change-Id: I0b0cf652d0fb82db3da905ea6a55c52487b8cd86
-rw-r--r--internal/Android.mk3
-rw-r--r--internal/src/org/codeaurora/internal/Client.aidl33
-rw-r--r--internal/src/org/codeaurora/internal/Client.java115
-rw-r--r--internal/src/org/codeaurora/internal/DcParam.aidl33
-rw-r--r--internal/src/org/codeaurora/internal/DcParam.java105
-rw-r--r--internal/src/org/codeaurora/internal/IExtTelephony.aidl35
-rw-r--r--internal/src/org/codeaurora/internal/INetworkCallback.aidl44
-rw-r--r--internal/src/org/codeaurora/internal/ServiceUtil.java66
-rw-r--r--internal/src/org/codeaurora/internal/SignalStrength.aidl33
-rw-r--r--internal/src/org/codeaurora/internal/SignalStrength.java109
-rw-r--r--internal/src/org/codeaurora/internal/Status.aidl33
-rw-r--r--internal/src/org/codeaurora/internal/Status.java92
-rw-r--r--internal/src/org/codeaurora/internal/Token.aidl33
-rw-r--r--internal/src/org/codeaurora/internal/Token.java90
14 files changed, 823 insertions, 1 deletions
diff --git a/internal/Android.mk b/internal/Android.mk
index 0d53fce..08b95a8 100644
--- a/internal/Android.mk
+++ b/internal/Android.mk
@@ -9,7 +9,8 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src/org) \
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := telephony-ext
-LOCAL_SDK_VERSION := system_current
+LOCAL_PRIVATE_PLATFORM_APIS := true
+#LOCAL_SDK_VERSION := system_current
include $(BUILD_JAVA_LIBRARY)
diff --git a/internal/src/org/codeaurora/internal/Client.aidl b/internal/src/org/codeaurora/internal/Client.aidl
new file mode 100644
index 0000000..0010e9c
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/Client.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+parcelable Client; \ No newline at end of file
diff --git a/internal/src/org/codeaurora/internal/Client.java b/internal/src/org/codeaurora/internal/Client.java
new file mode 100644
index 0000000..8fd7dfb
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/Client.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class Client implements Parcelable {
+
+ private static final String TAG = "Client";
+
+ private int mId;
+ private int mUid;
+ private String mPackageName;
+ private INetworkCallback mCallback;
+
+ public Client(int id, int uid, String packageName, INetworkCallback callback) {
+ mId = id;
+ mUid = uid;
+ mPackageName = packageName;
+ mCallback = callback;
+ }
+
+ public Client(Parcel in) {
+ mId = in.readInt();
+ mUid = in.readInt();
+ mPackageName = in.readString();
+ mCallback = INetworkCallback.Stub.asInterface(in.readStrongBinder());
+ }
+
+ public int getId() {
+ return mId;
+ }
+
+ public int getUid() {
+ return mUid;
+ }
+
+ public String getPackageName() {
+ return mPackageName;
+ }
+
+ public INetworkCallback getCallback() {
+ return mCallback;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(mId);
+ out.writeInt(mUid);
+ out.writeString(mPackageName);
+ out.writeStrongInterface(mCallback);
+ }
+
+ public static final Parcelable.Creator<Client> CREATOR = new Parcelable.Creator() {
+ public Client createFromParcel(Parcel in) {
+ return new Client(in);
+ }
+
+ public Client[] newArray(int size) {
+ return new Client[size];
+ }
+ };
+
+ public void readFromParcel(Parcel in) {
+ mId = in.readInt();
+ mUid = in.readInt();
+ mPackageName = in.readString();
+ mCallback = INetworkCallback.Stub.asInterface(in.readStrongBinder());
+ }
+
+ @Override
+ public String toString() {
+ return "Client{" + "mId=" + getId() + ", mUid=" + getUid() + ", mPackageName='" +
+ getPackageName() + '\'' + ", mCallback=" + getCallback() + '}';
+ }
+}
diff --git a/internal/src/org/codeaurora/internal/DcParam.aidl b/internal/src/org/codeaurora/internal/DcParam.aidl
new file mode 100644
index 0000000..0554518
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/DcParam.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+parcelable DcParam; \ No newline at end of file
diff --git a/internal/src/org/codeaurora/internal/DcParam.java b/internal/src/org/codeaurora/internal/DcParam.java
new file mode 100644
index 0000000..87590ac
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/DcParam.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class DcParam implements Parcelable {
+
+ private static final String TAG = "DcParam";
+
+ public static final int INVALID = -1;
+
+ public static final int ENDC_UNAVAILABLE = 0;
+ public static final int ENDC_AVAILABLE = 1;
+
+ public static final int DCNR_RESTRICTED = 0;
+ public static final int DCNR_UNRESTRICTED = 1;
+
+ private int mEndc = ENDC_UNAVAILABLE;
+ private int mDcnr = DCNR_RESTRICTED;
+
+ public DcParam(int endc, int dcnr) {
+ mEndc = endc;
+ mDcnr = dcnr;
+ }
+
+ public DcParam(Parcel in) {
+ mEndc = in.readInt();
+ mDcnr = in.readInt();
+ }
+
+ public int getEndc() {
+ return mEndc;
+ }
+
+ public int getDcnr() {
+ return mDcnr;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(mEndc);
+ out.writeInt(mDcnr);
+ }
+
+ public static final Parcelable.Creator<DcParam> CREATOR = new Parcelable.Creator() {
+ public DcParam createFromParcel(Parcel in) {
+ return new DcParam(in);
+ }
+
+ public DcParam[] newArray(int size) {
+ return new DcParam[size];
+ }
+ };
+
+ public void readFromParcel(Parcel in) {
+ mEndc = in.readInt();
+ mDcnr = in.readInt();
+ }
+
+ @Override
+ public String toString() {
+ return TAG + ": Endc: " + getEndc() + " Dcnr: " + getDcnr();
+ }
+
+}
diff --git a/internal/src/org/codeaurora/internal/IExtTelephony.aidl b/internal/src/org/codeaurora/internal/IExtTelephony.aidl
index bcea583..ecfbb40 100644
--- a/internal/src/org/codeaurora/internal/IExtTelephony.aidl
+++ b/internal/src/org/codeaurora/internal/IExtTelephony.aidl
@@ -33,6 +33,13 @@ package org.codeaurora.internal;
import org.codeaurora.internal.IDepersoResCallback;
import org.codeaurora.internal.IDsda;
+import org.codeaurora.internal.SignalStrength;
+import org.codeaurora.internal.Status;
+import org.codeaurora.internal.Token;
+import org.codeaurora.internal.DcParam;
+import org.codeaurora.internal.INetworkCallback;
+import org.codeaurora.internal.Client;
+
/**
* Interface used to interact with the telephony framework for
* Telephony value adds.
@@ -267,4 +274,32 @@ interface IExtTelephony {
*/
int getCurrentPrimaryCardSlotId();
+ // Async api
+ Token enable5g(int slotId, in Client client);
+
+ // Async api
+ Token disable5g(int slotId, in Client client);
+
+ // Async api
+ Token enable5gOnly(int slotId, in Client client);
+
+ // Async api
+ Token query5gStatus(int slotId, in Client client);
+
+ // Async api
+ // a.k.a NR EN-DC and restrict-DCNR.
+ Token queryNrDcParam(int slotId, in Client client);
+
+ // Async api
+ Token queryNrBearerAllocation(int slotId, in Client client);
+
+ // Async api
+ Token queryNrSignalStrength(int slotId, in Client client);
+
+ // Async api
+ Client registerCallback(String packageName, INetworkCallback callback);
+
+ // Async api
+ void unRegisterCallback(INetworkCallback callback);
+
}
diff --git a/internal/src/org/codeaurora/internal/INetworkCallback.aidl b/internal/src/org/codeaurora/internal/INetworkCallback.aidl
new file mode 100644
index 0000000..ab299ad
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/INetworkCallback.aidl
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import org.codeaurora.internal.SignalStrength;
+import org.codeaurora.internal.DcParam;
+import org.codeaurora.internal.Status;
+import org.codeaurora.internal.Token;
+
+interface INetworkCallback {
+ void on5gStatus(int slotId, in Token token, in Status status, boolean enableStatus);
+ void onNrDcParam(int slotId, in Token token, in Status status, in DcParam dcParam);
+ void onNrBearerAllocation(int slotId, in Token token, in Status status, boolean allocated);
+ void onSignalStrength(int slotId, in Token token, in Status status,
+ in SignalStrength signalStrength);
+}
diff --git a/internal/src/org/codeaurora/internal/ServiceUtil.java b/internal/src/org/codeaurora/internal/ServiceUtil.java
new file mode 100644
index 0000000..ea30d20
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/ServiceUtil.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.ComponentName;
+import android.os.IBinder;
+import android.os.ServiceManager;
+import android.util.Log;
+
+public class ServiceUtil {
+ private ServiceUtil() {}
+
+ static public boolean bindService(Context context, ServiceConnection connection) {
+ IBinder extTelephony = ServiceManager.getService("extphone");
+
+ boolean success = (extTelephony != null)? true: false;
+
+ if (success) {
+ connection.onServiceConnected(
+ new ComponentName("com.qualcomm.qti.internal.telephony",
+ "com.qualcomm.qti.internal.telephony"
+ + "com.qualcomm.qti.internal.telephony.ExtTelephonyServiceImpl"),
+ extTelephony);
+ } else {
+ /* Service connection failed. Let the client connect to Stub service */
+ }
+
+ return true;
+ }
+
+ static public boolean unbindService(ServiceConnection onnection) {
+ //We are not connecting to a bound service so return true;
+ return true;
+ }
+}
diff --git a/internal/src/org/codeaurora/internal/SignalStrength.aidl b/internal/src/org/codeaurora/internal/SignalStrength.aidl
new file mode 100644
index 0000000..72ad9a3
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/SignalStrength.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+parcelable SignalStrength; \ No newline at end of file
diff --git a/internal/src/org/codeaurora/internal/SignalStrength.java b/internal/src/org/codeaurora/internal/SignalStrength.java
new file mode 100644
index 0000000..0b05381
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/SignalStrength.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class SignalStrength implements Parcelable {
+
+ private static final String TAG = "SignalStrength";
+
+ public static final int INVALID = -32768;
+
+ private static final int MAX_NR_RSRP = -44;
+ private static final int MIN_NR_RSRP = -140;
+
+ private static final int MAX_NR_SNR = -160;
+ private static final int MIN_NR_SNR = -240;
+
+ private int mNrRsrp;
+ private int mNrSnr;
+
+ public SignalStrength() {
+ mNrRsrp = INVALID;
+ mNrSnr = INVALID;
+ }
+
+ public SignalStrength(int rsrp, int snr) {
+ mNrRsrp = rsrp;
+ mNrSnr = snr;
+ }
+
+ public SignalStrength(Parcel in) {
+ mNrRsrp = in.readInt();
+ mNrSnr = in.readInt();
+ }
+
+ public int getRsrp() {
+ return mNrRsrp;
+ }
+
+ public int getSnr() {
+ return mNrSnr;
+ }
+
+ @Override
+ public String toString() {
+ return (TAG + ": Rsrp: " + getRsrp() + " Snr: " + getSnr());
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(mNrRsrp);
+ out.writeInt(mNrSnr);
+ }
+
+ public static final Parcelable.Creator<SignalStrength> CREATOR = new Parcelable.Creator() {
+ public SignalStrength createFromParcel(Parcel in) {
+ return new SignalStrength(in);
+ }
+
+ public SignalStrength[] newArray(int size) {
+ return new SignalStrength[size];
+ }
+ };
+
+ public void readFromParcel(Parcel in) {
+ mNrRsrp = in.readInt();
+ mNrSnr = in.readInt();
+ }
+}
diff --git a/internal/src/org/codeaurora/internal/Status.aidl b/internal/src/org/codeaurora/internal/Status.aidl
new file mode 100644
index 0000000..e00d8f2
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/Status.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+parcelable Status; \ No newline at end of file
diff --git a/internal/src/org/codeaurora/internal/Status.java b/internal/src/org/codeaurora/internal/Status.java
new file mode 100644
index 0000000..866153c
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/Status.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class Status implements Parcelable {
+
+ private static final String TAG = "Status";
+
+ public static final int EXCEPTION = -1;
+ public static final int FAILURE = 0;
+ public static final int SUCCESS = 1;
+
+ private int mStatus;
+
+ public Status(int status) {
+ mStatus = status;
+ }
+
+ public Status(Parcel in) {
+ mStatus = in.readInt();
+ }
+
+ public int get() {
+ return mStatus;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(mStatus);
+ }
+
+ public static final Parcelable.Creator<Status> CREATOR = new Parcelable.Creator() {
+ public Status createFromParcel(Parcel in) {
+ return new Status(in);
+ }
+
+ public Status[] newArray(int size) {
+ return new Status[size];
+ }
+ };
+
+ public void readFromParcel(Parcel in) {
+ mStatus = in.readInt();
+ }
+
+ @Override
+ public String toString() {
+ return TAG + ": " + get();
+ }
+
+}
diff --git a/internal/src/org/codeaurora/internal/Token.aidl b/internal/src/org/codeaurora/internal/Token.aidl
new file mode 100644
index 0000000..72477ed
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/Token.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+parcelable Token; \ No newline at end of file
diff --git a/internal/src/org/codeaurora/internal/Token.java b/internal/src/org/codeaurora/internal/Token.java
new file mode 100644
index 0000000..e5439fc
--- /dev/null
+++ b/internal/src/org/codeaurora/internal/Token.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package org.codeaurora.internal;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class Token implements Parcelable {
+
+ private static final String TAG = "Token";
+
+ public static final int UNSOL = -1;
+
+ private int mValue;
+
+ public Token(int val) {
+ mValue = val;
+ }
+
+ public Token(Parcel in) {
+ mValue = in.readInt();
+ }
+
+ public int get() {
+ return mValue;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(mValue);
+ }
+
+ public static final Parcelable.Creator<Token> CREATOR = new Parcelable.Creator() {
+ public Token createFromParcel(Parcel in) {
+ return new Token(in);
+ }
+
+ public Token[] newArray(int size) {
+ return new Token[size];
+ }
+ };
+
+ public void readFromParcel(Parcel in) {
+ mValue = in.readInt();
+ }
+
+ @Override
+ public String toString() {
+ return TAG + ": " + get();
+ }
+
+}