bump tooling;adapt to new AXT;cleanup;initial repeated-click to send log function

This commit is contained in:
ligi 2014-05-31 10:27:16 +02:00
parent 23490c3f10
commit bf767278d1
6 changed files with 21 additions and 10 deletions

View file

@ -1,8 +1,9 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
@ -94,12 +95,12 @@ dependencies {
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:19.1.0'
compile 'net.lingala.zip4j:zip4j:1.3.2'
compile 'com.android.support:appcompat-v7:19.0.1'
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.jakewharton:butterknife:5.1.0'
compile 'joda-time:joda-time:2.3'
compile 'com.squareup:otto:1.3.4'
compile 'org.ligi:AXT:0.25'
compile 'org.ligi:AXT:0.27'
compile 'org.ligi:tracedroid:1.1'
compile 'com.google.guava:guava:17.0'
compile 'com.squareup.okhttp:okhttp:1.5.4'
@ -119,11 +120,10 @@ dependencies {
testCompile 'com.google.code.gson:gson:2.2.4'
testCompile 'org.ligi:tracedroid:1.1'
testCompile 'org.ligi:AXT:0.25'
testCompile 'org.ligi:AXT:0.27'
testCompile 'com.android.support:support-v4:19.0.1'
testCompile 'com.android.support:appcompat-v7:19.0.1'
def play_services = 'com.google.android.gms:play-services:4.3.23'
withAnalyticsCompile play_services

View file

@ -5,11 +5,11 @@ import android.os.Environment;
public class TicketDefinitions {
public static String getPassesDir(Context ctx) {
public static String getPassesDir(final Context ctx) {
return ctx.getFilesDir().getAbsolutePath() + "/passes";
}
public static String getShareDir(Context ctx) {
public static String getShareDir() {
return Environment.getExternalStorageDirectory() + "/tmp/passbook_share_tmp/";
}
}

View file

@ -14,6 +14,7 @@ import android.widget.TextView;
import com.squareup.otto.Subscribe;
import org.ligi.axt.listeners.RepeatedOnClicksListener;
import org.ligi.passandroid.App;
import org.ligi.passandroid.R;
import org.ligi.passandroid.events.NavigationOpenedEvent;
@ -22,6 +23,7 @@ import org.ligi.passandroid.events.TypeFocusEvent;
import org.ligi.passandroid.helper.CategoryHelper;
import org.ligi.passandroid.model.PassStore;
import org.ligi.passandroid.ui.views.CategoryIndicatorView;
import org.ligi.tracedroid.logging.Log;
import java.util.List;
@ -113,6 +115,15 @@ public class NavigationFragment extends Fragment {
App.getBus().register(this);
dateRadioButton.setOnClickListener(new RepeatedOnClicksListener(7, new View.OnClickListener() {
@Override
public void onClick(View v) {
final Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, Log.getCachedLog());
intent.setType("text/plain");
startActivity(intent);
}
}));
return view;
}

View file

@ -56,7 +56,7 @@ public class PassMenuOptions {
case R.id.menu_share:
Tracker.get().trackEvent("ui_action", "share", "shared", null);
new PassExportTask(activity, passbook.getPath(), TicketDefinitions.getShareDir(activity), "share.pkpass", true).execute();
new PassExportTask(activity, passbook.getPath(), TicketDefinitions.getShareDir(), "share.pkpass", true).execute();
return true;
}
return false;

View file

@ -71,7 +71,7 @@ public class TicketViewActivity extends TicketViewActivityBase {
.setNeutralButton(getString(R.string.send), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
new ExportProblemPassToLigiAndFinishTask(TicketViewActivity.this, passbook.getPath(), TicketDefinitions.getShareDir(TicketViewActivity.this), "share.pkpass").execute();
new ExportProblemPassToLigiAndFinishTask(TicketViewActivity.this, passbook.getPath(), TicketDefinitions.getShareDir(), "share.pkpass").execute();
}
})
.show();

View file

@ -4,7 +4,7 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import org.ligi.axt.helpers.dialog.ActivityFinishingOnClickListener;
import org.ligi.axt.listeners.ActivityFinishingOnClickListener;
import org.ligi.passandroid.R;
import java.io.InputStream;