OSDN Git Service

code cleanup.
authorMohammad Shamsi <m.h.shams@gmail.com>
Mon, 1 Nov 2010 17:04:20 +0000 (01:04 +0800)
committerMohammad Shamsi <m.h.shams@gmail.com>
Mon, 1 Nov 2010 17:04:20 +0000 (01:04 +0800)
unused imports, local variabls and static constans removed from
com.android.bluetooth.opp package.

Change-Id: I0fd682a190221e216fac71723c05d3828b9fa42d

12 files changed:
src/com/android/bluetooth/opp/BluetoothOppBatch.java
src/com/android/bluetooth/opp/BluetoothOppManager.java
src/com/android/bluetooth/opp/BluetoothOppNotification.java
src/com/android/bluetooth/opp/BluetoothOppPreference.java
src/com/android/bluetooth/opp/BluetoothOppReceiver.java
src/com/android/bluetooth/opp/BluetoothOppRfcommListener.java
src/com/android/bluetooth/opp/BluetoothOppSendFileInfo.java
src/com/android/bluetooth/opp/BluetoothOppService.java
src/com/android/bluetooth/opp/BluetoothOppTransfer.java
src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java
src/com/android/bluetooth/opp/BluetoothOppTransferHistory.java
src/com/android/bluetooth/opp/TestActivity.java

index 5913b4c..7f51fe2 100644 (file)
@@ -61,7 +61,6 @@ import com.google.android.collect.Lists;
 
 public class BluetoothOppBatch {
     private static final String TAG = "BtOppBatch";
-    private static final boolean D = Constants.DEBUG;
     private static final boolean V = Constants.VERBOSE;
 
     public int mId;
index 73411d9..8fdab04 100644 (file)
@@ -55,7 +55,6 @@ import java.util.ArrayList;
  */
 public class BluetoothOppManager {
     private static final String TAG = "BluetoothOppManager";
-    private static final boolean D = Constants.DEBUG;
     private static final boolean V = Constants.VERBOSE;
 
     private static BluetoothOppManager INSTANCE;
index 310a289..ed0d402 100644 (file)
@@ -53,7 +53,6 @@ import java.util.HashMap;
  */
 class BluetoothOppNotification {
     private static final String TAG = "BluetoothOppNotification";
-    private static final boolean D = Constants.DEBUG;
     private static final boolean V = Constants.VERBOSE;
 
     static final String status = "(" + BluetoothShare.STATUS + " == '192'" + ")";
index 7874222..8e7b7eb 100644 (file)
@@ -46,7 +46,6 @@ import android.util.Log;
  */
 public class BluetoothOppPreference {
     private static final String TAG = "BluetoothOppPreference";
-    private static final boolean D = Constants.DEBUG;
     private static final boolean V = Constants.VERBOSE;
 
     private static BluetoothOppPreference INSTANCE;
index 98800d4..4361007 100644 (file)
@@ -54,7 +54,6 @@ import android.widget.Toast;
  */
 public class BluetoothOppReceiver extends BroadcastReceiver {
     private static final String TAG = "BluetoothOppReceiver";
-    private static final boolean D = Constants.DEBUG;
     private static final boolean V = Constants.VERBOSE;
 
     @Override
index c33cb66..9d9fa18 100644 (file)
@@ -49,8 +49,6 @@ import android.util.Log;
 public class BluetoothOppRfcommListener {
     private static final String TAG = "BtOppRfcommListener";
 
-    private static final boolean D = Constants.DEBUG;
-
     private static final boolean V = Constants.VERBOSE;
 
     public static final int MSG_INCOMING_BTOPP_CONNECTION = 100;
index 44ca9bd..a9d0578 100644 (file)
@@ -43,7 +43,6 @@ import android.content.Context;
 import android.database.Cursor;
 import android.net.Uri;
 import android.provider.OpenableColumns;
-import android.provider.ContactsContract.Contacts;
 
 /**
  * This class stores information about a single sending file It will only be
index 51b282c..02bc5d5 100644 (file)
@@ -37,9 +37,7 @@ import javax.obex.ObexTransport;
 
 import android.app.Service;
 import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
 import android.content.BroadcastReceiver;
-import android.content.ContentUris;
 import android.content.ContentValues;
 import android.content.Context;
 import android.content.Intent;
@@ -263,7 +261,7 @@ public class BluetoothOppService extends Service {
                             } catch (IOException e) {
                                 Log.e(TAG, "close tranport error");
                             }
-                        } else if (Constants.USE_TCP_DEBUG && !Constants.USE_TCP_SIMPLE_SERVER){
+                        } else if (Constants.USE_TCP_DEBUG && !Constants.USE_TCP_SIMPLE_SERVER) {
                             Log.i(TAG, "Start Obex Server in TCP DEBUG mode");
                             createServerSession(transport);
                         } else {
index d892e70..3b76351 100644 (file)
@@ -100,18 +100,12 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch
 
     private EventHandler mSessionHandler;
 
-    /*
-     * TODO check if we need PowerManager here
-     */
-    private PowerManager mPowerManager;
-
     private long mTimestamp;
 
     public BluetoothOppTransfer(Context context, PowerManager powerManager,
             BluetoothOppBatch batch, BluetoothOppObexSession session) {
 
         mContext = context;
-        mPowerManager = powerManager;
         mBatch = batch;
         mSession = session;
 
index d63a6fa..e36df0b 100644 (file)
@@ -36,7 +36,6 @@ import com.android.bluetooth.R;
 
 import android.bluetooth.BluetoothAdapter;
 import android.bluetooth.BluetoothDevice;
-import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.net.Uri;
index 1f5d9d9..7679544 100644 (file)
@@ -62,8 +62,6 @@ public class BluetoothOppTransferHistory extends Activity implements
         View.OnCreateContextMenuListener, OnItemClickListener {
     private static final String TAG = "BluetoothOppTransferHistory";
 
-    private static final boolean D = Constants.DEBUG;
-
     private static final boolean V = Constants.VERBOSE;
 
     private ListView mListView;
@@ -242,7 +240,7 @@ public class BluetoothOppTransferHistory extends Activity implements
      * android.widget.AdapterView.OnItemClickListener#onItemClick(android.widget
      * .AdapterView, android.view.View, int, long)
      */
-    public void onItemClick(AdapterView parent, View view, int position, long id) {
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
         // Open the selected item
         mTransferCursor.moveToPosition(position);
         openCompleteTransfer();
index 4266f68..ed8226b 100644 (file)
@@ -455,8 +455,6 @@ class TestTcpListener {
 class TestTcpServer extends ServerRequestHandler implements Runnable {
     private static final String TAG = "ServerRequestHandler";
 
-    private static final boolean D = Constants.DEBUG;
-
     private static final boolean V = Constants.VERBOSE;
 
     static final int port = 6500;