From 08e69d7023d2f3b3bd78c8b0eb87d9aefb1c28f9 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 17 Aug 2009 14:53:46 -0700 Subject: [PATCH] Remove tabs; fix formatting * Responding to stadler's comments for CL20566 --- res/layout/debug.xml | 4 ++-- .../android/exchange/utility/FileLogger.java | 21 +++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/res/layout/debug.xml b/res/layout/debug.xml index 0313f693c..60e35b9b7 100644 --- a/res/layout/debug.xml +++ b/res/layout/debug.xml @@ -42,11 +42,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/debug_enable_exchange_logging_label" - /> + /> + /> diff --git a/src/com/android/exchange/utility/FileLogger.java b/src/com/android/exchange/utility/FileLogger.java index 7dbd78741..9c305d2d5 100644 --- a/src/com/android/exchange/utility/FileLogger.java +++ b/src/com/android/exchange/utility/FileLogger.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.android.exchange.utility; import android.content.Context; @@ -17,7 +33,7 @@ public class FileLogger { return LOGGER; } - private FileLogger () { + private FileLogger() { synchronized (mLock) { try { mLogWriter = new FileWriter(LOG_FILE_NAME, true); @@ -39,7 +55,7 @@ public class FileLogger { } @SuppressWarnings("deprecation") - static public synchronized void log (String prefix, String str) { + static public synchronized void log(String prefix, String str) { if (LOGGER == null) { LOGGER = new FileLogger(); log("Logger", "\r\n\r\n --- New Log ---"); @@ -49,6 +65,7 @@ public class FileLogger { int min = d.getMinutes(); int sec = d.getSeconds(); + // I don't use DateFormat here because (in my experience), it's much slower StringBuffer sb = new StringBuffer(256); sb.append('['); sb.append(hr);