本文整理匯總了Java中com.facebook.android.BuildConfig.DEBUG屬性的典型用法代碼示例。如果您正苦於以下問題:Java BuildConfig.DEBUG屬性的具體用法?Java BuildConfig.DEBUG怎麽用?Java BuildConfig.DEBUG使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.facebook.android.BuildConfig
的用法示例。
在下文中一共展示了BuildConfig.DEBUG屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setFacebookDomain
/**
* Sets the base Facebook domain to use when making Web requests. This defaults to "facebook.com", but may
* be overridden to, e.g., "beta.facebook.com" to direct requests at a different domain. This method should
* never be called from production code.
*
* @param facebookDomain the base domain to use instead of "facebook.com"
*/
public static void setFacebookDomain(String facebookDomain) {
if (!BuildConfig.DEBUG) {
Log.w(TAG, "WARNING: Calling setFacebookDomain from non-DEBUG code.");
}
Settings.facebookDomain = facebookDomain;
}
示例2: buildFacebookAppList
private static List<NativeAppInfo> buildFacebookAppList() {
List<NativeAppInfo> list = new ArrayList<NativeAppInfo>();
// Katana needs to be the first thing in the list since it will get selected as the default FACEBOOK_APP_INFO
list.add(FACEBOOK_APP_INFO);
if(BuildConfig.DEBUG) {
list.add(new WakizashiAppInfo());
}
return list;
}
示例3: logd
public static void logd(String tag, Exception e) {
if (BuildConfig.DEBUG && tag != null && e != null) {
Log.d(tag, e.getClass().getSimpleName() + ": " + e.getMessage());
}
}
示例4: logd
public static void logd(String tag, String msg) {
if (BuildConfig.DEBUG && tag != null && msg != null) {
Log.d(tag, msg);
}
}
示例5: isLoggingBehaviorEnabled
/**
* Certain logging behaviors are available for debugging beyond those that should be
* enabled in production.
*
* Checks if a particular extended logging behavior is enabled.
*
* @param behavior
* The LoggingBehavior to check
* @return whether behavior is enabled
*/
public static final boolean isLoggingBehaviorEnabled(LoggingBehavior behavior) {
synchronized (loggingBehaviors) {
return BuildConfig.DEBUG && loggingBehaviors.contains(behavior);
}
}