diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-25 02:37:36 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-25 02:59:26 +0200 |
commit | d615304e83d349b3da741d8262e4c998ea74ae52 (patch) | |
tree | 6b8383d5b7c723d8fc2eb50689930fe791b015ae /app/src/main/java/com | |
parent | 8e0835e57084be1216e3ef1e71941295b2df909d (diff) |
qrcode: minor adjustments
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r-- | app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java | 2 | ||||
-rw-r--r-- | app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java b/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java index 1a3ec0d2..d89938e1 100644 --- a/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java @@ -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(); diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java index 23e449b6..e2291f9c 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java @@ -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) |