Index: /branches/ag_client_motionpro_android_3.1.3/motionpro_android/app/src/main/java/net/arraynetworks/mobilenow/downloader/provider/DownloadManager.java
===================================================================
--- /branches/ag_client_motionpro_android_3.1.3/motionpro_android/app/src/main/java/net/arraynetworks/mobilenow/downloader/provider/DownloadManager.java	(revision 8422)
+++ /branches/ag_client_motionpro_android_3.1.3/motionpro_android/app/src/main/java/net/arraynetworks/mobilenow/downloader/provider/DownloadManager.java	(working copy)
@@ -55,8 +55,8 @@
  * permission to use this class.
  */
 public class DownloadManager {
-	
-	// 2 GB
+
+    // 2 GB
     private static final long DOWNLOAD_MAX_BYTES_OVER_MOBILE = 2 * 1024 * 1024 * 1024;
     // 1 GB
     private static final long DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE = 1024 * 1024 * 1024;
@@ -306,25 +306,25 @@
      * @hide
      */
     public static final String[] UNDERLYING_COLUMNS = new String[] {
-        Downloads.Impl._ID,
-        Downloads.Impl._DATA + " AS " + COLUMN_LOCAL_FILENAME,
-        Downloads.Impl.COLUMN_MEDIAPROVIDER_URI,
-        Downloads.Impl.COLUMN_DESTINATION,
-        Downloads.Impl.COLUMN_TITLE,
-        Downloads.Impl.COLUMN_DESCRIPTION,
-        Downloads.Impl.COLUMN_URI,
-        Downloads.Impl.COLUMN_STATUS,
-        Downloads.Impl.COLUMN_FILE_NAME_HINT,
-        Downloads.Impl.COLUMN_MIME_TYPE + " AS " + COLUMN_MEDIA_TYPE,
-        Downloads.Impl.COLUMN_TOTAL_BYTES + " AS " + COLUMN_TOTAL_SIZE_BYTES,
-        Downloads.Impl.COLUMN_LAST_MODIFICATION + " AS " + COLUMN_LAST_MODIFIED_TIMESTAMP,
-        Downloads.Impl.COLUMN_CURRENT_BYTES + " AS " + COLUMN_BYTES_DOWNLOADED_SO_FAR,
-        /* add the following 'computed' columns to the cursor.
-         * they are not 'returned' by the database, but their inclusion
-         * eliminates need to have lot of methods in CursorTranslator
-         */
-        "'placeholder' AS " + COLUMN_LOCAL_URI,
-        "'placeholder' AS " + COLUMN_REASON
+            Downloads.Impl._ID,
+            Downloads.Impl._DATA + " AS " + COLUMN_LOCAL_FILENAME,
+            Downloads.Impl.COLUMN_MEDIAPROVIDER_URI,
+            Downloads.Impl.COLUMN_DESTINATION,
+            Downloads.Impl.COLUMN_TITLE,
+            Downloads.Impl.COLUMN_DESCRIPTION,
+            Downloads.Impl.COLUMN_URI,
+            Downloads.Impl.COLUMN_STATUS,
+            Downloads.Impl.COLUMN_FILE_NAME_HINT,
+            Downloads.Impl.COLUMN_MIME_TYPE + " AS " + COLUMN_MEDIA_TYPE,
+            Downloads.Impl.COLUMN_TOTAL_BYTES + " AS " + COLUMN_TOTAL_SIZE_BYTES,
+            Downloads.Impl.COLUMN_LAST_MODIFICATION + " AS " + COLUMN_LAST_MODIFIED_TIMESTAMP,
+            Downloads.Impl.COLUMN_CURRENT_BYTES + " AS " + COLUMN_BYTES_DOWNLOADED_SO_FAR,
+            /* add the following 'computed' columns to the cursor.
+             * they are not 'returned' by the database, but their inclusion
+             * eliminates need to have lot of methods in CursorTranslator
+             */
+            "'placeholder' AS " + COLUMN_LOCAL_URI,
+            "'placeholder' AS " + COLUMN_REASON
     };
 
     /**
@@ -439,9 +439,9 @@
             mDestinationUri = uri;
             return this;
         }
-        
+
         public Uri getDestinationUri() {
-        	return mDestinationUri;
+            return mDestinationUri;
         }
 
         /**
@@ -475,7 +475,7 @@
          * @return this object
          */
         public Request setDestinationInExternalFilesDir(Context context, String dirType,
-                String subPath) {
+                                                        String subPath) {
             setDestinationFromBase(context.getExternalFilesDir(dirType), subPath);
             return this;
         }
@@ -509,7 +509,7 @@
 //            setDestinationFromBase(file, subPath);
 //            return this;
 //        }
-        
+
         public Request setDestinationInExternalPublicDir(Context context, String subPath) {
             File file = context.getExternalFilesDir(Constants.DOWNLOAD_DIR);
             if (file != null && file.exists()) {
@@ -519,7 +519,7 @@
                 }
             } else {
                 if (file == null || !file.mkdir()) {
-                	String path = file == null ? "no file" : file.getAbsolutePath();
+                    String path = file == null ? "no file" : file.getAbsolutePath();
                     throw new IllegalStateException("Unable to create directory: "+ path);
                 }
             }
@@ -684,9 +684,9 @@
             mIsVisibleInDownloadsUi = isVisible;
             return this;
         }
-        
+
         public void setNoIntegrity(boolean noIntegrity) {
-        	mNoIntegrity = noIntegrity;
+            mNoIntegrity = noIntegrity;
         }
 
         /**
@@ -704,9 +704,9 @@
                 values.put(Downloads.Impl.COLUMN_FILE_NAME_HINT, mDestinationUri.toString());
             } else {
                 values.put(Downloads.Impl.COLUMN_DESTINATION,
-                           (this.mUseSystemCache) ?
-                                   Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION :
-                                   Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE);
+                        (this.mUseSystemCache) ?
+                                Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION :
+                                Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE);
             }
             // is the file supposed to be media-scannable?
             values.put(Downloads.Impl.COLUMN_MEDIA_SCANNED, (mScannable) ? SCANNABLE_VALUE_YES :
@@ -726,7 +726,7 @@
             values.put(Downloads.Impl.COLUMN_ALLOW_METERED, mMeteredAllowed);
             values.put(Downloads.Impl.COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI, mIsVisibleInDownloadsUi);
             values.put(Downloads.Impl.COLUMN_NO_INTEGRITY, mNoIntegrity);
-            
+
             return values;
         }
 
@@ -740,7 +740,7 @@
         }
 
         private void putIfNonNull(ContentValues contentValues, String key, Object value) {
-        	if (value != null) {
+            if (value != null) {
                 contentValues.put(key, value.toString());
             }
         }
@@ -860,7 +860,7 @@
                 }
                 if ((mStatusFlags & STATUS_FAILED) != 0) {
                     parts.add("(" + statusClause(">=", 400)
-                              + " AND " + statusClause("<", 600) + ")");
+                            + " AND " + statusClause("<", 600) + ")");
                 }
                 selectionParts.add(joinStrings(" OR ", parts));
             }
@@ -902,17 +902,17 @@
     private Uri mBaseUri = Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI;
 
     private static DownloadManager gInstance;
-    
+
     public static void initialize(ContentResolver resolver, String packageName) {
-    	if (null == gInstance) {
-    		gInstance = new DownloadManager(resolver, packageName);
-    	}
+        if (null == gInstance) {
+            gInstance = new DownloadManager(resolver, packageName);
+        }
     }
-    
+
     public static DownloadManager getInstance() {
-    	return gInstance;
+        return gInstance;
     }
-    
+
     /**
      * @hide
      */
@@ -970,7 +970,7 @@
         if (ids.length == 1) {
             return mResolver.update(ContentUris.withAppendedId(mBaseUri, ids[0]), values,
                     null, null);
-        } 
+        }
         return mResolver.update(mBaseUri, values, getWhereClauseForIds(ids),
                 getWhereArgsForIds(ids));
     }
@@ -986,14 +986,14 @@
     public int remove(long... ids) {
         return markRowDeleted(ids);
     }
-    
+
     /**
      * Remove all downloads
      * @return
      */
     public int removeAll()
     {
-    	ContentValues values = new ContentValues();
+        ContentValues values = new ContentValues();
         values.put(Downloads.Impl.COLUMN_DELETED, 1);
         // remove all downloads
         return mResolver.update(mBaseUri, values, null, null);
@@ -1146,7 +1146,7 @@
      */
     public static Long getMaxBytesOverMobile(Context context) {
         //try {
-        	return DOWNLOAD_MAX_BYTES_OVER_MOBILE;
+        return DOWNLOAD_MAX_BYTES_OVER_MOBILE;
 //            return Settings.Secure.getLong(context.getContentResolver(),
 //                    Settings.Secure.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
 //        } catch (SettingNotFoundException exc) {
@@ -1170,7 +1170,7 @@
 //        } catch (SettingNotFoundException exc) {
 //            return null;
 //        }
-    	return DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE;
+        return DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE;
     }
 
     /** {@hide} */
@@ -1208,8 +1208,8 @@
      * This ID is used to make future calls related to this download.
      */
     public long addCompletedDownload(String title, String description,
-            boolean isMediaScannerScannable, String mimeType, String path, long length,
-            boolean showNotification) {
+                                     boolean isMediaScannerScannable, String mimeType, String path, long length,
+                                     boolean showNotification) {
         // make sure the input args are non-null/non-zero
         validateArgumentIsNonEmpty("title", title);
         validateArgumentIsNonEmpty("description", description);
@@ -1428,22 +1428,22 @@
             }
         }
     }
-    
+
     public int startAll() {
-    	synchronized (this) {
-	    	ContentValues values = new ContentValues();
-	        values.put(Downloads.Impl.COLUMN_CONTROL, Downloads.Impl.CONTROL_RUN);
-	        // stop all downloads
-	        return mResolver.update(mBaseUri, values, null, null);
-    	}
+        synchronized (this) {
+            ContentValues values = new ContentValues();
+            values.put(Downloads.Impl.COLUMN_CONTROL, Downloads.Impl.CONTROL_RUN);
+            // stop all downloads
+            return mResolver.update(mBaseUri, values, null, null);
+        }
     }
-    
+
     public int stopAll() {
-    	synchronized (this) {
-	    	ContentValues values = new ContentValues();
-	        values.put(Downloads.Impl.COLUMN_CONTROL, Downloads.Impl.CONTROL_PAUSED);
-	        // stop all downloads
-	        return mResolver.update(mBaseUri, values, null, null);
-    	}
+        synchronized (this) {
+            ContentValues values = new ContentValues();
+            values.put(Downloads.Impl.COLUMN_CONTROL, Downloads.Impl.CONTROL_PAUSED);
+            // stop all downloads
+            return mResolver.update(mBaseUri, values, null, null);
+        }
     }
 }
Index: /branches/ag_client_motionpro_android_3.1.3/motionpro_android/app/src/main/java/net/arraynetworks/mobilenow/downloader/provider/DownloadNotification.java
===================================================================
--- /branches/ag_client_motionpro_android_3.1.3/motionpro_android/app/src/main/java/net/arraynetworks/mobilenow/downloader/provider/DownloadNotification.java	(revision 8422)
+++ /branches/ag_client_motionpro_android_3.1.3/motionpro_android/app/src/main/java/net/arraynetworks/mobilenow/downloader/provider/DownloadNotification.java	(working copy)
@@ -47,16 +47,16 @@
 
     static final String LOGTAG = "DownloadNotification";
     static final String WHERE_RUNNING =
-        "(" + Downloads.Impl.COLUMN_STATUS + " >= '100') AND (" +
-        Downloads.Impl.COLUMN_STATUS + " <= '199') AND (" +
-        Downloads.Impl.COLUMN_VISIBILITY + " IS NULL OR " +
-        Downloads.Impl.COLUMN_VISIBILITY + " == '" + Downloads.Impl.VISIBILITY_VISIBLE + "' OR " +
-        Downloads.Impl.COLUMN_VISIBILITY +
-            " == '" + Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED + "')";
+            "(" + Downloads.Impl.COLUMN_STATUS + " >= '100') AND (" +
+                    Downloads.Impl.COLUMN_STATUS + " <= '199') AND (" +
+                    Downloads.Impl.COLUMN_VISIBILITY + " IS NULL OR " +
+                    Downloads.Impl.COLUMN_VISIBILITY + " == '" + Downloads.Impl.VISIBILITY_VISIBLE + "' OR " +
+                    Downloads.Impl.COLUMN_VISIBILITY +
+                    " == '" + Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED + "')";
     static final String WHERE_COMPLETED =
-        Downloads.Impl.COLUMN_STATUS + " >= '200' AND " +
-        Downloads.Impl.COLUMN_VISIBILITY +
-            " == '" + Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED + "'";
+            Downloads.Impl.COLUMN_STATUS + " >= '200' AND " +
+                    Downloads.Impl.COLUMN_VISIBILITY +
+                    " == '" + Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED + "'";
 
     /**
      * This inner class is used to collate downloads that are owned by
@@ -112,7 +112,7 @@
         updateActiveNotification(downloads);
         updateCompletedNotification(downloads);
     }
-    
+
     private void updateActiveNotification(Collection<DownloadInfo> downloads) {
         // Collate the notifications
         mNotifications.clear();
@@ -222,7 +222,7 @@
         }
     }
     void notificationForCompletedDownload(long id, String title, int status,
-            int destination, long lastMod) {
+                                          int destination, long lastMod) {
         // Add the notifications
         NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext, RealSystemFacade.CHANNEL_ID);
         builder.setSmallIcon(android.R.drawable.stat_sys_download_done);
@@ -231,7 +231,7 @@
                     R.string.download_unknown_title);
         }
         Uri contentUri =
-            ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id);
+                ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id);
         String caption;
         Intent intent;
         if (Downloads.Impl.isStatusError(status)) {
@@ -284,7 +284,7 @@
             return context.getString(R.string.download_percent, percent);
         }
     }
-    
+
     /*
      * Helper function to build the downloading text.
      */
