Nicer access of PassFormat
This commit is contained in:
parent
de2ec23ac2
commit
3efed3e588
1 changed files with 7 additions and 6 deletions
|
@ -91,18 +91,19 @@ public class PassMenuOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exportInFormat(final int which) {
|
private void exportInFormat(final int which) {
|
||||||
final int passFormat;
|
final int passFormat = getPassFormat(which);
|
||||||
|
new PassExportTask(activity, pass.getPath(), App.getShareDir(), "share", true, passFormat).execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PassExporter.PassFormat
|
||||||
|
private int getPassFormat(int which) {
|
||||||
switch (which) {
|
switch (which) {
|
||||||
case 1:
|
case 1:
|
||||||
passFormat = PassExporter.FORMAT_PKPASS;
|
return PassExporter.FORMAT_PKPASS;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
passFormat = PassExporter.FORMAT_OPENPASS;
|
return PassExporter.FORMAT_OPENPASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
new PassExportTask(activity, pass.getPath(), App.getShareDir(), "share", true, passFormat).execute();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue