Skip to content
Snippets Groups Projects
Commit 17c8b700 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

ViewBinding: cleanup

Change-Id: I2e7084048b24cefdaf3a230bc3433ceca8d07afd
parent 7b88e6b5
No related branches found
No related tags found
No related merge requests found
......@@ -661,8 +661,11 @@ public class JamiAccountSummaryFragment extends BaseSupportFragment<JamiAccountS
Context context = requireContext();
File file = AndroidFileUtils.createImageFile(context);
Uri uri = FileProvider.getUriForFile(context, ContentUriHandler.AUTHORITY_FILES, file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri)
.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
.putExtra("android.intent.extras.CAMERA_FACING", 1)
.putExtra("android.intent.extras.LENS_FACING_FRONT", 1)
.putExtra("android.intent.extra.USE_FRONT_CAMERA", true);
tmpProfilePhotoUri = uri;
} catch (Exception e) {
Log.e(TAG, "Can't create temp file", e);
......
......@@ -186,8 +186,11 @@ public class ProfileCreationFragment extends BaseSupportFragment<ProfileCreation
Context context = requireContext();
File file = AndroidFileUtils.createImageFile(context);
Uri uri = ContentUriHandler.getUriForFile(context, ContentUriHandler.AUTHORITY_FILES, file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri)
.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
.putExtra("android.intent.extras.CAMERA_FACING", 1)
.putExtra("android.intent.extras.LENS_FACING_FRONT", 1)
.putExtra("android.intent.extra.USE_FRONT_CAMERA", true);
tmpProfilePhotoUri = uri;
startActivityForResult(intent, REQUEST_CODE_PHOTO);
} catch (IOException e) {
......
......@@ -62,7 +62,7 @@ public class RegisterNameDialog extends DialogFragment {
mListener = l;
}
private void handleBlockchainResult(final int state, final String name) {
private void onLookupResult(final int state, final String name) {
CharSequence actualName = binding.ringUsername.getText();
if (actualName == null || actualName.length() == 0) {
binding.ringUsernameTxtBox.setErrorEnabled(false);
......@@ -70,7 +70,7 @@ public class RegisterNameDialog extends DialogFragment {
return;
}
if (actualName.equals(name)) {
if (name.contentEquals(actualName)) {
switch (state) {
case 0:
// on found
......@@ -156,7 +156,7 @@ public class RegisterNameDialog extends DialogFragment {
mDisposableListener = mAccountService
.getRegisteredNames()
.observeOn(mUiScheduler)
.subscribe(r -> handleBlockchainResult(r.state, r.name));
.subscribe(r -> onLookupResult(r.state, r.name));
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment