Skip to content

Commit

Permalink
Closes #4: Do not count an answered call
Browse files Browse the repository at this point in the history
  • Loading branch information
salowenh committed Oct 18, 2019
1 parent f3f8ff3 commit a28b2ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ android {
applicationId "com.lowenhardt.pickup"
minSdkVersion 16
targetSdkVersion 29
versionCode 6
versionName "1.1.3"
versionCode 7
versionName "1.1.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
setProperty("archivesBaseName", "pickup.${versionName}.vc.${versionCode}")
multiDexEnabled = true
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/com/lowenhardt/pickup/CallReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public class CallReceiver extends PhoneCallReceiver {
private static final String TAG = CallReceiver.class.getSimpleName();

@Override
protected void onIncomingCallReceived(Context c, String number, Date start) {
protected void onMissedCall(Context c, String number, Date start) {
Crashlytics.log(Log.DEBUG, TAG,"New Missed Call, number: "+number);
Database db = new Database(c);
List<ContactConfig> contactConfigs = db.getAllContactConfigs(c);
ContactConfig matchingContact = null;
Expand All @@ -36,7 +37,7 @@ protected void onIncomingCallReceived(Context c, String number, Date start) {
return;
}

Crashlytics.log(Log.INFO, TAG, "Incoming phone number matches contact config: "+matchingContact);
Crashlytics.log(Log.INFO, TAG, "Missed call phone number matches contact config: "+matchingContact);

matchingContact.addCall(start);
db.addOrUpdate(matchingContact, c);
Expand Down Expand Up @@ -143,28 +144,27 @@ private boolean isDeviceMuted(Context c) {
}

@Override
protected void onIncomingCallAnswered(Context ctx, String number, Date start) {
protected void onIncomingCallReceived(Context c, String number, Date start) {
//
}

@Override
protected void onIncomingCallEnded(Context ctx, String number, Date start, Date end) {
protected void onIncomingCallAnswered(Context ctx, String number, Date start) {
//
}

@Override
protected void onOutgoingCallStarted(Context ctx, String number, Date start) {
protected void onIncomingCallEnded(Context ctx, String number, Date start, Date end) {
//
}

@Override
protected void onOutgoingCallEnded(Context ctx, String number, Date start, Date end) {
protected void onOutgoingCallStarted(Context ctx, String number, Date start) {
//
}

@Override
protected void onMissedCall(Context ctx, String number, Date start) {
protected void onOutgoingCallEnded(Context ctx, String number, Date start, Date end) {
//
}

}

0 comments on commit a28b2ff

Please sign in to comment.