qrcode: minor adjustments
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -70,7 +70,7 @@ public class ConfigNamingDialogFragment extends DialogFragment {
|
||||
imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
||||
final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity);
|
||||
alertDialogBuilder.setTitle(R.string.create_tunnel);
|
||||
alertDialogBuilder.setTitle(R.string.import_from_qrcode);
|
||||
|
||||
binding = ConfigNamingDialogFragmentBinding.inflate(getActivity().getLayoutInflater(), null, false);
|
||||
binding.executePendingBindings();
|
||||
|
||||
@@ -83,10 +83,8 @@ public class TunnelListFragment extends BaseFragment {
|
||||
|
||||
// Config text is valid, now create the tunnel…
|
||||
final FragmentManager fragmentManager = getFragmentManager();
|
||||
if (fragmentManager != null) {
|
||||
final ConfigNamingDialogFragment fragment = ConfigNamingDialogFragment.newInstance(configText);
|
||||
fragment.show(fragmentManager, null);
|
||||
}
|
||||
if (fragmentManager != null)
|
||||
ConfigNamingDialogFragment.newInstance(configText).show(fragmentManager, null);
|
||||
} catch (final IllegalArgumentException|IOException exception) {
|
||||
onTunnelImportFinished(Collections.emptyList(), Collections.singletonList(exception));
|
||||
}
|
||||
@@ -246,6 +244,8 @@ public class TunnelListFragment extends BaseFragment {
|
||||
public void onRequestScanQRCode(@SuppressWarnings("unused") final View view) {
|
||||
final IntentIntegrator intentIntegrator = IntentIntegrator.forSupportFragment(this);
|
||||
intentIntegrator.setOrientationLocked(false);
|
||||
intentIntegrator.setBeepEnabled(false);
|
||||
intentIntegrator.setPrompt(getString(R.string.qrcode_hint));
|
||||
intentIntegrator.initiateScan(Collections.singletonList(IntentIntegrator.QR_CODE));
|
||||
|
||||
if (binding != null)
|
||||
|
||||
Reference in New Issue
Block a user