From a50785979712bd45e4d122e7ef0e999732b15fca Mon Sep 17 00:00:00 2001 From: San Mehat Date: Thu, 25 Mar 2010 09:36:54 -0700 Subject: [PATCH] MountService: Switch all Log -> Slog Change-Id: Id33c76497e9d963f295ef6e99d850223ca59b6cd Signed-off-by: San Mehat --- .../java/com/android/server/MountService.java | 138 +++++++++--------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 10920fabf1401..90cb585db1e6e 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -38,7 +38,7 @@ import android.os.Environment; import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; -import android.util.Log; +import android.util.Slog; import java.util.ArrayList; import java.util.HashSet; @@ -148,7 +148,7 @@ class MountService extends IMountService.Stub } void handleFinished() { - if (DEBUG_UNMOUNT) Log.i(TAG, "Unmounting " + path); + if (DEBUG_UNMOUNT) Slog.i(TAG, "Unmounting " + path); doUnmountVolume(path, true); } } @@ -182,7 +182,7 @@ class MountService extends IMountService.Stub try { observer.onShutDownComplete(ret); } catch (RemoteException e) { - Log.w(TAG, "RemoteException when shutting down"); + Slog.w(TAG, "RemoteException when shutting down"); } } } @@ -199,25 +199,25 @@ class MountService extends IMountService.Stub public void handleMessage(Message msg) { switch (msg.what) { case H_UNMOUNT_PM_UPDATE: { - if (DEBUG_UNMOUNT) Log.i(TAG, "H_UNMOUNT_PM_UPDATE"); + if (DEBUG_UNMOUNT) Slog.i(TAG, "H_UNMOUNT_PM_UPDATE"); UnmountCallBack ucb = (UnmountCallBack) msg.obj; mForceUnmounts.add(ucb); - if (DEBUG_UNMOUNT) Log.i(TAG, " registered = " + mUpdatingStatus); + if (DEBUG_UNMOUNT) Slog.i(TAG, " registered = " + mUpdatingStatus); // Register only if needed. if (!mUpdatingStatus) { - if (DEBUG_UNMOUNT) Log.i(TAG, "Updating external media status on PackageManager"); + if (DEBUG_UNMOUNT) Slog.i(TAG, "Updating external media status on PackageManager"); mUpdatingStatus = true; mPms.updateExternalMediaStatus(false, true); } break; } case H_UNMOUNT_PM_DONE: { - if (DEBUG_UNMOUNT) Log.i(TAG, "H_UNMOUNT_PM_DONE"); + if (DEBUG_UNMOUNT) Slog.i(TAG, "H_UNMOUNT_PM_DONE"); if (!mUpdatingStatus) { // Does not correspond to unmount's status update. return; } - if (DEBUG_UNMOUNT) Log.i(TAG, "Updated status. Processing requests"); + if (DEBUG_UNMOUNT) Slog.i(TAG, "Updated status. Processing requests"); mUpdatingStatus = false; int size = mForceUnmounts.size(); int sizeArr[] = new int[size]; @@ -253,7 +253,7 @@ class MountService extends IMountService.Stub ucb)); } else { if (ucb.retries >= MAX_UNMOUNT_RETRIES) { - Log.i(TAG, "Cannot unmount media inspite of " + + Slog.i(TAG, "Cannot unmount media inspite of " + MAX_UNMOUNT_RETRIES + " retries"); // Send final broadcast indicating failure to unmount. } else { @@ -271,7 +271,7 @@ class MountService extends IMountService.Stub break; } case H_UNMOUNT_MS : { - if (DEBUG_UNMOUNT) Log.i(TAG, "H_UNMOUNT_MS"); + if (DEBUG_UNMOUNT) Slog.i(TAG, "H_UNMOUNT_MS"); UnmountCallBack ucb = (UnmountCallBack) msg.obj; ucb.handleFinished(); break; @@ -290,7 +290,7 @@ class MountService extends IMountService.Stub } SystemClock.sleep(1000); } - Log.w(TAG, "Waiting too long for mReady!"); + Slog.w(TAG, "Waiting too long for mReady!"); } } @@ -318,7 +318,7 @@ class MountService extends IMountService.Stub if (state.equals(Environment.MEDIA_UNMOUNTED)) { int rc = doMountVolume(path); if (rc != StorageResultCode.OperationSucceeded) { - Log.e(TAG, String.format("Boot-time mount failed (%d)", rc)); + Slog.e(TAG, String.format("Boot-time mount failed (%d)", rc)); } } else if (state.equals(Environment.MEDIA_SHARED)) { /* @@ -337,7 +337,7 @@ class MountService extends IMountService.Stub mSendUmsConnectedOnBoot = false; } } catch (Exception ex) { - Log.e(TAG, "Boot-time mount exception", ex); + Slog.e(TAG, "Boot-time mount exception", ex); } } }.start(); @@ -354,7 +354,7 @@ class MountService extends IMountService.Stub } public void binderDied() { - if (LOCAL_LOGD) Log.d(TAG, "An IMountServiceListener has died!"); + if (LOCAL_LOGD) Slog.d(TAG, "An IMountServiceListener has died!"); synchronized(mListeners) { mListeners.remove(this); mListener.asBinder().unlinkToDeath(this, 0); @@ -372,18 +372,18 @@ class MountService extends IMountService.Stub mConnector.doCommand(String.format( "volume %sshare %s %s", (enable ? "" : "un"), path, method)); } catch (NativeDaemonConnectorException e) { - Log.e(TAG, "Failed to share/unshare", e); + Slog.e(TAG, "Failed to share/unshare", e); } } private void updatePublicVolumeState(String path, String state) { if (!path.equals(Environment.getExternalStorageDirectory().getPath())) { - Log.w(TAG, "Multiple volumes not currently supported"); + Slog.w(TAG, "Multiple volumes not currently supported"); return; } if (mLegacyState.equals(state)) { - Log.w(TAG, String.format("Duplicate state transition (%s -> %s)", mLegacyState, state)); + Slog.w(TAG, String.format("Duplicate state transition (%s -> %s)", mLegacyState, state)); return; } // Update state on PackageManager @@ -401,10 +401,10 @@ class MountService extends IMountService.Stub try { bl.mListener.onStorageStateChanged(path, oldState, state); } catch (RemoteException rex) { - Log.e(TAG, "Listener dead"); + Slog.e(TAG, "Listener dead"); mListeners.remove(i); } catch (Exception ex) { - Log.e(TAG, "Listener failed", ex); + Slog.e(TAG, "Listener failed", ex); } } } @@ -434,7 +434,7 @@ class MountService extends IMountService.Stub String[] tok = volstr.split(" "); // FMT: