diff options
| author | Sunny Goyal <sunnygoyal@google.com> | 2017-03-06 16:56:39 -0800 |
|---|---|---|
| committer | Sunny Goyal <sunnygoyal@google.com> | 2017-03-07 09:30:51 -0800 |
| commit | 3d706ad70365052e3224fc4f4b0e7d1f5e8abf22 (patch) | |
| tree | aad84ca3eddb76da58a7d1cc8ac9ccff84c01393 /src/com/android/launcher3/logging | |
| parent | 36f5876d01a25f9a8e0a65422ff193cacd35284f (diff) | |
| download | packages_apps_Trebuchet-3d706ad70365052e3224fc4f4b0e7d1f5e8abf22.tar.gz packages_apps_Trebuchet-3d706ad70365052e3224fc4f4b0e7d1f5e8abf22.tar.bz2 packages_apps_Trebuchet-3d706ad70365052e3224fc4f4b0e7d1f5e8abf22.zip | |
Separating the config and flags in different directories so that
it is easier to override one or the other
Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
Diffstat (limited to 'src/com/android/launcher3/logging')
| -rw-r--r-- | src/com/android/launcher3/logging/FileLog.java | 11 | ||||
| -rw-r--r-- | src/com/android/launcher3/logging/UserEventDispatcher.java | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/com/android/launcher3/logging/FileLog.java b/src/com/android/launcher3/logging/FileLog.java index ffb41b76b..4c83e9ac2 100644 --- a/src/com/android/launcher3/logging/FileLog.java +++ b/src/com/android/launcher3/logging/FileLog.java @@ -6,9 +6,8 @@ import android.os.Message; import android.util.Log; import android.util.Pair; -import com.android.launcher3.LauncherModel; import com.android.launcher3.Utilities; -import com.android.launcher3.config.ProviderConfig; +import com.android.launcher3.config.FeatureFlags; import java.io.BufferedReader; import java.io.File; @@ -40,7 +39,7 @@ public final class FileLog { private static File sLogsDirectory = null; public static void setDir(File logsDir) { - if (ProviderConfig.IS_DOGFOOD_BUILD || Utilities.IS_DEBUG_DEVICE) { + if (FeatureFlags.IS_DOGFOOD_BUILD || Utilities.IS_DEBUG_DEVICE) { synchronized (DATE_FORMAT) { // If the target directory changes, stop any active thread. if (sHandler != null && !logsDir.equals(sLogsDirectory)) { @@ -77,7 +76,7 @@ public final class FileLog { } public static void print(String tag, String msg, Exception e) { - if (!ProviderConfig.IS_DOGFOOD_BUILD) { + if (!FeatureFlags.IS_DOGFOOD_BUILD) { return; } String out = String.format("%s %s %s", DATE_FORMAT.format(new Date()), tag, msg); @@ -103,7 +102,7 @@ public final class FileLog { * @param out if not null, all the persisted logs are copied to the writer. */ public static void flushAll(PrintWriter out) throws InterruptedException { - if (!ProviderConfig.IS_DOGFOOD_BUILD) { + if (!FeatureFlags.IS_DOGFOOD_BUILD) { return; } CountDownLatch latch = new CountDownLatch(1); @@ -136,7 +135,7 @@ public final class FileLog { @Override public boolean handleMessage(Message msg) { - if (sLogsDirectory == null || !ProviderConfig.IS_DOGFOOD_BUILD) { + if (sLogsDirectory == null || !FeatureFlags.IS_DOGFOOD_BUILD) { return true; } switch (msg.what) { diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java index 90e453117..04ca24741 100644 --- a/src/com/android/launcher3/logging/UserEventDispatcher.java +++ b/src/com/android/launcher3/logging/UserEventDispatcher.java @@ -29,8 +29,7 @@ import com.android.launcher3.DropTarget; import com.android.launcher3.ItemInfo; import com.android.launcher3.R; import com.android.launcher3.Utilities; -import com.android.launcher3.config.ProviderConfig; -import com.android.launcher3.userevent.nano.LauncherLogProto; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent; @@ -61,7 +60,7 @@ public class UserEventDispatcher { private static final String TAG = "UserEvent"; private static final boolean IS_VERBOSE = - ProviderConfig.IS_DOGFOOD_BUILD && Utilities.isPropertyEnabled(LogConfig.USEREVENT); + FeatureFlags.IS_DOGFOOD_BUILD && Utilities.isPropertyEnabled(LogConfig.USEREVENT); private static UserEventDispatcher sInstance; private static final Object LOCK = new Object(); |
