Skip to content

Commit

Permalink
fixes for repackaging
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Mar 10, 2017
1 parent 685c250 commit e1208b4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

package info.guardianproject.phoneypot;

import me.ziccard.phoneypot.service.MonitorService;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
Expand All @@ -19,6 +18,8 @@
import android.widget.EditText;
import android.widget.Toast;

import info.guardianproject.phoneypot.service.MonitorService;

public class MonitorActivity extends FragmentActivity {

private SecureItPreferences preferences = null;
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/info/guardianproject/phoneypot/Preview.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
import java.util.ArrayList;
import java.util.List;

import me.ziccard.phoneypot.async.MotionAsyncTask;
import me.ziccard.phoneypot.async.MotionAsyncTask.MotionListener;
import me.ziccard.phoneypot.motiondetection.LuminanceMotionDetector;
import me.ziccard.phoneypot.service.MonitorService;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
Expand All @@ -41,6 +37,10 @@
import android.view.WindowManager;
import android.widget.Toast;

import info.guardianproject.phoneypot.async.MotionAsyncTask;
import info.guardianproject.phoneypot.motiondetection.LuminanceMotionDetector;
import info.guardianproject.phoneypot.service.MonitorService;

public class Preview extends SurfaceView implements SurfaceHolder.Callback {

/**
Expand All @@ -49,7 +49,7 @@ public class Preview extends SurfaceView implements SurfaceHolder.Callback {
private SecureItPreferences prefs;
private int cameraFacing = 0;

private List<MotionListener> listeners = new ArrayList<MotionListener>();
private List<MotionAsyncTask.MotionListener> listeners = new ArrayList<MotionAsyncTask.MotionListener>();

/**
* Timestamp of the last picture processed
Expand Down Expand Up @@ -128,7 +128,7 @@ public Preview (Context context) {
}
}

public void addListener(MotionListener listener) {
public void addListener(MotionAsyncTask.MotionListener listener) {
listeners.add(listener);
}

Expand Down Expand Up @@ -248,12 +248,12 @@ public void onPreviewFrame(byte[] data, Camera cam) {
size.height,
updateHandler,
motionSensitivity);
for (MotionListener listener : listeners) {
for (MotionAsyncTask.MotionListener listener : listeners) {
Log.i("Preview", "Added listener");
task.addListener(listener);
}
doingProcessing = true;
task.addListener(new MotionListener() {
task.addListener(new MotionAsyncTask.MotionListener() {

public void onProcess(Bitmap oldBitmap, Bitmap newBitmap,
boolean motionDetected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
package info.guardianproject.phoneypot.async;


import me.ziccard.phoneypot.SecureItPreferences;
import android.content.ContentValues;
import android.content.Context;
import android.media.MediaRecorder;
import android.os.Environment;
import android.provider.MediaStore;
import android.util.Log;

import info.guardianproject.phoneypot.SecureItPreferences;

public class AudioRecorderTask extends Thread {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

import java.io.IOException;

import me.ziccard.phoneypot.codec.AudioCodec;
import android.os.AsyncTask;
import android.util.Log;

import info.guardianproject.phoneypot.codec.AudioCodec;

public class MicSamplerTask extends AsyncTask<Void,Object,Void> {

private MicListener listener = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
import java.util.ArrayList;
import java.util.List;

import me.ziccard.phoneypot.codec.ImageCodec;
import me.ziccard.phoneypot.motiondetection.IMotionDetector;
import me.ziccard.phoneypot.motiondetection.LuminanceMotionDetector;

import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Handler;
import android.util.Log;

import info.guardianproject.phoneypot.codec.ImageCodec;
import info.guardianproject.phoneypot.motiondetection.IMotionDetector;
import info.guardianproject.phoneypot.motiondetection.LuminanceMotionDetector;

/**
* Task doing all image processing in backgrounds,
* has a collection of listeners to notify in after having processed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

package info.guardianproject.phoneypot.service;

import me.ziccard.phoneypot.MonitorActivity;
import me.ziccard.phoneypot.R;
import me.ziccard.phoneypot.SecureItPreferences;

import android.annotation.SuppressLint;
import android.app.Notification;
Expand All @@ -23,6 +20,10 @@
import android.telephony.SmsManager;
import android.widget.Toast;

import info.guardianproject.phoneypot.MonitorActivity;
import info.guardianproject.phoneypot.R;
import info.guardianproject.phoneypot.SecureItPreferences;

@SuppressLint("HandlerLeak")
public class MonitorService extends Service {

Expand Down

0 comments on commit e1208b4

Please sign in to comment.