mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
commit
b0e8175003
20 changed files with 47 additions and 46 deletions
|
|
@ -178,8 +178,8 @@ public class CommonsApplication extends Application {
|
||||||
|
|
||||||
public boolean deviceHasCamera() {
|
public boolean deviceHasCamera() {
|
||||||
PackageManager pm = getPackageManager();
|
PackageManager pm = getPackageManager();
|
||||||
return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) ||
|
return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)
|
||||||
pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT);
|
|| pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearApplicationData(Context context, LogoutListener logoutListener) {
|
public void clearApplicationData(Context context, LogoutListener logoutListener) {
|
||||||
|
|
|
||||||
|
|
@ -248,8 +248,8 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable editable) {
|
public void afterTextChanged(Editable editable) {
|
||||||
boolean enabled = usernameEdit.getText().length() != 0 && passwordEdit.getText().length() != 0 &&
|
boolean enabled = usernameEdit.getText().length() != 0 && passwordEdit.getText().length() != 0
|
||||||
(BuildConfig.DEBUG || twoFactorEdit.getText().length() != 0 || twoFactorEdit.getVisibility() != View.VISIBLE);
|
&& (BuildConfig.DEBUG || twoFactorEdit.getText().length() != 0 || twoFactorEdit.getVisibility() != View.VISIBLE);
|
||||||
loginButton.setEnabled(enabled);
|
loginButton.setEnabled(enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,9 +123,10 @@ public class FileUtils {
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
Timber.d(e);
|
Timber.d(e);
|
||||||
} finally {
|
} finally {
|
||||||
if (cursor != null)
|
if (cursor != null) {
|
||||||
cursor.close();
|
cursor.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ public class FragmentUtils {
|
||||||
.commitNow();
|
.commitNow();
|
||||||
return true;
|
return true;
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
Timber.e(e, "Could not add & commit fragment. " +
|
Timber.e(e, "Could not add & commit fragment. "
|
||||||
"Did you mean to call commitAllowingStateLoss?");
|
+ "Did you mean to call commitAllowingStateLoss?");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue