Protect Pass model from proguard & fix a bug when creating pass when there is no pass yet

This commit is contained in:
ligi 2016-04-05 18:04:08 +02:00
parent 9a54758065
commit 6a608e878c
62 changed files with 149 additions and 158 deletions

View file

@ -108,10 +108,30 @@
-keep public class com.google.android.gms.**
-dontwarn com.google.android.gms.**
##### for otto
## New rules for EventBus 3.0.x ##
# http://greenrobot.org/eventbus/documentation/proguard/
-keepattributes *Annotation*
-keepclassmembers class ** {
@com.squareup.otto.Subscribe public *;
@com.squareup.otto.Produce public *;
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
### for moshi
-keepclassmembers class ** {
@com.squareup.moshi.FromJson *;
@com.squareup.moshi.ToJson *;
}
# Application classes that will be serialized/deserialized via Moshi, keepclassmembers
-keep class org.ligi.passandroid.model.** { *; }
-keepclassmembers class org.ligi.passandroid.model.** { *; }

View file

@ -10,12 +10,12 @@ import java.util.UUID;
import javax.inject.Singleton;
import org.greenrobot.eventbus.EventBus;
import org.ligi.passandroid.injections.FixedPassListPassStore;
import org.ligi.passandroid.model.BarCode;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.Settings;
import org.ligi.passandroid.model.comparator.PassSortOrder;
import org.ligi.passandroid.model.pass.BarCode;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassImpl;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

View file

@ -5,7 +5,7 @@ import android.test.InstrumentationTestCase;
import java.io.File;
import java.io.InputStream;
import org.ligi.passandroid.model.InputStreamWithSource;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.reader.AppleStylePassReader;
import org.ligi.passandroid.ui.UnzipPassController;
import org.mockito.Mock;

View file

@ -2,16 +2,12 @@ package org.ligi.passandroid;
import android.annotation.TargetApi;
import android.test.suitebuilder.annotation.MediumTest;
import com.google.zxing.BarcodeFormat;
import com.squareup.spoon.Spoon;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.ui.PassEditActivity;
import javax.inject.Inject;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.PassImpl;
import org.ligi.passandroid.ui.PassEditActivity;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.clearText;
import static android.support.test.espresso.action.ViewActions.click;

View file

@ -3,14 +3,11 @@ package org.ligi.passandroid;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import org.ligi.passandroid.helper.CategoryHelper;
import org.ligi.passandroid.model.PassDefinitions;
import org.ligi.passandroid.model.PassType;
import java.util.HashSet;
import java.util.Set;
import org.ligi.passandroid.helper.CategoryHelper;
import org.ligi.passandroid.model.PassDefinitions;
import org.ligi.passandroid.model.pass.PassType;
import static org.assertj.core.api.Assertions.assertThat;
public class TheCategoryHelper extends InstrumentationTestCase {

View file

@ -1,14 +1,10 @@
package org.ligi.passandroid;
import android.test.suitebuilder.annotation.MediumTest;
import com.squareup.spoon.Spoon;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.ui.PassListActivity;
import java.util.ArrayList;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.ui.PassListActivity;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;

View file

@ -4,23 +4,17 @@ import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.test.suitebuilder.annotation.MediumTest;
import android.widget.ImageView;
import butterknife.ButterKnife;
import com.google.zxing.BarcodeFormat;
import com.squareup.spoon.Spoon;
import java.util.UUID;
import javax.inject.Inject;
import org.ligi.passandroid.helper.BarcodeDecoder;
import org.ligi.passandroid.model.BarCode;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.BarCode;
import org.ligi.passandroid.model.pass.PassImpl;
import org.ligi.passandroid.ui.FullscreenBarcodeActivity;
import org.ligi.tracedroid.TraceDroid;
import java.util.UUID;
import javax.inject.Inject;
import butterknife.ButterKnife;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;

View file

@ -2,15 +2,11 @@ package org.ligi.passandroid;
import android.annotation.TargetApi;
import android.test.suitebuilder.annotation.MediumTest;
import com.squareup.spoon.Spoon;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.PassType;
import org.ligi.passandroid.ui.PassEditActivity;
import javax.inject.Inject;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.PassType;
import org.ligi.passandroid.ui.PassEditActivity;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.clearText;
import static android.support.test.espresso.action.ViewActions.click;

View file

@ -5,9 +5,9 @@ import android.test.suitebuilder.annotation.MediumTest;
import com.google.zxing.BarcodeFormat;
import java.util.ArrayList;
import javax.inject.Inject;
import org.ligi.passandroid.model.BarCode;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.BarCode;
import org.ligi.passandroid.model.pass.PassImpl;
import org.ligi.passandroid.ui.PassViewActivity;
import org.threeten.bp.ZonedDateTime;
import static android.support.test.espresso.Espresso.onView;
@ -17,7 +17,6 @@ import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.CoreMatchers.not;
@TargetApi(14)
public class ThePassViewActivity extends BaseIntegration<PassViewActivity> {

View file

@ -1,9 +1,7 @@
package org.ligi.passandroid;
import android.test.suitebuilder.annotation.SmallTest;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.pass.Pass;
import static org.assertj.core.api.Assertions.assertThat;
public class TheQuirkCorrector extends TheAppleStyleBarcodeReaderBase {

View file

@ -1,8 +1,8 @@
package org.ligi.passandroid.injections
import org.ligi.passandroid.model.Pass
import org.ligi.passandroid.model.PassClassifier
import org.ligi.passandroid.model.PassStore
import org.ligi.passandroid.model.pass.Pass
import java.io.File
import java.util.*

View file

@ -7,9 +7,8 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.provider.CalendarContract;
import android.support.design.widget.Snackbar;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.pass.Pass;
import org.threeten.bp.ZonedDateTime;
public class AddToCalendar {

View file

@ -1,6 +1,6 @@
package org.ligi.passandroid.events;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.pass.Pass;
public class PassRefreshEvent {
public final Pass pass;

View file

@ -1,5 +1,5 @@
package org.ligi.passandroid.events
import org.ligi.passandroid.model.Pass
import org.ligi.passandroid.model.pass.Pass
class ScanFinishedEvent(val foundPasses: List<Pass>)

View file

@ -1,9 +1,8 @@
package org.ligi.passandroid.helper;
import android.graphics.Color;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.PassType;
import org.ligi.passandroid.model.pass.PassType;
public class CategoryHelper {

View file

@ -4,8 +4,8 @@ import android.app.Activity;
import android.support.design.widget.Snackbar;
import android.view.View;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassClassifier;
import org.ligi.passandroid.model.pass.Pass;
public class MoveHelper {
public static void moveWithUndoSnackbar(final PassClassifier passClassifier, final Pass pass, String topic, final Activity activity) {

View file

@ -1,9 +1,9 @@
package org.ligi.passandroid.helper;
import java.util.UUID;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassType;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassImpl;
import org.ligi.passandroid.model.pass.PassType;
public class PassUtil {

View file

@ -1,11 +1,9 @@
package org.ligi.passandroid.json_adapter;
import android.graphics.Color;
import com.squareup.moshi.FromJson;
import com.squareup.moshi.ToJson;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.pass.PassImpl;
public class ColorAdapter {
@ToJson

View file

@ -6,6 +6,8 @@ import okio.Okio
import org.greenrobot.eventbus.EventBus
import org.ligi.axt.AXT
import org.ligi.passandroid.events.PassStoreChangeEvent
import org.ligi.passandroid.model.pass.Pass
import org.ligi.passandroid.model.pass.PassImpl
import org.ligi.passandroid.reader.AppleStylePassReader
import org.ligi.passandroid.reader.PassReader
import java.io.File

View file

@ -2,6 +2,8 @@ package org.ligi.passandroid.model
import org.ligi.passandroid.App
import org.ligi.passandroid.helper.Strings
import org.ligi.passandroid.model.pass.PassField
import org.ligi.passandroid.model.pass.PassImpl
object ApplePassbookQuirkCorrector {

View file

@ -1,5 +1,7 @@
package org.ligi.passandroid.model
import org.ligi.passandroid.model.pass.Pass
open class PassClassifier(val topicByIdMap: MutableMap<String, String>, private val passStore: PassStore) {
open fun processDataChange() {

View file

@ -1,6 +1,7 @@
package org.ligi.passandroid.model
import org.ligi.passandroid.model.PassType.*
import org.ligi.passandroid.model.pass.PassType
import org.ligi.passandroid.model.pass.PassType.*
object PassDefinitions {

View file

@ -1,5 +1,6 @@
package org.ligi.passandroid.model
import org.ligi.passandroid.model.pass.Pass
import java.io.File
interface PassStore {
@ -14,7 +15,7 @@ interface PassStore {
fun getPathForID(id: String): File
val passMap: Map<String,Pass>
val passMap: Map<String, Pass>
var currentPass: Pass?

View file

@ -1,6 +1,7 @@
package org.ligi.passandroid.model
import org.ligi.passandroid.model.comparator.PassSortOrder
import org.ligi.passandroid.model.pass.Pass
import java.util.*
class PassStoreProjection(private val passStore: PassStore, val topic: String, private val passSortOrder: PassSortOrder? = null) {

View file

@ -1,8 +1,7 @@
package org.ligi.passandroid.model.comparator;
import org.ligi.passandroid.model.Pass;
import java.util.Comparator;
import org.ligi.passandroid.model.pass.Pass;
public class PassByTimeComparator implements Comparator<Pass> {

View file

@ -1,9 +1,7 @@
package org.ligi.passandroid.model.comparator;
import org.ligi.passandroid.model.Pass;
import java.util.Comparator;
import org.ligi.passandroid.model.pass.Pass;
import static org.ligi.passandroid.model.comparator.PassByTimeComparator.DIRECTION_ASC;
public class PassByTypeFirstAndTimeSecondComparator implements Comparator<Pass> {

View file

@ -1,8 +1,7 @@
package org.ligi.passandroid.model.comparator;
import org.ligi.passandroid.model.Pass;
import java.util.Comparator;
import org.ligi.passandroid.model.pass.Pass;
public enum PassSortOrder {
DATE_DESC(-1),

View file

@ -1,4 +1,4 @@
package org.ligi.passandroid.model
package org.ligi.passandroid.model.pass
import android.content.res.Resources
import android.graphics.drawable.BitmapDrawable

View file

@ -1,8 +1,9 @@
package org.ligi.passandroid.model
package org.ligi.passandroid.model.pass
import android.graphics.Bitmap
import android.support.annotation.StringDef
import org.ligi.passandroid.model.PassBitmapDefinitions.*
import org.ligi.passandroid.model.PassStore
interface Pass {

View file

@ -1,4 +1,4 @@
package org.ligi.passandroid.model
package org.ligi.passandroid.model.pass
class PassField(var key: String?, var label: String?, var value: String?,var hide:Boolean) {

View file

@ -1,9 +1,10 @@
package org.ligi.passandroid.model
package org.ligi.passandroid.model.pass
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import com.squareup.moshi.JsonQualifier
import org.ligi.axt.AXT
import org.ligi.passandroid.model.PassStore
import org.ligi.tracedroid.logging.Log
import org.threeten.bp.ZonedDateTime
import java.io.File
@ -62,7 +63,7 @@ class PassImpl(override val id: String) : Pass {
override fun getBitmap(passStore: PassStore, @Pass.PassBitmap passBitmap: String): Bitmap? {
try {
val file = File(passStore.getPathForID(id), passBitmap + PassImpl.FILETYPE_IMAGES)
val file = File(passStore.getPathForID(id), passBitmap + FILETYPE_IMAGES)
return BitmapFactory.decodeStream(FileInputStream(file))
} catch (expectedInSomeCases_willJustReturnNull: FileNotFoundException) {
return null

View file

@ -1,4 +1,4 @@
package org.ligi.passandroid.model;
package org.ligi.passandroid.model.pass;
public class PassLocation {

View file

@ -1,4 +1,4 @@
package org.ligi.passandroid.model;
package org.ligi.passandroid.model.pass;
public enum PassType {
GENERIC,

View file

@ -7,7 +7,11 @@ import org.json.JSONObject
import org.ligi.axt.AXT
import org.ligi.passandroid.App
import org.ligi.passandroid.helper.SafeJSONReader
import org.ligi.passandroid.model.*
import org.ligi.passandroid.model.ApplePassbookQuirkCorrector
import org.ligi.passandroid.model.AppleStylePassTranslation
import org.ligi.passandroid.model.PassBitmapDefinitions
import org.ligi.passandroid.model.PassDefinitions
import org.ligi.passandroid.model.pass.*
import org.ligi.tracedroid.logging.Log
import org.threeten.bp.DateTimeException
import org.threeten.bp.ZonedDateTime

View file

@ -3,10 +3,10 @@ package org.ligi.passandroid.reader
import android.graphics.Color
import org.ligi.axt.AXT
import org.ligi.passandroid.helper.SafeJSONReader
import org.ligi.passandroid.model.BarCode
import org.ligi.passandroid.model.Pass
import org.ligi.passandroid.model.PassDefinitions
import org.ligi.passandroid.model.PassImpl
import org.ligi.passandroid.model.pass.BarCode
import org.ligi.passandroid.model.pass.Pass
import org.ligi.passandroid.model.pass.PassImpl
import org.ligi.tracedroid.logging.Log
import org.threeten.bp.ZonedDateTime
import java.io.File

View file

@ -4,9 +4,8 @@ import android.content.res.Resources;
import android.graphics.drawable.BitmapDrawable;
import android.os.AsyncTask;
import android.widget.ImageView;
import org.ligi.passandroid.helper.BarcodeHelper;
import org.ligi.passandroid.model.BarCode;
import org.ligi.passandroid.model.pass.BarCode;
public class AsyncSetBarCodeImageTask extends AsyncTask<BarCode, Void, BitmapDrawable> {

View file

@ -10,8 +10,8 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import org.ligi.passandroid.R;
import org.ligi.passandroid.helper.MoveHelper;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.Pass;
class MoveToNewTopicUI {

View file

@ -6,16 +6,13 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AlertDialog;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassLocation;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.List;
import javax.annotation.Nonnull;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassLocation;
public class NavigateToLocationsDialog {

View file

@ -14,10 +14,10 @@ import javax.inject.Inject;
import org.ligi.axt.AXT;
import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.PassStoreProjection;
import org.ligi.passandroid.model.Settings;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.ui.pass_view_holder.CondensedPassViewHolder;
import org.ligi.passandroid.ui.pass_view_holder.PassViewHolder;
import org.ligi.passandroid.ui.pass_view_holder.VerbosePassViewHolder;

View file

@ -18,10 +18,10 @@ import org.ligi.axt.AXT;
import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.events.PassRefreshEvent;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.Settings;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassImpl;
import org.ligi.passandroid.ui.edit_fragments.BarcodeEditFragment;
import org.ligi.passandroid.ui.edit_fragments.CategoryPickFragment;
import org.ligi.passandroid.ui.edit_fragments.ColorPickFragment;

View file

@ -12,8 +12,8 @@ import org.ligi.axt.AXT;
import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.InputStreamWithSource;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.Pass;
public class PassImportActivity extends AppCompatActivity {

View file

@ -40,9 +40,9 @@ import org.ligi.passandroid.events.PassStoreChangeEvent;
import org.ligi.passandroid.events.ScanFinishedEvent;
import org.ligi.passandroid.events.ScanProgressEvent;
import org.ligi.passandroid.helper.PassUtil;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassClassifier;
import org.ligi.passandroid.model.PassStoreProjection;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.snackengage.SnackEngage;
import org.ligi.snackengage.snacks.DefaultRateSnack;
import org.ligi.tracedroid.TraceDroid;
@ -82,7 +82,15 @@ public class PassListActivity extends PassAndroidActivity {
passStore.save(pass);
floatingActionsMenu.collapse();
AXT.at(this).startCommonIntent().activityFromClass(PassEditActivity.class);
passStore.getClassifier().moveToTopic(pass, adapter.getPageTitle(tabLayout.getSelectedTabPosition()).toString());
final String newTitle;
if (tabLayout.getSelectedTabPosition() < 0) {
newTitle = getString(R.string.topic_new);
} else {
newTitle = adapter.getPageTitle(tabLayout.getSelectedTabPosition()).toString();
}
passStore.getClassifier().moveToTopic(pass, newTitle);
}
@Subscribe(threadMode = ThreadMode.MAIN)
@ -267,7 +275,8 @@ public class PassListActivity extends PassAndroidActivity {
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
menu.findItem(R.id.menu_emptytrash).setVisible((adapter.getCount()>0) && adapter.getPageTitle(viewPager.getCurrentItem()).equals(getString(R.string.topic_trash)));
menu.findItem(R.id.menu_emptytrash)
.setVisible((adapter.getCount() > 0) && adapter.getPageTitle(viewPager.getCurrentItem()).equals(getString(R.string.topic_trash)));
return true;
}

View file

@ -20,10 +20,10 @@ import org.ligi.passandroid.R;
import org.ligi.passandroid.events.PassStoreChangeEvent;
import org.ligi.passandroid.events.ScanFinishedEvent;
import org.ligi.passandroid.helper.MoveHelper;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.PassStoreProjection;
import org.ligi.passandroid.model.Settings;
import org.ligi.passandroid.model.pass.Pass;
import static android.support.v7.widget.helper.ItemTouchHelper.LEFT;
import static android.support.v7.widget.helper.ItemTouchHelper.RIGHT;
import static android.support.v7.widget.helper.ItemTouchHelper.SimpleCallback;

View file

@ -15,9 +15,9 @@ import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.Tracker;
import org.ligi.passandroid.maps.PassbookMapsFacade;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.Settings;
import org.ligi.passandroid.model.pass.Pass;
public class PassMenuOptions {

View file

@ -27,9 +27,9 @@ import org.ligi.axt.AXT;
import org.ligi.passandroid.R;
import org.ligi.passandroid.helper.BarcodeHelper;
import org.ligi.passandroid.maps.PassbookMapsFacade;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassBitmapDefinitions;
import org.ligi.passandroid.model.PassField;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassField;
import org.ligi.passandroid.ui.pass_view_holder.PassViewHolder;
import org.ligi.passandroid.ui.pass_view_holder.VerbosePassViewHolder;

View file

@ -20,8 +20,8 @@ import javax.inject.Inject;
import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.InputStreamWithSource;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.Settings;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.ui.UnzipPassController.InputStreamUnzipControllerSpec;
public class PassViewActivityBase extends PassAndroidActivity {

View file

@ -21,9 +21,9 @@ import org.ligi.passandroid.Tracker;
import org.ligi.passandroid.events.ScanFinishedEvent;
import org.ligi.passandroid.events.ScanProgressEvent;
import org.ligi.passandroid.model.InputStreamWithSource;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.PastLocationsStore;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.tracedroid.logging.Log;
import static org.ligi.passandroid.ui.UnzipPassController.InputStreamUnzipControllerSpec;

View file

@ -7,9 +7,9 @@ import android.content.Intent
import android.graphics.Bitmap
import android.support.v4.app.NotificationCompat
import org.ligi.passandroid.R
import org.ligi.passandroid.model.Pass
import org.ligi.passandroid.model.PassBitmapDefinitions
import org.ligi.passandroid.model.PassStore
import org.ligi.passandroid.model.pass.Pass
import java.io.File
internal class SearchSuccessCallback(private val context: Context, private val passStore: PassStore, private val foundList: MutableList<Pass>, private val findNotificationBuilder: NotificationCompat.Builder, private val file: File, private val notifyManager: NotificationManager) : UnzipPassController.SuccessCallback {

View file

@ -11,22 +11,17 @@ import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.google.zxing.BarcodeFormat;
import org.ligi.axt.simplifications.SimpleTextWatcher;
import org.ligi.passandroid.R;
import org.ligi.passandroid.helper.Strings;
import org.ligi.passandroid.model.BarCode;
import org.ligi.passandroid.ui.AsyncSetBarCodeImageTask;
import java.util.Collections;
import java.util.UUID;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.google.zxing.BarcodeFormat;
import java.util.Collections;
import java.util.UUID;
import org.ligi.axt.simplifications.SimpleTextWatcher;
import org.ligi.passandroid.R;
import org.ligi.passandroid.helper.Strings;
import org.ligi.passandroid.model.pass.BarCode;
import org.ligi.passandroid.ui.AsyncSetBarCodeImageTask;
import static android.text.TextUtils.isEmpty;
public class BarcodeEditFragment extends PassandroidFragment {

View file

@ -15,9 +15,9 @@ import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.events.PassRefreshEvent;
import org.ligi.passandroid.helper.CategoryHelper;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.PassType;
import org.ligi.passandroid.model.pass.PassImpl;
import org.ligi.passandroid.model.pass.PassType;
import org.ligi.passandroid.ui.views.CategoryIndicatorView;
public class CategoryPickFragment extends ListFragment {

View file

@ -16,7 +16,7 @@ import butterknife.OnClick;
import java.util.List;
import org.ligi.axt.simplifications.SimpleTextWatcher;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.PassField;
import org.ligi.passandroid.model.pass.PassField;
public class FieldsEditFragment extends PassandroidFragment {

View file

@ -23,7 +23,7 @@ import org.ligi.axt.AXT;
import org.ligi.passandroid.R;
import org.ligi.passandroid.events.PassRefreshEvent;
import org.ligi.passandroid.helper.Files;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.pass.PassImpl;
import static android.app.Activity.RESULT_OK;
public class ImageEditFragment extends PassandroidFragment {

View file

@ -11,16 +11,14 @@ import android.view.ViewGroup;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TimePicker;
import org.ligi.axt.simplifications.SimpleTextWatcher;
import org.ligi.passandroid.R;
import org.ligi.passandroid.events.PassRefreshEvent;
import org.ligi.passandroid.model.PassImpl;
import org.threeten.bp.ZonedDateTime;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import org.ligi.axt.simplifications.SimpleTextWatcher;
import org.ligi.passandroid.R;
import org.ligi.passandroid.events.PassRefreshEvent;
import org.ligi.passandroid.model.pass.PassImpl;
import org.threeten.bp.ZonedDateTime;
public class MetaDataFragment extends PassandroidFragment implements TimePickerDialog.OnTimeSetListener, DatePickerDialog.OnDateSetListener {

View file

@ -4,8 +4,8 @@ import android.support.v4.app.Fragment;
import javax.inject.Inject;
import org.greenrobot.eventbus.EventBus;
import org.ligi.passandroid.App;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.PassImpl;
public class PassandroidFragment extends Fragment {

View file

@ -2,8 +2,8 @@ package org.ligi.passandroid.ui.pass_view_holder;
import android.app.Activity;
import android.view.View;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.Pass;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;

View file

@ -16,10 +16,10 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import org.ligi.passandroid.R;
import org.ligi.passandroid.actions.AddToCalendar;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassBitmapDefinitions;
import org.ligi.passandroid.model.PassField;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassField;
import org.ligi.passandroid.ui.NavigateToLocationsDialog;
import org.ligi.passandroid.ui.Visibility;
import org.ligi.passandroid.ui.views.CategoryIndicatorView;

View file

@ -2,8 +2,8 @@ package org.ligi.passandroid.ui.pass_view_holder;
import android.app.Activity;
import android.view.View;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.Pass;
import static android.view.View.GONE;
public class VerbosePassViewHolder extends PassViewHolder {

View file

@ -6,12 +6,10 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import butterknife.ButterKnife;
import org.ligi.passandroid.R;
import org.ligi.passandroid.helper.CategoryHelper;
import org.ligi.passandroid.model.PassType;
import butterknife.ButterKnife;
import org.ligi.passandroid.model.pass.PassType;
public class CategoryIndicatorView extends LinearLayout {

View file

@ -1,8 +1,7 @@
package org.ligi.passandroid.maps;
import android.content.Context;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.pass.Pass;
public class PassbookMapsFacade {

View file

@ -1,13 +1,11 @@
package org.ligi.passandroid.unittest;
import org.junit.Test;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.PassClassifier;
import org.ligi.passandroid.model.PassImpl;
import org.ligi.passandroid.model.PassStore;
import java.util.HashMap;
import org.junit.Test;
import org.ligi.passandroid.model.PassClassifier;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.model.pass.Pass;
import org.ligi.passandroid.model.pass.PassImpl;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;

View file

@ -7,7 +7,6 @@ import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
@ -16,12 +15,10 @@ import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;
import org.ligi.axt.AXT;
import org.ligi.passandroid.model.PassLocation;
import org.ligi.passandroid.ui.PassViewActivityBase;
import java.util.List;
import org.ligi.axt.AXT;
import org.ligi.passandroid.model.pass.PassLocation;
import org.ligi.passandroid.ui.PassViewActivityBase;
public class LocationsMapFragment extends SupportMapFragment {
private PassViewActivityBase base_activity;

View file

@ -4,15 +4,13 @@ package org.ligi.passandroid.maps;
import android.content.Context;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import org.ligi.axt.AXT;
import org.ligi.passandroid.FullscreenMapActivity;
import org.ligi.passandroid.LocationsMapFragment;
import org.ligi.passandroid.R;
import org.ligi.passandroid.model.Pass;
import org.ligi.passandroid.model.pass.Pass;
public class PassbookMapsFacade {