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 ...@@ -661,8 +661,11 @@ public class JamiAccountSummaryFragment extends BaseSupportFragment<JamiAccountS
Context context = requireContext(); Context context = requireContext();
File file = AndroidFileUtils.createImageFile(context); File file = AndroidFileUtils.createImageFile(context);
Uri uri = FileProvider.getUriForFile(context, ContentUriHandler.AUTHORITY_FILES, file); Uri uri = FileProvider.getUriForFile(context, ContentUriHandler.AUTHORITY_FILES, file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); intent.putExtra(MediaStore.EXTRA_OUTPUT, uri)
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); .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; tmpProfilePhotoUri = uri;
} catch (Exception e) { } catch (Exception e) {
Log.e(TAG, "Can't create temp file", e); Log.e(TAG, "Can't create temp file", e);
......
...@@ -186,8 +186,11 @@ public class ProfileCreationFragment extends BaseSupportFragment<ProfileCreation ...@@ -186,8 +186,11 @@ public class ProfileCreationFragment extends BaseSupportFragment<ProfileCreation
Context context = requireContext(); Context context = requireContext();
File file = AndroidFileUtils.createImageFile(context); File file = AndroidFileUtils.createImageFile(context);
Uri uri = ContentUriHandler.getUriForFile(context, ContentUriHandler.AUTHORITY_FILES, file); Uri uri = ContentUriHandler.getUriForFile(context, ContentUriHandler.AUTHORITY_FILES, file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); intent.putExtra(MediaStore.EXTRA_OUTPUT, uri)
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); .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; tmpProfilePhotoUri = uri;
startActivityForResult(intent, REQUEST_CODE_PHOTO); startActivityForResult(intent, REQUEST_CODE_PHOTO);
} catch (IOException e) { } catch (IOException e) {
......
...@@ -62,7 +62,7 @@ public class RegisterNameDialog extends DialogFragment { ...@@ -62,7 +62,7 @@ public class RegisterNameDialog extends DialogFragment {
mListener = l; 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(); CharSequence actualName = binding.ringUsername.getText();
if (actualName == null || actualName.length() == 0) { if (actualName == null || actualName.length() == 0) {
binding.ringUsernameTxtBox.setErrorEnabled(false); binding.ringUsernameTxtBox.setErrorEnabled(false);
...@@ -70,7 +70,7 @@ public class RegisterNameDialog extends DialogFragment { ...@@ -70,7 +70,7 @@ public class RegisterNameDialog extends DialogFragment {
return; return;
} }
if (actualName.equals(name)) { if (name.contentEquals(actualName)) {
switch (state) { switch (state) {
case 0: case 0:
// on found // on found
...@@ -156,7 +156,7 @@ public class RegisterNameDialog extends DialogFragment { ...@@ -156,7 +156,7 @@ public class RegisterNameDialog extends DialogFragment {
mDisposableListener = mAccountService mDisposableListener = mAccountService
.getRegisteredNames() .getRegisteredNames()
.observeOn(mUiScheduler) .observeOn(mUiScheduler)
.subscribe(r -> handleBlockchainResult(r.state, r.name)); .subscribe(r -> onLookupResult(r.state, r.name));
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment