Nicer access of PassFormat
This commit is contained in:
parent
de2ec23ac2
commit
3efed3e588
1 changed files with 7 additions and 6 deletions
|
@ -91,19 +91,20 @@ public class PassMenuOptions {
|
|||
}
|
||||
|
||||
private void exportInFormat(final int which) {
|
||||
final int passFormat;
|
||||
|
||||
switch (which) {
|
||||
case 1:
|
||||
passFormat = PassExporter.FORMAT_PKPASS;
|
||||
break;
|
||||
|
||||
default:
|
||||
passFormat = PassExporter.FORMAT_OPENPASS;
|
||||
}
|
||||
|
||||
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) {
|
||||
case 1:
|
||||
return PassExporter.FORMAT_PKPASS;
|
||||
|
||||
default:
|
||||
return PassExporter.FORMAT_OPENPASS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue