Loading src/com/android/bluetooth/opp/BluetoothOppNotification.java +13 −5 Original line number Diff line number Diff line Loading @@ -112,9 +112,9 @@ class BluetoothOppNotification { int direction; // to indicate sending or receiving int totalCurrent = 0; // current transfer bytes long totalCurrent = 0; // current transfer bytes int totalTotal = 0; // total bytes for current transfer long totalTotal = 0; // total bytes for current transfer long timeStamp = 0; // Database time stamp. Used for sorting ongoing transfers. Loading Loading @@ -261,8 +261,8 @@ class BluetoothOppNotification { long timeStamp = cursor.getLong(timestampIndex); int dir = cursor.getInt(directionIndex); int id = cursor.getInt(idIndex); int total = cursor.getInt(totalBytesIndex); int current = cursor.getInt(currentBytesIndex); long total = cursor.getLong(totalBytesIndex); long current = cursor.getLong(currentBytesIndex); int confirmation = cursor.getInt(confirmIndex); String destination = cursor.getString(destinationIndex); Loading Loading @@ -337,7 +337,15 @@ class BluetoothOppNotification { b.setContentTitle(item.description); b.setContentInfo( BluetoothOppUtility.formatProgressText(mContext, item.totalTotal, item.totalCurrent)); b.setProgress(item.totalTotal, item.totalCurrent, item.totalTotal == -1); if (item.totalTotal != 0) { if (V) Log.v(TAG, "mCurrentBytes: " + item.totalCurrent + " mTotalBytes: " + item.totalTotal + " (" + (int)((item.totalCurrent * 100) / item.totalTotal) + " %)"); b.setProgress(100, (int)((item.totalCurrent * 100) / item.totalTotal), item.totalTotal == -1); } else { b.setProgress(100, 100, item.totalTotal == -1); } b.setWhen(item.timeStamp); if (item.direction == BluetoothShare.DIRECTION_OUTBOUND) { b.setSmallIcon(android.R.drawable.stat_sys_upload); Loading src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession { ContentValues updateValues; ContentResolverUpdateThread uiUpdateThread = null; HeaderSet reply; int position = 0; long position = 0; reply = new HeaderSet(); HeaderSet request; request = new HeaderSet(); Loading src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java +10 −7 Original line number Diff line number Diff line Loading @@ -426,16 +426,19 @@ public class BluetoothOppTransferActivity extends AlertActivity implements return; } if (mTransInfo.mTotalBytes == 0) { // if Max and progress both equal 0, the progress display 100%. // Below is to fix it. // Set Transfer Max as 100. Percentage calculation would be done in setProgress API mProgressTransfer.setMax(100); if (mTransInfo.mTotalBytes != 0) { if (V) Log.v(TAG, "mCurrentBytes: " + mTransInfo.mCurrentBytes + " mTotalBytes: " + mTransInfo.mTotalBytes + " (" + (int)((mTransInfo.mCurrentBytes * 100) / mTransInfo.mTotalBytes) + "%)"); mProgressTransfer.setProgress((int)((mTransInfo.mCurrentBytes * 100) / mTransInfo.mTotalBytes)); } else { mProgressTransfer.setMax(mTransInfo.mTotalBytes); mProgressTransfer.setProgress(100); } mProgressTransfer.setProgress(mTransInfo.mCurrentBytes); mPercentView.setText(BluetoothOppUtility.formatProgressText(this, mTransInfo.mTotalBytes, mTransInfo.mCurrentBytes)); Loading src/com/android/bluetooth/opp/BluetoothOppTransferInfo.java +2 −2 Original line number Diff line number Diff line Loading @@ -41,9 +41,9 @@ public class BluetoothOppTransferInfo { int mDirection; int mTotalBytes; long mTotalBytes; int mCurrentBytes; long mCurrentBytes; int mStatus; Loading src/com/android/bluetooth/opp/BluetoothOppUtility.java +2 −2 Original line number Diff line number Diff line Loading @@ -83,9 +83,9 @@ public class BluetoothOppUtility { info.mStatus = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)); info.mDirection = cursor.getInt(cursor .getColumnIndexOrThrow(BluetoothShare.DIRECTION)); info.mTotalBytes = cursor.getInt(cursor info.mTotalBytes = cursor.getLong(cursor .getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); info.mCurrentBytes = cursor.getInt(cursor info.mCurrentBytes = cursor.getLong(cursor .getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)); info.mTimeStamp = cursor.getLong(cursor .getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); Loading Loading
src/com/android/bluetooth/opp/BluetoothOppNotification.java +13 −5 Original line number Diff line number Diff line Loading @@ -112,9 +112,9 @@ class BluetoothOppNotification { int direction; // to indicate sending or receiving int totalCurrent = 0; // current transfer bytes long totalCurrent = 0; // current transfer bytes int totalTotal = 0; // total bytes for current transfer long totalTotal = 0; // total bytes for current transfer long timeStamp = 0; // Database time stamp. Used for sorting ongoing transfers. Loading Loading @@ -261,8 +261,8 @@ class BluetoothOppNotification { long timeStamp = cursor.getLong(timestampIndex); int dir = cursor.getInt(directionIndex); int id = cursor.getInt(idIndex); int total = cursor.getInt(totalBytesIndex); int current = cursor.getInt(currentBytesIndex); long total = cursor.getLong(totalBytesIndex); long current = cursor.getLong(currentBytesIndex); int confirmation = cursor.getInt(confirmIndex); String destination = cursor.getString(destinationIndex); Loading Loading @@ -337,7 +337,15 @@ class BluetoothOppNotification { b.setContentTitle(item.description); b.setContentInfo( BluetoothOppUtility.formatProgressText(mContext, item.totalTotal, item.totalCurrent)); b.setProgress(item.totalTotal, item.totalCurrent, item.totalTotal == -1); if (item.totalTotal != 0) { if (V) Log.v(TAG, "mCurrentBytes: " + item.totalCurrent + " mTotalBytes: " + item.totalTotal + " (" + (int)((item.totalCurrent * 100) / item.totalTotal) + " %)"); b.setProgress(100, (int)((item.totalCurrent * 100) / item.totalTotal), item.totalTotal == -1); } else { b.setProgress(100, 100, item.totalTotal == -1); } b.setWhen(item.timeStamp); if (item.direction == BluetoothShare.DIRECTION_OUTBOUND) { b.setSmallIcon(android.R.drawable.stat_sys_upload); Loading
src/com/android/bluetooth/opp/BluetoothOppObexClientSession.java +1 −1 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ public class BluetoothOppObexClientSession implements BluetoothOppObexSession { ContentValues updateValues; ContentResolverUpdateThread uiUpdateThread = null; HeaderSet reply; int position = 0; long position = 0; reply = new HeaderSet(); HeaderSet request; request = new HeaderSet(); Loading
src/com/android/bluetooth/opp/BluetoothOppTransferActivity.java +10 −7 Original line number Diff line number Diff line Loading @@ -426,16 +426,19 @@ public class BluetoothOppTransferActivity extends AlertActivity implements return; } if (mTransInfo.mTotalBytes == 0) { // if Max and progress both equal 0, the progress display 100%. // Below is to fix it. // Set Transfer Max as 100. Percentage calculation would be done in setProgress API mProgressTransfer.setMax(100); if (mTransInfo.mTotalBytes != 0) { if (V) Log.v(TAG, "mCurrentBytes: " + mTransInfo.mCurrentBytes + " mTotalBytes: " + mTransInfo.mTotalBytes + " (" + (int)((mTransInfo.mCurrentBytes * 100) / mTransInfo.mTotalBytes) + "%)"); mProgressTransfer.setProgress((int)((mTransInfo.mCurrentBytes * 100) / mTransInfo.mTotalBytes)); } else { mProgressTransfer.setMax(mTransInfo.mTotalBytes); mProgressTransfer.setProgress(100); } mProgressTransfer.setProgress(mTransInfo.mCurrentBytes); mPercentView.setText(BluetoothOppUtility.formatProgressText(this, mTransInfo.mTotalBytes, mTransInfo.mCurrentBytes)); Loading
src/com/android/bluetooth/opp/BluetoothOppTransferInfo.java +2 −2 Original line number Diff line number Diff line Loading @@ -41,9 +41,9 @@ public class BluetoothOppTransferInfo { int mDirection; int mTotalBytes; long mTotalBytes; int mCurrentBytes; long mCurrentBytes; int mStatus; Loading
src/com/android/bluetooth/opp/BluetoothOppUtility.java +2 −2 Original line number Diff line number Diff line Loading @@ -83,9 +83,9 @@ public class BluetoothOppUtility { info.mStatus = cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare.STATUS)); info.mDirection = cursor.getInt(cursor .getColumnIndexOrThrow(BluetoothShare.DIRECTION)); info.mTotalBytes = cursor.getInt(cursor info.mTotalBytes = cursor.getLong(cursor .getColumnIndexOrThrow(BluetoothShare.TOTAL_BYTES)); info.mCurrentBytes = cursor.getInt(cursor info.mCurrentBytes = cursor.getLong(cursor .getColumnIndexOrThrow(BluetoothShare.CURRENT_BYTES)); info.mTimeStamp = cursor.getLong(cursor .getColumnIndexOrThrow(BluetoothShare.TIMESTAMP)); Loading