mirror of https://github.com/perkeep/perkeep.git
android: logging/whitespace cleanup.
Addressing feedback from https://camlistore.org/r/3416 Change-Id: Ied7e86e12861ec27be0e2f3d41aefcd92ec5d1a3
This commit is contained in:
parent
413163e8f9
commit
12a9f6b1ed
|
@ -10,7 +10,7 @@ import com.google.zxing.integration.android.IntentIntegrator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* QRPrefence implements a custom {@link Preference} for scanning barcodes.
|
* QRPrefence implements a custom {@link Preference} for scanning barcodes.
|
||||||
*
|
*
|
||||||
* It will launch a barcode scanner intent configured for scanning QR codes using {@link IntentIntegrator}. If no barcode scanner app is installed {@link IntentIntegrator} will prompt the user to install one from the Google Play market.
|
* It will launch a barcode scanner intent configured for scanning QR codes using {@link IntentIntegrator}. If no barcode scanner app is installed {@link IntentIntegrator} will prompt the user to install one from the Google Play market.
|
||||||
*/
|
*/
|
||||||
public class QRPreference extends Preference {
|
public class QRPreference extends Preference {
|
||||||
|
@ -24,12 +24,8 @@ public class QRPreference extends Preference {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
Log.v(TAG, "onClick");
|
|
||||||
SettingsActivity activity = (SettingsActivity) this.getContext();
|
SettingsActivity activity = (SettingsActivity) this.getContext();
|
||||||
IntentIntegrator integrator = new IntentIntegrator(activity);
|
IntentIntegrator integrator = new IntentIntegrator(activity);
|
||||||
AlertDialog alert = integrator.initiateScan(IntentIntegrator.QR_CODE_TYPES);
|
integrator.initiateScan(IntentIntegrator.QR_CODE_TYPES);
|
||||||
if (alert != null) {
|
|
||||||
Log.v(TAG, "user was prompted to install barcode scanner app.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue