aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/dictionarypack/PrivateLog.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-04-16 21:44:42 +0900
committerJean Chalard <jchalard@google.com>2013-04-19 22:50:45 +0900
commitf8014eea341040f8d155e071e4e0c915a7ebd61d (patch)
treec4a8fbddf7d415fafa0b0a65caddbeb4cac1cc0c /java/src/com/android/inputmethod/dictionarypack/PrivateLog.java
parentb8ff89c809dabc46df9ee683c6064f67ee432213 (diff)
downloadlatinime-f8014eea341040f8d155e071e4e0c915a7ebd61d.tar.gz
latinime-f8014eea341040f8d155e071e4e0c915a7ebd61d.tar.xz
latinime-f8014eea341040f8d155e071e4e0c915a7ebd61d.zip
Hide the correct button when pressing a new button.
Bug: 7600384 Change-Id: Ic5dbbbbcf19d778dde1316ebb417f1a8ede2d25d
Diffstat (limited to 'java/src/com/android/inputmethod/dictionarypack/PrivateLog.java')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/PrivateLog.java23
1 files changed, 8 insertions, 15 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/PrivateLog.java b/java/src/com/android/inputmethod/dictionarypack/PrivateLog.java
index 8593c1c9b..67dd7b9b7 100644
--- a/java/src/com/android/inputmethod/dictionarypack/PrivateLog.java
+++ b/java/src/com/android/inputmethod/dictionarypack/PrivateLog.java
@@ -16,7 +16,6 @@
package com.android.inputmethod.dictionarypack;
-import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
@@ -24,6 +23,7 @@ import android.database.sqlite.SQLiteOpenHelper;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Locale;
/**
* Class to keep long-term log. This is inactive in production, and is only for debug purposes.
@@ -44,10 +44,10 @@ public class PrivateLog {
+ COLUMN_EVENT + " TEXT);";
private static final SimpleDateFormat sDateFormat =
- new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+ new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US);
private static PrivateLog sInstance = new PrivateLog();
- private static DebugHelper mDebugHelper = null;
+ private static DebugHelper sDebugHelper = null;
private PrivateLog() {
}
@@ -55,8 +55,8 @@ public class PrivateLog {
public static synchronized PrivateLog getInstance(final Context context) {
if (!DEBUG) return sInstance;
synchronized(PrivateLog.class) {
- if (sInstance.mDebugHelper == null) {
- sInstance.mDebugHelper = new DebugHelper(context);
+ if (sDebugHelper == null) {
+ sDebugHelper = new DebugHelper(context);
}
return sInstance;
}
@@ -94,16 +94,9 @@ public class PrivateLog {
}
- public static void log(String event, Context context) {
+ public static void log(String event) {
if (!DEBUG) return;
- final SQLiteDatabase l = getInstance(context).mDebugHelper.getWritableDatabase();
- mDebugHelper.insert(l, event);
- }
-
- public static void log(String event, ContentProvider provider) {
- if (!DEBUG) return;
- final SQLiteDatabase l =
- getInstance(provider.getContext()).mDebugHelper.getWritableDatabase();
- mDebugHelper.insert(l, event);
+ final SQLiteDatabase l = sDebugHelper.getWritableDatabase();
+ DebugHelper.insert(l, event);
}
}