Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5469bd6 authored by Nick Pelly's avatar Nick Pelly Committed by Android Git Automerger
Browse files

am 774b943f: am d1f7f4a6: Move hidden API\'s Llcp* and P2p* to f/b/c/j/com/android/internal/nfc.

Merge commit '774b943f'

* commit '774b943f':
  Move hidden API's Llcp* and P2p* to f/b/c/j/com/android/internal/nfc.
parents 57b757c4 774b943f
Loading
Loading
Loading
Loading
+1 −27
Original line number Diff line number Diff line
@@ -14,48 +14,28 @@
 * limitations under the License.
 */

/**
 * File            : LlcpConnectionLessSocket.java
 * Original-Author : Trusted Logic S.A. (Daniel Tomas)
 * Created         : 18-02-2010
 */

package com.trustedlogic.trustednfc.android;
package com.android.internal.nfc;

import java.io.IOException;

import android.nfc.ErrorCodes;
import android.nfc.ILlcpConnectionlessSocket;
import android.nfc.LlcpPacket;

import android.os.RemoteException;
import android.util.Log;

/**
 * LlcpConnectionlessSocket represents a LLCP Connectionless object to be used
 * in a connectionless communication
 *
 * @since AA02.01
 * @hide
 */
public class LlcpConnectionlessSocket {


    private static final String TAG = "LlcpConnectionlessSocket";

    /**
     * The handle returned by the NFC service and used to identify the LLCP connectionless socket in
     * every call of this class.
     *
     * @hide
     */
    protected int mHandle;


    /**
     * The entry point for LLCP Connectionless socket operations.
     *
     * @hide
     */
    protected ILlcpConnectionlessSocket mService;

@@ -66,7 +46,6 @@ public class LlcpConnectionlessSocket {
     * @param service The entry point to the Nfc Service for  LLCP Connectionless socket  class.
     * @param handle The handle returned by the NFC service and used to identify
     *            the socket in subsequent calls.
     * @hide
     */
	LlcpConnectionlessSocket(ILlcpConnectionlessSocket service, int handle) {
        this.mService = service;
@@ -79,7 +58,6 @@ public class LlcpConnectionlessSocket {
     * @param packet Service Access Point number related to a LLCP
     *            Connectionless client and a data buffer to send
     * @throws IOException if the LLCP link has been lost or deactivated.
     * @since AA02.01
     */
    public void sendTo(LlcpPacket packet) throws IOException {
		try {
@@ -99,7 +77,6 @@ public class LlcpConnectionlessSocket {
     * @return data data received from a specific LLCP Connectionless client
     * @throws IOException if the LLCP link has been lost or deactivated.
     * @see LlcpPacket
     * @since AA02.01
     */
    public LlcpPacket receiveFrom() throws IOException {
		try {
@@ -118,8 +95,6 @@ public class LlcpConnectionlessSocket {

    /**
     * Close the created Connectionless socket.
     *
     * @since AA02.01
     */
    public void close() {
		try {
@@ -133,7 +108,6 @@ public class LlcpConnectionlessSocket {
     * Returns the local Service Access Point number of the socket
     *
     * @return sap
     * @since AA02.01
     */
    public int getSap() {
    	int sap = 0;
+1 −10
Original line number Diff line number Diff line
@@ -14,20 +14,11 @@
 * limitations under the License.
 */

/**
 * File            : LLCPException.java
 * Original-Author : Trusted Logic S.A. (Daniel Tomas)
 * Created         : 24-02-2010
 */

package com.trustedlogic.trustednfc.android;
package com.android.internal.nfc;

/**
 * Generic exception thrown in case something unexpected happened during a 
 * LLCP communication.
 *
 * @since AA02.01
 * @hide
 */
public class LlcpException extends Exception {
   /**
+1 −22
Original line number Diff line number Diff line
@@ -14,29 +14,19 @@
 * limitations under the License.
 */

/**
 * File            : LLCPServerSocket.java
 * Original-Author : Trusted Logic S.A. (Daniel Tomas)
 * Created         : 18-02-2010
 */

package com.trustedlogic.trustednfc.android;
package com.android.internal.nfc;

import java.io.IOException;

import android.nfc.ErrorCodes;
import android.nfc.ILlcpSocket;
import android.nfc.ILlcpServiceSocket;

import android.os.RemoteException;
import android.util.Log;

/**
 * LlcpServiceSocket represents a LLCP Service to be used in a
 * Connection-oriented communication
 *
 * @since AA02.01
 * @hide
 */
public class LlcpServiceSocket {

@@ -45,15 +35,11 @@ public class LlcpServiceSocket {
	/**
	 * The handle returned by the NFC service and used to identify the LLCP
	 * Service socket in every call of this class.
	 *
	 * @hide
	 */
	protected int mHandle;

	/**
	 * The entry point for LLCP Service socket operations.
	 *
	 * @hide
	 */
	protected ILlcpServiceSocket mService;

@@ -92,7 +78,6 @@ public class LlcpServiceSocket {
	 * @param handle
	 *            The handle returned by the NFC service and used to identify
	 *            the socket in subsequent calls.
	 * @hide
	 */
	LlcpServiceSocket(ILlcpServiceSocket service, ILlcpSocket socketService, int handle) {
		this.mService = service;
@@ -112,7 +97,6 @@ public class LlcpServiceSocket {
	 *             if not enough ressources are available
	 *
	 * @see LlcpSocket
	 * @since AA02.01
	 */
	public LlcpSocket accept() throws IOException, LlcpException {

@@ -141,7 +125,6 @@ public class LlcpServiceSocket {
	 *
	 * @param timeout
	 *            value of the timeout for the accept request
	 * @since AA02.01
	 */
	public void setAcceptTimeout(int timeout) {
		try {
@@ -155,7 +138,6 @@ public class LlcpServiceSocket {
	 * Get the timeout value of the accept request
	 *
	 * @return mTimeout
	 * @since AA02.01
	 */
	public int getAcceptTimeout() {
		try {
@@ -168,8 +150,6 @@ public class LlcpServiceSocket {

	/**
	 * Close the created Llcp Service socket
	 *
	 * @since AA02.01
	 */
	public void close() {
		try {
@@ -178,5 +158,4 @@ public class LlcpServiceSocket {
			Log.e(TAG, "RemoteException in close(): ", e);
		}
	}

}
+1 −30
Original line number Diff line number Diff line
@@ -14,28 +14,18 @@
 * limitations under the License.
 */

/**
 * File            : LlcpClientSocket.java
 * Original-Author : Trusted Logic S.A. (Daniel Tomas)
 * Created         : 18-02-2010
 */

package com.trustedlogic.trustednfc.android;
package com.android.internal.nfc;

import java.io.IOException;

import android.nfc.ErrorCodes;
import android.nfc.ILlcpSocket;

import android.os.RemoteException;
import android.util.Log;

/**
 * LlcpClientSocket represents a LLCP Connection-Oriented client to be used in a
 * connection-oriented communication
 *
 * @since AA02.01
 * @hide
 */
public class LlcpSocket {

@@ -44,15 +34,11 @@ public class LlcpSocket {
	/**
	 * The handle returned by the NFC service and used to identify the LLCP
	 * socket in every call of this class.
	 *
	 * @hide
	 */
	protected int mHandle;

	/**
	 * The entry point for LLCP socket operations.
	 *
	 * @hide
	 */
	protected ILlcpSocket mService;

@@ -92,7 +78,6 @@ public class LlcpSocket {
	 * @param handle
	 *            The handle returned by the NFC service and used to identify
	 *            the socket in subsequent calls.
	 * @hide
	 */
	LlcpSocket(ILlcpSocket service, int handle) {
		this.mService = service;
@@ -109,7 +94,6 @@ public class LlcpSocket {
	 * @throws LlcpException
	 *             if the connection request is rejected by the remote LLCP
	 *             Service
	 * @since AA02.01
	 */
	public void connect(int sap) throws IOException, LlcpException {
		try {
@@ -137,7 +121,6 @@ public class LlcpSocket {
	 * @throws LlcpException
	 *             if the connection request is rejected by the remote LLCP
	 *             Service
	 * @since AA02.01
	 */
	public void connect(String sn) throws IOException, LlcpException {
		try {
@@ -160,7 +143,6 @@ public class LlcpSocket {
	 *
	 * @param timeout
	 *            timeout value for the connect request
	 * @since AA02.01
	 */
	public void setConnectTimeout(int timeout) {
		try {
@@ -174,7 +156,6 @@ public class LlcpSocket {
	 * Get the timeout value of the connect request
	 *
	 * @return mTimeout
	 * @since AA02.01
	 */
	public int getConnectTimeout() {
		try {
@@ -191,7 +172,6 @@ public class LlcpSocket {
	 *
	 * @throws IOException
	 *             if the LLCP has been lost or deactivated.
	 * @since AA02.01
	 */
	public void close() throws IOException {
		try {
@@ -210,7 +190,6 @@ public class LlcpSocket {
	 *
	 * @throws IOException
	 *             if the LLCP has been lost or deactivated.
	 * @since AA02.01
	 */
	public void send(byte[] data) throws IOException {
		try {
@@ -232,7 +211,6 @@ public class LlcpSocket {
	 * @return length length of the data received
	 * @throws IOException
	 *             if the LLCP has been lost or deactivated.
	 * @since AA02.01
	 */
	public int receive(byte[] receiveBuffer) throws IOException {
		int receivedLength = 0;
@@ -252,7 +230,6 @@ public class LlcpSocket {
	 * Returns the local Service Access Point number of the socket
	 *
	 * @return localSap
	 * @since AA02.01
	 */
	public int getLocalSap() {
		try {
@@ -267,7 +244,6 @@ public class LlcpSocket {
	 * Returns the local Maximum Information Unit(MIU) of the socket
	 *
	 * @return miu
	 * @since AA02.01
	 */
	public int getLocalSocketMiu() {
		try {
@@ -282,7 +258,6 @@ public class LlcpSocket {
	 * Returns the local Receive Window(RW) of the socket
	 *
	 * @return rw
	 * @since AA02.01
	 */
	public int getLocalSocketRw() {
		try {
@@ -301,7 +276,6 @@ public class LlcpSocket {
	 * @return remoteMiu
	 * @throws LlcpException
	 *             if the LlcpClientSocket is not in a CONNECTED_STATE
	 * @since AA02.01
	 */
	public int getRemoteSocketMiu() throws LlcpException {
		try {
@@ -325,7 +299,6 @@ public class LlcpSocket {
	 * @return rw
	 * @throws LlcpException
	 *             if the LlcpClientSocket is not in a CONNECTED_STATE
	 * @since AA02.01
	 */
	public int getRemoteSocketRw() throws LlcpException {
		try {
@@ -340,6 +313,4 @@ public class LlcpSocket {
			return 0;
		}
	}


}
+1 −10
Original line number Diff line number Diff line
@@ -14,20 +14,11 @@
 * limitations under the License.
 */

/**
 * File            : NFCException.java
 * Original-Author : Trusted Logic S.A. (Jeremie Corbier)
 * Created         : 26-08-2009
 */

package com.trustedlogic.trustednfc.android;
package com.android.internal.nfc;

/**
 * Generic exception thrown in case something unexpected happened during the
 * NFCManager operations.
 *
 * @since AA01.04
 * @hide
 */
public class NfcException extends Exception {
   /**
Loading