summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BuildInfo.java
diff options
context:
space:
mode:
authorNilesh Agrawal <nileshagrawal@google.com>2014-01-09 17:14:01 -0800
committerDanesh M <daneshm90@gmail.com>2014-06-06 22:54:24 -0700
commitff307f908514c635a4e35c051014ad815a5fa965 (patch)
tree0afdf72979317e300a61c23c8ddc7c937e099b18 /src/com/android/launcher3/BuildInfo.java
parentf13fc619f41827beae0adf7cea8c8288dcbfa085 (diff)
downloadandroid_packages_apps_Trebuchet-ff307f908514c635a4e35c051014ad815a5fa965.tar.gz
android_packages_apps_Trebuchet-ff307f908514c635a4e35c051014ad815a5fa965.tar.bz2
android_packages_apps_Trebuchet-ff307f908514c635a4e35c051014ad815a5fa965.zip
Allow DISABLE_ALL_APPS to be set using a system property.
- Moving the property to LauncherAppState - The property is only read on dogfood builds. The property can be set using setprop or /data/local.prop Change-Id: I14c7354efb12edb93f97e81687a6f920cc634e9a
Diffstat (limited to 'src/com/android/launcher3/BuildInfo.java')
-rw-r--r--src/com/android/launcher3/BuildInfo.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/com/android/launcher3/BuildInfo.java b/src/com/android/launcher3/BuildInfo.java
new file mode 100644
index 000000000..b49ee0d9b
--- /dev/null
+++ b/src/com/android/launcher3/BuildInfo.java
@@ -0,0 +1,32 @@
+package com.android.launcher3;
+
+import android.text.TextUtils;
+import android.util.Log;
+
+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();
+ }
+}