Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix - Check Device Credentials Existance #14536

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,6 @@ default void onDarkThemeModeChanged(DarkMode mode) {
*/
String[] getPassCode();

/**
* Gets the unlock via fingerprint preference configured by the user.
*
* @implNote this is always false
* @return useFingerprint is unlock with fingerprint enabled
*/
boolean isFingerprintUnlockEnabled();

/**
* Gets the auto upload paths flag last set.
*
Expand Down Expand Up @@ -210,7 +202,7 @@ default void onDarkThemeModeChanged(DarkMode mode) {
* Get preferred folder sort order.
*
* @param folder Folder whoch order is being retrieved or null for root folder
* @return sort order the sort order, default is {@link FileSortOrder#sort_a_to_z} (sort by name)
* @return sort order the sort order, default is {@link FileSortOrder# sort_a_to_z} (sort by name)
*/
FileSortOrder getSortOrderByFolder(@Nullable OCFile folder);

Expand All @@ -232,7 +224,7 @@ default void onDarkThemeModeChanged(DarkMode mode) {
/**
* Get preferred folder sort order.
*
* @return sort order the sort order, default is {@link FileSortOrder#sort_a_to_z} (sort by name)
* @return sort order the sort order, default is {@link FileSortOrder# sort_a_to_z} (sort by name)
*/
FileSortOrder getSortOrderByType(FileSortOrder.Type type, FileSortOrder defaultOrder);
FileSortOrder getSortOrderByType(FileSortOrder.Type type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ public String[] getPassCode() {
};
}

@Override
public boolean isFingerprintUnlockEnabled() {
return preferences.getBoolean(SettingsActivity.PREFERENCE_USE_FINGERPRINT, false);
}

@Override
public String getFolderLayout(OCFile folder) {
return getFolderPreference(context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class PassCodeManager(private val preferences: AppPreferences, private val clock
}

private fun deviceCredentialsAreEnabled(activity: Activity): Boolean {
return SettingsActivity.LOCK_DEVICE_CREDENTIALS == preferences.lockPreference ||
(preferences.isFingerprintUnlockEnabled && DeviceCredentialUtils.areCredentialsAvailable(activity))
return (preferences.lockPreference == SettingsActivity.LOCK_DEVICE_CREDENTIALS) &&
DeviceCredentialUtils.areCredentialsAvailable(activity)
}

private fun getActivityRootView(activity: Activity): View? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public class SettingsActivity extends PreferenceActivity
public static final String LOCK_DEVICE_CREDENTIALS = "device_credentials";


public final static String PREFERENCE_USE_FINGERPRINT = "use_fingerprint";
public static final String PREFERENCE_SHOW_MEDIA_SCAN_NOTIFICATIONS = "show_media_scan_notifications";

private static final int ACTION_REQUEST_PASSCODE = 5;
Expand Down
Loading