Merge pull request #2275 from open-keychain/debug
Use Constants.DEBUG instead of BuildConfig.DEBUG
This commit is contained in:
@@ -178,7 +178,7 @@ public class KeychainApplication extends Application {
|
|||||||
|
|
||||||
private void updateLoggingStatus() {
|
private void updateLoggingStatus() {
|
||||||
Timber.uprootAll();
|
Timber.uprootAll();
|
||||||
boolean enableDebugLogging = BuildConfig.DEBUG;
|
boolean enableDebugLogging = Constants.DEBUG;
|
||||||
if (enableDebugLogging) {
|
if (enableDebugLogging) {
|
||||||
Timber.plant(new DebugTree());
|
Timber.plant(new DebugTree());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import android.support.annotation.Nullable;
|
|||||||
|
|
||||||
import com.google.auto.value.AutoValue;
|
import com.google.auto.value.AutoValue;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.sufficientlysecure.keychain.BuildConfig;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||||
|
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public abstract class SecurityTokenInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SecurityTokenInfo newInstanceDebugKeyserver() {
|
public static SecurityTokenInfo newInstanceDebugKeyserver() {
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!Constants.DEBUG) {
|
||||||
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
||||||
}
|
}
|
||||||
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
||||||
@@ -85,7 +85,7 @@ public abstract class SecurityTokenInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SecurityTokenInfo newInstanceDebugUri() {
|
public static SecurityTokenInfo newInstanceDebugUri() {
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!Constants.DEBUG) {
|
||||||
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
||||||
}
|
}
|
||||||
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
||||||
@@ -94,7 +94,7 @@ public abstract class SecurityTokenInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SecurityTokenInfo newInstanceDebugLocked() {
|
public static SecurityTokenInfo newInstanceDebugLocked() {
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!Constants.DEBUG) {
|
||||||
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
||||||
}
|
}
|
||||||
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
||||||
@@ -103,7 +103,7 @@ public abstract class SecurityTokenInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SecurityTokenInfo newInstanceDebugLockedHard() {
|
public static SecurityTokenInfo newInstanceDebugLockedHard() {
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!Constants.DEBUG) {
|
||||||
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
throw new UnsupportedOperationException("This operation is only available in debug builds!");
|
||||||
}
|
}
|
||||||
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
return SecurityTokenInfo.create(TransportType.NFC, TokenType.UNKNOWN,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import android.view.View.OnClickListener;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.BuildConfig;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.securitytoken.SecurityTokenInfo;
|
import org.sufficientlysecure.keychain.securitytoken.SecurityTokenInfo;
|
||||||
import org.sufficientlysecure.keychain.ui.CreateKeyActivity.FragAction;
|
import org.sufficientlysecure.keychain.ui.CreateKeyActivity.FragAction;
|
||||||
@@ -57,7 +57,7 @@ public class CreateSecurityTokenWaitFragment extends Fragment {
|
|||||||
((BaseSecurityTokenActivity) this.getActivity()).checkDeviceConnection();
|
((BaseSecurityTokenActivity) this.getActivity()).checkDeviceConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
setHasOptionsMenu(BuildConfig.DEBUG);
|
setHasOptionsMenu(Constants.DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user