Skip to content

Commit 4c79c05

Browse files
committed
Clean up unused cruft.
1 parent 5e512e6 commit 4c79c05

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

TeleCorder/src/com/darwinsys/telecorder/MainActivity.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package com.darwinsys.telecorder;
22

33
import android.app.Activity;
4-
import android.app.admin.DevicePolicyManager;
5-
import android.content.ComponentName;
6-
import android.content.Context;
74
import android.content.Intent;
85
import android.os.Bundle;
96
import android.util.Log;
@@ -12,15 +9,12 @@
129
* This might mutate into a usable call recorder, when:
1310
* (a) it works, and
1411
* (b) somebody adds call-started, call-ended broadcast receiver
15-
* This version was borrowed from "Pratt"'s answer at
12+
* This version uses some code from "Pratt"'s answer at
1613
* http://stackoverflow.com/questions/18887636/how-to-record-phone-calls-in-android/21331756#21331756
1714
* @author Ian Darwin
1815
*/
1916
public class MainActivity extends Activity {
2017
private final static String TAG = TeleService.class.getSimpleName();
21-
private static final int REQUEST_CODE = 0;
22-
private DevicePolicyManager mDPM;
23-
private ComponentName mAdminName;
2418

2519
@Override
2620
public void onCreate(Bundle savedInstanceState) {
@@ -38,6 +32,5 @@ private void startTeleService() {
3832
Intent intent = new Intent(MainActivity.this, TeleService.class);
3933
startService(intent);
4034
}
41-
4235
}
4336

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
package com.darwinsys.telecorder;
22

3-
import java.io.File;
4-
53
import android.app.Service;
64
import android.content.BroadcastReceiver;
75
import android.content.Intent;
86
import android.content.IntentFilter;
9-
import android.media.MediaRecorder;
107
import android.os.IBinder;
118
import android.util.Log;
129
import android.widget.Toast;
1310

1411
public class TeleService extends Service {
1512
private final static String TAG = TeleService.class.getSimpleName();
1613

17-
private MediaRecorder recorder;
18-
private File audiofile;
19-
public String Audio_Type;
20-
private boolean recording = false;
21-
2214
private BroadcastReceiver callReceiver;
2315

2416
public TeleService() {
25-
Log.d(TAG, "TeleService::init()");
17+
Log.d(TAG, "TeleService::init()");
2618
}
2719

2820
@Override
@@ -33,8 +25,8 @@ public IBinder onBind(Intent arg0) {
3325

3426
@Override
3527
public int onStartCommand(Intent intent, int flags, int startId) {
36-
Log.d(TAG, "TeleService.onStartCommand()");
37-
Toast.makeText(this, "Hello from onStartCommand", Toast.LENGTH_SHORT).show();
28+
Log.d(TAG, "TeleService.onStartCommand()");
29+
Toast.makeText(this, "Hello from onStartCommand", Toast.LENGTH_SHORT).show();
3830
final IntentFilter filter = new IntentFilter();
3931
filter.addAction(Intent.ACTION_NEW_OUTGOING_CALL);
4032
filter.addAction("android.intent.action.PHONE_STATE");
@@ -43,6 +35,4 @@ public int onStartCommand(Intent intent, int flags, int startId) {
4335

4436
return START_NOT_STICKY;
4537
}
46-
47-
4838
}

0 commit comments

Comments
 (0)