Skip to content

Commit

Permalink
Merge pull request #3 from nimblehq/chore/disable-info-logs-release-b…
Browse files Browse the repository at this point in the history
…uild

Chore: Disable info log on release build
  • Loading branch information
luongvo authored Feb 19, 2021
2 parents df8f9f7 + 73c447d commit 2775d16
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action)) {
String reason = intent.getStringExtra(SYSTEM_DIALOG_REASON_KEY);
if (reason != null) {
Log.i(TAG, "action:" + action + ", reason:" + reason);
logForInfo("action:" + action + ", reason:" + reason);
if (mListener != null) {
switch (reason) {
case SYSTEM_DIALOG_REASON_HOME_KEY:
Expand All @@ -89,4 +89,10 @@ private void logForDebugging(String message) {
Log.d(TAG, message);
}
}

private void logForInfo(String message) {
if (BuildConfig.DEBUG) {
Log.i(TAG, message);
}
}
}

0 comments on commit 2775d16

Please sign in to comment.