mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Merge branch '1245-enable-pin-lock' into 'master'
Enable sign-in reminder, PIN lock and dark theme for release builds See merge request briar/briar!917
This commit is contained in:
@@ -30,19 +30,4 @@ public interface TestingConstants {
|
||||
long EXPIRY_DATE = IS_DEBUG_BUILD || IS_BETA_BUILD ?
|
||||
BuildConfig.BuildTimestamp + 90 * 24 * 60 * 60 * 1000L :
|
||||
Long.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* Feature flag for enabling the dark UI theme in release builds.
|
||||
*/
|
||||
boolean FEATURE_FLAG_DARK_THEME = false;
|
||||
|
||||
/**
|
||||
* Feature flag for enabling the sign-in reminder in release builds.
|
||||
*/
|
||||
boolean FEATURE_FLAG_SIGN_IN_REMINDER = IS_DEBUG_BUILD;
|
||||
|
||||
/**
|
||||
* Feature flag for enabling the PIN lock in release builds.
|
||||
*/
|
||||
boolean FEATURE_FLAG_PIN_LOCK = IS_DEBUG_BUILD;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import javax.inject.Inject;
|
||||
|
||||
import static android.content.Intent.ACTION_BOOT_COMPLETED;
|
||||
import static android.content.Intent.ACTION_MY_PACKAGE_REPLACED;
|
||||
import static org.briarproject.briar.android.TestingConstants.FEATURE_FLAG_SIGN_IN_REMINDER;
|
||||
import static org.briarproject.briar.android.settings.SettingsFragment.NOTIFY_SIGN_IN;
|
||||
import static org.briarproject.briar.api.android.AndroidNotificationManager.ACTION_DISMISS_REMINDER;
|
||||
|
||||
@@ -27,8 +26,6 @@ public class SignInReminderReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context ctx, Intent intent) {
|
||||
if (!FEATURE_FLAG_SIGN_IN_REMINDER) return;
|
||||
|
||||
BriarApplication app = (BriarApplication) ctx.getApplicationContext();
|
||||
AndroidComponent applicationComponent = app.getApplicationComponent();
|
||||
applicationComponent.inject(this);
|
||||
|
||||
@@ -77,9 +77,6 @@ import static org.briarproject.bramble.api.plugin.TorConstants.PREF_TOR_NETWORK_
|
||||
import static org.briarproject.bramble.util.LogUtils.logDuration;
|
||||
import static org.briarproject.bramble.util.LogUtils.logException;
|
||||
import static org.briarproject.bramble.util.LogUtils.now;
|
||||
import static org.briarproject.briar.android.TestingConstants.FEATURE_FLAG_DARK_THEME;
|
||||
import static org.briarproject.briar.android.TestingConstants.FEATURE_FLAG_PIN_LOCK;
|
||||
import static org.briarproject.briar.android.TestingConstants.FEATURE_FLAG_SIGN_IN_REMINDER;
|
||||
import static org.briarproject.briar.android.TestingConstants.IS_DEBUG_BUILD;
|
||||
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_RINGTONE;
|
||||
import static org.briarproject.briar.android.navdrawer.NavDrawerActivity.INTENT_SIGN_OUT;
|
||||
@@ -169,8 +166,6 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
||||
enableBluetooth = (ListPreference) findPreference("pref_key_bluetooth");
|
||||
torNetwork = (ListPreference) findPreference(TOR_NETWORK);
|
||||
torMobile = (SwitchPreference) findPreference(TOR_MOBILE);
|
||||
SwitchPreference notifySignIn =
|
||||
(SwitchPreference) findPreference(NOTIFY_SIGN_IN);
|
||||
screenLock = (SwitchPreference) findPreference(PREF_SCREEN_LOCK);
|
||||
screenLockTimeout =
|
||||
(ListPreference) findPreference(PREF_SCREEN_LOCK_TIMEOUT);
|
||||
@@ -230,11 +225,6 @@ public class SettingsFragment extends PreferenceFragmentCompat
|
||||
}
|
||||
);
|
||||
} else {
|
||||
theme.setVisible(FEATURE_FLAG_DARK_THEME);
|
||||
notifySignIn.setVisible(FEATURE_FLAG_SIGN_IN_REMINDER);
|
||||
screenLock.setVisible(FEATURE_FLAG_PIN_LOCK);
|
||||
screenLockTimeout.setVisible(FEATURE_FLAG_PIN_LOCK);
|
||||
|
||||
findPreference("pref_key_explode").setVisible(false);
|
||||
findPreference("pref_key_test_data").setVisible(false);
|
||||
PreferenceGroup testing =
|
||||
|
||||
Reference in New Issue
Block a user