diff options
author | Nick Pelly <npelly@google.com> | 2011-08-01 14:10:33 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2011-08-01 14:42:51 -0700 |
commit | 209282e9b744f3b9390154ebb69ad5587ccc2688 (patch) | |
tree | 91099c7198cf0159ce1c3a1aaae2327a55c196d0 /src/com/android/nfc | |
parent | f39dd4cf73e846cdc9523f70df5c12984930751f (diff) | |
download | packages_apps_nfc-209282e9b744f3b9390154ebb69ad5587ccc2688.zip packages_apps_nfc-209282e9b744f3b9390154ebb69ad5587ccc2688.tar.gz packages_apps_nfc-209282e9b744f3b9390154ebb69ad5587ccc2688.tar.bz2 |
Minor cleanup: change private members to package.
- remove explicit /* package */ comments
- Change some Log.e to Log.w
Change-Id: Ibcebcc63cd5e14f3a3d9d1f2482295115667814c
Diffstat (limited to 'src/com/android/nfc')
-rwxr-xr-x | src/com/android/nfc/NdefP2pManager.java | 38 | ||||
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 6 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/com/android/nfc/NdefP2pManager.java b/src/com/android/nfc/NdefP2pManager.java index 640e6ff..02b4f7b 100755 --- a/src/com/android/nfc/NdefP2pManager.java +++ b/src/com/android/nfc/NdefP2pManager.java @@ -31,7 +31,6 @@ import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.net.Uri; import android.nfc.INdefPushCallback; -import android.nfc.INfcAdapter; import android.nfc.NdefMessage; import android.nfc.NdefRecord; import android.os.AsyncTask; @@ -48,23 +47,25 @@ import java.util.List; public class NdefP2pManager { public static final String ANDROID_SNEP_SERVICE = "urn:nfc:xsn:android.com:snep"; + // Disable Large-ndef-over-BT while we stabilize me-over-BT (old value 5*1024) - private static final int MAX_SNEP_SIZE_BYTES = Integer.MAX_VALUE; + static final int MAX_SNEP_SIZE_BYTES = Integer.MAX_VALUE; // TODO dynamically assign SAP values - private static final int NDEFPUSH_SAP = 0x10; - private static final int ANDROIDSNEP_SAP = 0x11; + static final int NDEFPUSH_SAP = 0x10; + static final int ANDROIDSNEP_SAP = 0x11; + + static final String TAG = "P2PManager"; + static final boolean DBG = true; - private static final String TAG = "P2PManager"; - private static final boolean DBG = true; final ScreenshotWindowAnimator mScreenshot; - private final NdefPushServer mNdefPushServer; - private final SnepServer mDefaultSnepServer; - private final SnepServer mAndroidSnepServer; + final NdefPushServer mNdefPushServer; + final SnepServer mDefaultSnepServer; + final SnepServer mAndroidSnepServer; final BluetoothDropbox mBluetoothDropbox; - private final ActivityManager mActivityManager; - private final PackageManager mPackageManager; - private final Context mContext; + final ActivityManager mActivityManager; + final PackageManager mPackageManager; + final Context mContext; final P2pStatusListener mListener; P2pTask mActiveTask; @@ -174,7 +175,7 @@ public class NdefP2pManager { } } - /*package*/ void llcpActivated() { + void llcpActivated() { if (DBG) Log.d(TAG, "LLCP connection up and running"); mListener.onP2pBegin(); @@ -220,7 +221,7 @@ public class NdefP2pManager { mActiveTask.execute(); } - /*package*/ void llcpDeactivated() { + void llcpDeactivated() { if (DBG) Log.d(TAG, "LLCP deactivated."); // Call error here since a previous call to onP2pEnd() will have played the success @@ -235,9 +236,8 @@ public class NdefP2pManager { } final class P2pTask extends AsyncTask<Void, Void, Void> { - final private NdefMessage mMessage; - - private boolean mSuccess = false; + final NdefMessage mMessage; + boolean mSuccess = false; public P2pTask(NdefMessage msg) { mMessage = msg; @@ -383,7 +383,7 @@ public class NdefP2pManager { return null; } - private final SnepServer.Callback mDefaultSnepCallback = new SnepServer.Callback() { + final SnepServer.Callback mDefaultSnepCallback = new SnepServer.Callback() { @Override public SnepMessage doPut(NdefMessage msg) { NfcService.getInstance().sendMockNdefTag(msg); @@ -397,7 +397,7 @@ public class NdefP2pManager { } }; - private final SnepServer.Callback mAndroidSnepCallback = new SnepServer.Callback() { + final SnepServer.Callback mAndroidSnepCallback = new SnepServer.Callback() { @Override public SnepMessage doPut(NdefMessage msg) { return SnepMessage.getMessage(SnepMessage.RESPONSE_NOT_IMPLEMENTED); diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index efacaed..70c09ce 100755 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -512,7 +512,7 @@ public class NfcService extends Application implements DeviceHostListener, P2pSt throw new IllegalArgumentException(); } if (mP2pManager.setForegroundMessage(msg)) { - Log.e(TAG, "Replacing active NDEF push message"); + Log.w(TAG, "Replacing active NDEF push message"); } } @@ -524,7 +524,7 @@ public class NfcService extends Application implements DeviceHostListener, P2pSt throw new IllegalArgumentException(); } if (mP2pManager.setForegroundCallback(callback)) { - Log.e(TAG, "Replacing active NDEF push message"); + Log.w(TAG, "Replacing active NDEF push message"); } } @@ -534,7 +534,7 @@ public class NfcService extends Application implements DeviceHostListener, P2pSt boolean hadMsg = mP2pManager.setForegroundMessage(null); boolean hadCallback = mP2pManager.setForegroundCallback(null); if (!hadMsg || !hadCallback) { - Log.e(TAG, "No active foreground NDEF push message"); + Log.w(TAG, "No active foreground NDEF push message"); } } |