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
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
// let the user pick another app/backend.
@@ -414,7 +414,7 @@ public class DocumentsActivity extends BaseActivity {
@Override
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();
if (uris.length == 1) {

View File

@@ -414,7 +414,7 @@ public class FilesActivity extends BaseActivity {
@Override
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();
if (uris.length == 1) {

View File

@@ -282,7 +282,7 @@ public class OpenExternalDirectoryActivity extends Activity {
logInvalidScopedAccessRequest(context, SCOPED_DIRECTORY_ACCESS_ERROR);
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);
if (uri == null) {

View File

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

View File

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

View File

@@ -33,7 +33,7 @@ public final class Shared {
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. */
public static final String ACTION_PICK_COPY_DESTINATION =