Merge "DocsUI: Disable debug logging by default." into nyc-dev

am: dcaf047

* commit 'dcaf047a418644a861345efd001c5280f71d5f52':
  DocsUI: Disable debug logging by default.
This commit is contained in:
Ben Kwa
2016-03-22 20:10:52 +00:00
committed by android-build-merger
6 changed files with 11 additions and 8 deletions

View File

@@ -190,7 +190,7 @@ public class DocumentsActivity extends BaseActivity {
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(TAG, "onActivityResult() code=" + resultCode); if (DEBUG) Log.d(TAG, "onActivityResult() code=" + resultCode);
// Only relay back results when not canceled; otherwise stick around to // Only relay back results when not canceled; otherwise stick around to
// let the user pick another app/backend. // let the user pick another app/backend.
@@ -414,7 +414,7 @@ public class DocumentsActivity extends BaseActivity {
@Override @Override
void onTaskFinished(Uri... uris) { void onTaskFinished(Uri... uris) {
Log.d(TAG, "onFinished() " + Arrays.toString(uris)); if (DEBUG) Log.d(TAG, "onFinished() " + Arrays.toString(uris));
final Intent intent = new Intent(); final Intent intent = new Intent();
if (uris.length == 1) { if (uris.length == 1) {

View File

@@ -414,7 +414,7 @@ public class FilesActivity extends BaseActivity {
@Override @Override
void onTaskFinished(Uri... uris) { void onTaskFinished(Uri... uris) {
Log.d(TAG, "onFinished() " + Arrays.toString(uris)); if (DEBUG) Log.d(TAG, "onFinished() " + Arrays.toString(uris));
final Intent intent = new Intent(); final Intent intent = new Intent();
if (uris.length == 1) { if (uris.length == 1) {

View File

@@ -282,7 +282,7 @@ public class OpenExternalDirectoryActivity extends Activity {
logInvalidScopedAccessRequest(context, SCOPED_DIRECTORY_ACCESS_ERROR); logInvalidScopedAccessRequest(context, SCOPED_DIRECTORY_ACCESS_ERROR);
return null; return null;
} }
Log.d(TAG, "doc id for " + file + ": " + docId); if (DEBUG) Log.d(TAG, "doc id for " + file + ": " + docId);
final Uri uri = DocumentsContract.buildTreeDocumentUri(EXTERNAL_STORAGE_AUTH, docId); final Uri uri = DocumentsContract.buildTreeDocumentUri(EXTERNAL_STORAGE_AUTH, docId);
if (uri == null) { if (uri == null) {

View File

@@ -16,6 +16,7 @@
package com.android.documentsui; package com.android.documentsui;
import static com.android.documentsui.Shared.DEBUG;
import static com.android.documentsui.model.DocumentInfo.getCursorString; import static com.android.documentsui.model.DocumentInfo.getCursorString;
import android.content.ContentProvider; import android.content.ContentProvider;
@@ -338,7 +339,7 @@ public class RecentsProvider extends ContentProvider {
if (predicate.apply(authority)) { if (predicate.apply(authority)) {
db.delete(TABLE_STATE, StateColumns.AUTHORITY + "=?", new String[] { db.delete(TABLE_STATE, StateColumns.AUTHORITY + "=?", new String[] {
authority }); authority });
Log.d(TAG, "Purged state for " + authority); if (DEBUG) Log.d(TAG, "Purged state for " + authority);
} }
} }
} finally { } finally {

View File

@@ -16,6 +16,8 @@
package com.android.documentsui; package com.android.documentsui;
import static com.android.documentsui.Shared.DEBUG;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.os.Bundle; import android.os.Bundle;
import android.provider.DocumentsContract.Root; import android.provider.DocumentsContract.Root;
@@ -80,7 +82,7 @@ final class SearchViewManager implements
*/ */
void update(RootInfo root) { void update(RootInfo root) {
if (mMenu == null) { if (mMenu == null) {
Log.d(TAG, "update called before Search MenuItem installed."); if (DEBUG) Log.d(TAG, "update called before Search MenuItem installed.");
return; return;
} }
@@ -108,7 +110,7 @@ final class SearchViewManager implements
void showMenu(boolean visible) { void showMenu(boolean visible) {
if (mMenu == null) { if (mMenu == null) {
Log.d(TAG, "showMenu called before Search MenuItem installed."); if (DEBUG) Log.d(TAG, "showMenu called before Search MenuItem installed.");
return; return;
} }

View File

@@ -33,7 +33,7 @@ public final class Shared {
public static final String TAG = "Documents"; public static final String TAG = "Documents";
public static final boolean DEBUG = true; public static final boolean DEBUG = false;
/** Intent action name to pick a copy destination. */ /** Intent action name to pick a copy destination. */
public static final String ACTION_PICK_COPY_DESTINATION = public static final String ACTION_PICK_COPY_DESTINATION =