From 40e9f2922cae76ffcbc521481e5be8e80e8744ef Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 27 Nov 2012 19:12:23 -0800 Subject: Quiet down a lot of logging. Also fix a little problem where the USER_STARTED broadcasts were not being sent as ordered broadcasts(!). Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41 --- .../src/com/android/systemui/usb/StorageNotification.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'packages/SystemUI/src/com/android/systemui/usb') diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index 91fc67a..06696fe 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -33,6 +33,7 @@ import android.util.Slog; public class StorageNotification extends StorageEventListener { private static final String TAG = "StorageNotification"; + private static final boolean DEBUG = false; private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true; @@ -70,8 +71,8 @@ public class StorageNotification extends StorageEventListener { mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); final boolean connected = mStorageManager.isUsbMassStorageConnected(); - Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable, - Environment.getExternalStorageState())); + if (DEBUG) Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", + mUmsAvailable, Environment.getExternalStorageState())); HandlerThread thr = new HandlerThread("SystemUI StorageNotification"); thr.start(); @@ -101,7 +102,8 @@ public class StorageNotification extends StorageEventListener { */ String st = Environment.getExternalStorageState(); - Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st)); + if (DEBUG) Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", + connected, st)); if (connected && (st.equals( Environment.MEDIA_REMOVED) || st.equals(Environment.MEDIA_CHECKING))) { @@ -127,7 +129,7 @@ public class StorageNotification extends StorageEventListener { } private void onStorageStateChangedAsync(String path, String oldState, String newState) { - Slog.i(TAG, String.format( + if (DEBUG) Slog.i(TAG, String.format( "Media {%s} state changed from {%s} -> {%s}", path, oldState, newState)); if (newState.equals(Environment.MEDIA_SHARED)) { /* -- cgit v1.1