Permalink
Browse files

[Clean] Comment all log.d

  • Loading branch information...
1 parent 0392e84 commit 994c5308265154f86bbb08e8ddd39bd9f6d11b03 @jmpascal jmpascal committed Mar 22, 2013
Showing with 46 additions and 48 deletions.
  1. +7 −7 ...rc/main/java/org/alfresco/mobile/android/api/services/impl/AbstractDocumentFolderServiceImpl.java
  2. +1 −1 ...droid-client-api/src/main/java/org/alfresco/mobile/android/api/services/impl/AlfrescoService.java
  3. +3 −3 ...oid-client-api/src/main/java/org/alfresco/mobile/android/api/services/impl/SearchServiceImpl.java
  4. +0 −1 ...api/src/main/java/org/alfresco/mobile/android/api/services/impl/cloud/CloudPersonServiceImpl.java
  5. +0 −1 ...main/java/org/alfresco/mobile/android/api/services/impl/onpremise/OnPremisePersonServiceImpl.java
  6. +1 −1 ...g/alfresco/mobile/android/api/session/authentication/impl/PassthruAuthenticationProviderImpl.java
  7. +1 −1 ...esco-mobile-android-client-api/src/main/java/org/alfresco/mobile/android/api/utils/HttpUtils.java
  8. +3 −3 ...esco-mobile-android-ui-library/src/org/alfresco/mobile/android/ui/fragments/BaseListFragment.java
  9. +1 −1 alfresco-mobile-android-ui-library/src/org/alfresco/mobile/android/ui/manager/ActionManager.java
  10. +7 −7 alfresco-mobile-android-ui-library/src/org/alfresco/mobile/android/ui/manager/RenditionManager.java
  11. +1 −1 alfresco-mobile-android-ui-library/src/org/alfresco/mobile/android/ui/oauth/OAuthFragment.java
  12. +2 −2 ...cloud/src/org/alfresco/mobile/android/test/api/cloud/services/CloudDocumentFolderServiceTest.java
  13. +3 −3 ...e-android-unit-test-api/src/org/alfresco/mobile/android/test/api/managers/StorageManagerTest.java
  14. +2 −2 ...id-unit-test-api/src/org/alfresco/mobile/android/test/api/services/ActivityStreamServiceTest.java
  15. +6 −6 ...id-unit-test-api/src/org/alfresco/mobile/android/test/api/services/DocumentFolderServiceTest.java
  16. +4 −4 ...bile-android-unit-test-api/src/org/alfresco/mobile/android/test/api/services/LikeServiceTest.java
  17. +4 −4 ...le-android-unit-test-api/src/org/alfresco/mobile/android/test/api/services/SearchServiceTest.java
@@ -151,7 +151,7 @@ public AbstractDocumentFolderServiceImpl(AlfrescoSession repositorySession)
if (childObjects != null)
{
- Log.d(TAG, "childObjects : " + childObjects.size());
+ ////Log.d(TAG, "childObjects : " + childObjects.size());
for (ObjectInFolderData objectData : childObjects)
{
if (objectData.getObject() != null)
@@ -537,7 +537,7 @@ public Document createDocument(Folder parentFolder, String documentName, Map<Str
}
catch (Exception e)
{
- Log.d(TAG, Log.getStackTraceString(e));
+ //Log.d(TAG, Log.getStackTraceString(e));
convertException(e);
}
return null;
@@ -559,7 +559,7 @@ private void extractMetadata(String identifier)
{
UrlBuilder url = new UrlBuilder(OnPremiseUrlRegistry.getActionQueue(session));
url.addParameter(OnPremiseConstant.PARAM_ASYNC, true);
- Log.d("URL", url.toString());
+ //Log.d("URL", url.toString());
// prepare json data
JSONObject jo = new JSONObject();
@@ -579,7 +579,7 @@ public void write(OutputStream out) throws IOException
if (response.getResponseCode() == HttpStatus.SC_OK)
{
- Log.d(TAG, "Metadata extraction : ok");
+ //Log.d(TAG, "Metadata extraction : ok");
}
}
catch (Exception e)
@@ -603,7 +603,7 @@ private void generateThumbnail(String identifier)
{
UrlBuilder url = new UrlBuilder(OnPremiseUrlRegistry.getThumbnailUrl(session, identifier));
url.addParameter(OnPremiseConstant.PARAM_AS, true);
- Log.d("URL", url.toString());
+ //Log.d("URL", url.toString());
// prepare json data
JSONObject jo = new JSONObject();
@@ -774,7 +774,7 @@ else if (ObjectType.FOLDER_BASETYPE_ID.equals(objectBaseTypeId))
}
catch (Exception e)
{
- Log.d(TAG, Log.getStackTraceString(e));
+ //Log.d(TAG, Log.getStackTraceString(e));
// In case where a null value is provided (definition type property
// is not null)
if (e.getMessage() != null && e.getMessage().contains("cannot be null or empty."))
@@ -1073,7 +1073,7 @@ else if (ContentModel.TYPE_FOLDER.equals(typeId))
}
}
- Log.d(TAG, objectId);
+ //Log.d(TAG, objectId);
tmpProperties.put(PropertyIds.OBJECT_TYPE_ID, objectId);
@@ -93,7 +93,7 @@ public AlfrescoService(AlfrescoSession repositorySession)
*/
protected HttpUtils.Response read(UrlBuilder url, int errorCode)
{
- Log.d("URL", url.toString());
+ //Log.d("URL", url.toString());
HttpUtils.Response resp = HttpUtils.invokeGET(url, getSessionHttp());
// check response code
@@ -128,7 +128,7 @@ public SearchServiceImpl(AlfrescoSession repositorySession)
tmpStatement += getSorting(listingContext.getSortProperty(), listingContext.isSortAscending());
}
- Log.d(TAG, maxItems + " " + skipCount + " " + tmpStatement);
+ //Log.d(TAG, maxItems + " " + skipCount + " " + tmpStatement);
// fetch the data
ObjectList resultList = discoveryService.query(session.getRepositoryInfo().getIdentifier(), tmpStatement,
@@ -147,7 +147,7 @@ public SearchServiceImpl(AlfrescoSession repositorySession)
}
page.add(convertNode(objectFactory.convertObject(objectData, ctxt)));
}
- Log.d(TAG, "Query Result :" + page.size());
+ //Log.d(TAG, "Query Result :" + page.size());
return new PagingResultImpl<Node>(page, resultList.hasMoreItems(),
(resultList.getNumItems() == null) ? -1 : resultList.getNumItems().intValue());
}
@@ -270,7 +270,7 @@ private static String createQuery(String query, boolean fulltext, boolean isExac
sb.append(")");
}
- Log.d(TAG, "Query :" + sb.toString());
+ //Log.d(TAG, "Query :" + sb.toString());
return sb.toString();
}
@@ -94,7 +94,6 @@ public ContentStream getAvatarStream(String personIdentifier)
/** {@inheritDoc} */
protected Person computePerson(UrlBuilder url)
{
- Log.d("URL", url.toString());
HttpUtils.Response resp = HttpUtils.invokeGET(url, getSessionHttp());
// check response code
@@ -115,7 +115,6 @@ private String getAvatarURL(String username)
/** {@inheritDoc} */
protected Person computePerson(UrlBuilder url)
{
- Log.d("URL", url.toString());
HttpUtils.Response resp = HttpUtils.invokeGET(url, getSessionHttp());
// check response code
@@ -105,7 +105,7 @@ public SSLSocketFactory getSSLSocketFactory()
{
// We don't stop a session creation due to a wrong ssl creation.
// The default secure one will be used instead.
- Log.d("TrustManager", "Unable to instantiate CustomTrustManager");
+ //Log.d("TrustManager", "Unable to instantiate CustomTrustManager");
}
hasCheckedSSLFactory = true;
return factory;
@@ -63,7 +63,7 @@ private static Response invoke(UrlBuilder url, String method, String contentType
Map<String, String> params){
try
{
- Log.d("URL", url.toString());
+ //Log.d("URL", url.toString());
// connect
HttpURLConnection conn = (HttpURLConnection) (new URL(url.toString())).openConnection();
@@ -454,7 +454,7 @@ protected void displayPagingData(PagingResult<?> data, int loaderId, LoaderCallb
{
lv.setAdapter(null);
}
- Log.d("BaseListFragment", "ITEMS : Empty !");
+ //Log.d("BaseListFragment", "ITEMS : Empty !");
}
else
{
@@ -472,8 +472,8 @@ protected void displayPagingData(PagingResult<?> data, int loaderId, LoaderCallb
}
}
hasmore = data.hasMoreItems();
- Log.d("BrowserFragment", hasmore + " - Total Items : " + data.getTotalItems() + " Results : "
- + data.getList().size() + " Adapter " + ((ArrayAdapter<Object>) adapter).getCount());
+ //Log.d("BrowserFragment", hasmore + " - Total Items : " + data.getTotalItems() + " Results : "
+ // + data.getList().size() + " Adapter " + ((ArrayAdapter<Object>) adapter).getCount());
if (doesLoadMore())
{
loadMore();
@@ -209,7 +209,7 @@ else if (scheme.equals("file"))
{
s = uri.getPath();
}
- Log.d("ActionManager", "URI:" + uri + " - S:" + s);
+ //Log.d("ActionManager", "URI:" + uri + " - S:" + s);
return s;
}
@@ -112,7 +112,7 @@ protected int sizeOf(String key, Bitmap bitmap)
}
catch (IOException e)
{
- Log.d(TAG, e.getMessage());
+ //Log.d(TAG, e.getMessage());
}
}
@@ -123,7 +123,7 @@ public void addBitmapToMemoryCache(String key, Bitmap bitmap)
if (getBitmapFromMemCache(hashKey) == null)
{
mMemoryCache.put(hashKey, bitmap);
- Log.d(TAG, "Add MemoryCache : " + key);
+ //Log.d(TAG, "Add MemoryCache : " + key);
}
}
@@ -140,7 +140,7 @@ public void addBitmapToDiskMemoryCache(String key, ContentStream cf)
IOUtils.copyStream(cf.getInputStream(), editor.newOutputStream(0));
editor.commit();
}
- Log.d(TAG, "Add DiskCache : " + key);
+ //Log.d(TAG, "Add DiskCache : " + key);
}
catch (Exception e)
{
@@ -170,7 +170,7 @@ public Bitmap getBitmapFromDiskCache(String key, Integer preview)
snapshot = mDiskCache.get(hashKey);
if (snapshot != null)
{
- Log.d(TAG, "GET DiskCache : " + key);
+ //Log.d(TAG, "GET DiskCache : " + key);
if (preview != null)
{
return decodeStream(mDiskCache, hashKey, preview, dm);
@@ -227,7 +227,7 @@ private void display(ImageView iv, String identifier, int initDrawableId, int ty
if (bitmap != null)
{
iv.setImageBitmap(bitmap);
- Log.d(TAG, "Cache : " + identifier);
+ //Log.d(TAG, "Cache : " + identifier);
}
else if (cancelPotentialWork(identifier, iv))
{
@@ -256,7 +256,7 @@ public static int calculateInSampleSize(BitmapFactory.Options options, int reqWi
inSampleSize = heightRatio > widthRatio ? heightRatio : widthRatio;
}
- Log.d(TAG, "height:" + height + "width" + width);
+ //Log.d(TAG, "height:" + height + "width" + width);
return inSampleSize;
}
@@ -316,7 +316,7 @@ public static Bitmap decodeStream(DiskLruCache mDiskCache, String snap, int requ
// Find the correct scale value. It should be the power of 2.
int requiredSizePx = getDPI(dm, requiredSize);
int scale = calculateInSampleSize(o, requiredSizePx, requiredSizePx);
- Log.d(TAG, "Scale:" + scale + " Px" + requiredSizePx + " Dpi" + dm.densityDpi);
+ //Log.d(TAG, "Scale:" + scale + " Px" + requiredSizePx + " Dpi" + dm.densityDpi);
// decode with inSampleSize
fis = new BufferedInputStream(mDiskCache.get(snap).getInputStream(0));
@@ -185,7 +185,7 @@ public void onReceivedError(WebView view, int errorCode, String description, Str
});
OAuthHelper helper = new OAuthHelper(baseOAuthUrl);
- Log.d("OAUTH URL", helper.getAuthorizationUrl(apiKey, callback, scope));
+ //Log.d("OAUTH URL", helper.getAuthorizationUrl(apiKey, callback, scope));
// send user to authorization page
webview.loadUrl(helper.getAuthorizationUrl(apiKey, callback, scope));
@@ -102,8 +102,8 @@ public void checkRendition(Document doc, boolean validateRendition, boolean vali
// Extracation Metadata
if (doc.hasAspect(ContentModel.ASPECT_GEOGRAPHIC) || doc.hasAspect(ContentModel.ASPECT_EXIF))
{
- Log.d(TAG, "Metadata extraction available");
- Log.d(TAG, doc.getProperties().toString());
+ //Log.d(TAG, "Metadata extraction available");
+ //Log.d(TAG, doc.getProperties().toString());
Assert.assertEquals("2560", doc.getPropertyValue(ContentModel.PROP_PIXELY_DIMENSION).toString());
Assert.assertEquals("1920", doc.getPropertyValue(ContentModel.PROP_PIXELX_DIMENSION).toString());
@@ -104,7 +104,7 @@ public void testDefaultStorage() throws AlfrescoException
createDocumentFromAsset(unitTestFolder, "android.jpg");
Document doc = (Document) docfolderservice.getChildByPath(unitTestFolder, "android.jpg");
// Retrieve Content
- Log.d(TAG, "Download Content");
+ //Log.d(TAG, "Download Content");
cf = docfolderservice.getContent(doc);
Assert.assertNotNull(cf);
Assert.assertTrue(cf.getMimeType().contains(doc.getContentStreamMimeType()));
@@ -191,15 +191,15 @@ public void testCustomStorage() throws AlfrescoException
protected void setUp() throws Exception
{
super.setUp();
- Log.d(TAG, "[CODE CLEAN] - Delete Cache Folder");
+ //Log.d(TAG, "[CODE CLEAN] - Delete Cache Folder");
File f = new File(AbstractAlfrescoSessionImpl.DEFAULT_CACHE_FOLDER_PATH);
delete(f);
}
@Override
protected void tearDown() throws Exception
{
- Log.d(TAG, "[CODE CLEAN] - Delete Cache Folder");
+ //Log.d(TAG, "[CODE CLEAN] - Delete Cache Folder");
File f = new File(AbstractAlfrescoSessionImpl.DEFAULT_CACHE_FOLDER_PATH);
delete(f);
super.tearDown();
@@ -101,7 +101,7 @@ public void testActivityStreamService()
List<ActivityEntry> feed = activityStreamService.getActivityStream();
if (feed == null || feed.isEmpty())
{
- Log.d("ActivityStreamService", "No stream activities available. Test aborted.");
+ //Log.d("ActivityStreamService", "No stream activities available. Test aborted.");
return;
}
int totalItems = feed.size();
@@ -463,7 +463,7 @@ public void write(OutputStream out) throws IOException
if (response.getResponseCode() == HttpStatus.SC_OK)
{
- Log.d(TAG, "Execute script : ok");
+ //Log.d(TAG, "Execute script : ok");
}
}
catch (Exception e)
@@ -368,7 +368,7 @@ public void testNavigationPaging()
lc.setMaxItems(FOLDERS_NUMBER - 2);
PagingResult<Folder> pagingFolders = docfolderservice.getFolders(unitTestFolder, lc);
Assert.assertNotNull(pagingFolders);
- Log.d(TAG, "Paging Folder : " + pagingFolders.getTotalItems());
+ //Log.d(TAG, "Paging Folder : " + pagingFolders.getTotalItems());
pagingFolders = docfolderservice.getFolders(unitTestFolder, lc);
// Assert.assertEquals(FOLDERS_NUMBER - 1,
// pagingFolders.getTotalItems());
@@ -393,7 +393,7 @@ public void testNavigationPaging()
listDocs = docfolderservice.getDocuments(unitTestFolder);
Assert.assertNotNull(listDocs);
Assert.assertEquals(DOCS_NUMBER, listDocs.size());
- Log.d(TAG, "listDocs : " + listDocs);
+ //Log.d(TAG, "listDocs : " + listDocs);
session.getServiceRegistry().getDocumentFolderService().getDocuments(unitTestFolder);
Assert.assertNotNull(listDocs);
@@ -919,8 +919,8 @@ public void checkRendition(Document doc, boolean validateRendition, boolean vali
// Extracation Metadata
if (doc.hasAspect(ContentModel.ASPECT_GEOGRAPHIC) || doc.hasAspect(ContentModel.ASPECT_EXIF))
{
- Log.d(TAG, "Metadata extraction available");
- Log.d(TAG, doc.getProperties().toString());
+ //Log.d(TAG, "Metadata extraction available");
+ //Log.d(TAG, doc.getProperties().toString());
Assert.assertEquals("2560", doc.getPropertyValue(ContentModel.PROP_PIXELY_DIMENSION).toString());
Assert.assertEquals("1920", doc.getPropertyValue(ContentModel.PROP_PIXELX_DIMENSION).toString());
@@ -1625,7 +1625,7 @@ public void testDocumentFolderMethodsError()
{
try
{
- Log.d(TAG, folder.getName() + " : " + character);
+ //Log.d(TAG, folder.getName() + " : " + character);
docfolderservice.createFolder(folder, character, props);
Assert.fail();
}
@@ -1637,7 +1637,7 @@ public void testDocumentFolderMethodsError()
}
catch (IllegalArgumentException e)
{
- Log.d(TAG, Log.getStackTraceString(e));
+ //Log.d(TAG, Log.getStackTraceString(e));
Assert.assertTrue(true);
}
}
@@ -79,8 +79,8 @@ public void testLikeService()
if (!alfsession.getRepositoryInfo().getCapabilities().doesSupportLikingNodes())
{
Assert.assertNull(likeService);
- Log.d(TAG, alfsession.getRepositoryInfo().getVersion());
- Log.d(TAG, "No support for Like operation. Test aborted");
+ //Log.d(TAG, alfsession.getRepositoryInfo().getVersion());
+ //Log.d(TAG, "No support for Like operation. Test aborted");
return;
}
@@ -171,8 +171,8 @@ public void testLikeServiceMethodsError()
if (!alfsession.getRepositoryInfo().getCapabilities().doesSupportLikingNodes())
{
Assert.assertNull(likeService);
- Log.d(TAG, alfsession.getRepositoryInfo().getVersion());
- Log.d(TAG, "No support for Like operation. Test aborted");
+ //Log.d(TAG, alfsession.getRepositoryInfo().getVersion());
+ //Log.d(TAG, "No support for Like operation. Test aborted");
return;
}
@@ -121,15 +121,15 @@ public void testSearchService()
result = searchService.keywordSearch(keywords, options, null).getList();
Assert.assertNotNull(result);
Assert.assertTrue(result.size() > 0);
- Log.d(TAG, "Result Size :" + result.size());
+ //Log.d(TAG, "Result Size :" + result.size());
// Simple Query to search documents by keywords with fulltext mode
// activated
options.setDoesIncludeContent(true);
List<Node> result2 = searchService.keywordSearch(keywords, options);
Assert.assertNotNull(result2);
Assert.assertTrue(result2.size() > 0);
- Log.d(TAG, "Result2 Size :" + result2.size());
+ //Log.d(TAG, "Result2 Size :" + result2.size());
// Simple Query to search documents by keywords with Exact search mode
// activated
@@ -138,15 +138,15 @@ public void testSearchService()
List<Node> result3 = searchService.keywordSearch(keywords, options);
Assert.assertNotNull(result3);
Assert.assertTrue(result3.size() >= 0);
- Log.d(TAG, "Result3 Size :" + result3.size());
+ //Log.d(TAG, "Result3 Size :" + result3.size());
// Simple Query to search documents by keywords with fulltext and Exact
// search parameter activated
options.setDoesIncludeContent(true);
List<Node> result4 = searchService.keywordSearch(keywords, options, null).getList();
Assert.assertNotNull(result4);
Assert.assertTrue(result4.size() >= 0);
- Log.d(TAG, "Result4 Size :" + result3.size());
+ //Log.d(TAG, "Result4 Size :" + result3.size());
// Very light assert to determine with full text there are more results
// in return.

0 comments on commit 994c530

Please sign in to comment.