Changing the dogfood check to a static boolean to better handle proguard optimizations

Change-Id: I892b88ce1a007fafc23a73ad4193c5c4aa411d1b
This commit is contained in:
Sunny Goyal committed 2015-07-16 14:09:53 -07:00
1 parent 14031ebb81
commit 6c56c68555
13 files changed
+29 -49

No files matched your search

+1 -24
View File
@@ -1,32 +1,9 @@
package com.android.launcher3;
import android.text.TextUtils;
import android.util.Log;
// TODO: Remove this class once all its references are gone.
public class BuildInfo {
private static final boolean DBG = false;
private static final String TAG = "BuildInfo";
public boolean isDogfoodBuild() {
return false;
}
public static BuildInfo loadByName(String className) {
if (TextUtils.isEmpty(className)) return new BuildInfo();
if (DBG) Log.d(TAG, "Loading BuildInfo: " + className);
try {
Class<?> cls = Class.forName(className);
return (BuildInfo) cls.newInstance();
} catch (ClassNotFoundException e) {
Log.e(TAG, "Bad BuildInfo class", e);
} catch (InstantiationException e) {
Log.e(TAG, "Bad BuildInfo class", e);
} catch (IllegalAccessException e) {
Log.e(TAG, "Bad BuildInfo class", e);
} catch (ClassCastException e) {
Log.e(TAG, "Bad BuildInfo class", e);
}
return new BuildInfo();
}
}