mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Fix unwanted screen lock after initial activation
This commit is contained in:
@@ -21,6 +21,7 @@ import org.thoughtcrime.securesms.components.SwitchPreferenceCompat;
|
||||
import org.thoughtcrime.securesms.connect.ApplicationDcContext;
|
||||
import org.thoughtcrime.securesms.connect.DcHelper;
|
||||
import org.thoughtcrime.securesms.dependencies.InjectableType;
|
||||
import org.thoughtcrime.securesms.util.ScreenLockUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -116,6 +117,9 @@ public class AppProtectionPreferenceFragment extends CorrectedPreferenceFragment
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
boolean enabled = (Boolean) newValue;
|
||||
manageScreenLockChildren(enabled);
|
||||
if (enabled) {
|
||||
ScreenLockUtil.shouldLockApp = false;
|
||||
}
|
||||
TextSecurePreferences.setScreenLockEnabled(getContext(), enabled);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user