summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/calllog/CallLogFragment.java
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-07-14 15:06:17 -0700
committerSai Cheemalapati <saicheems@google.com>2014-07-15 15:25:43 -0700
commitcee1e65f0c411e35c4521922c3e9def13e01fe64 (patch)
treef1bbb4dcf920738a0c79e2669261a4a2be77b84e /src/com/android/dialer/calllog/CallLogFragment.java
parent434dbcc2f581619f79a691e1a39c5e69003a9d16 (diff)
Added a dialog to confirm caller id reporting.
Database and call log are now updated when user confirms. Bug: 11150383 Change-Id: Iafaca2172f2d44a6edf8514f7d900888dab9cf0e
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogFragment.java')
-rw-r--r--src/com/android/dialer/calllog/CallLogFragment.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java
index 1668895ef..852370566 100644
--- a/src/com/android/dialer/calllog/CallLogFragment.java
+++ b/src/com/android/dialer/calllog/CallLogFragment.java
@@ -20,6 +20,7 @@ import android.animation.Animator;
import android.animation.ValueAnimator;
import android.animation.Animator.AnimatorListener;
import android.app.Activity;
+import android.app.DialogFragment;
import android.app.KeyguardManager;
import android.app.ListFragment;
import android.content.Context;
@@ -65,7 +66,7 @@ import java.util.List;
* (all, missed or voicemails), specify it in the constructor.
*/
public class CallLogFragment extends ListFragment
- implements CallLogQueryHandler.Listener,
+ implements CallLogQueryHandler.Listener, CallLogAdapter.OnReportButtonClickListener,
CallLogAdapter.CallFetcher,
CallLogAdapter.CallItemExpandedListener {
private static final String TAG = "CallLogFragment";
@@ -178,7 +179,6 @@ public class CallLogFragment extends ListFragment
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
-
if (state != null) {
mCallTypeFilter = state.getInt(KEY_FILTER_TYPE, mCallTypeFilter);
mLogLimit = state.getInt(KEY_LOG_LIMIT, mLogLimit);
@@ -187,8 +187,8 @@ public class CallLogFragment extends ListFragment
}
String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity());
- mAdapter = ObjectFactory.newCallLogAdapter(getActivity(), this, new ContactInfoHelper(
- getActivity(), currentCountryIso), this, true);
+ mAdapter = ObjectFactory.newCallLogAdapter(getActivity(), this,
+ new ContactInfoHelper(getActivity(), currentCountryIso), this, this, true);
setListAdapter(mAdapter);
mCallLogQueryHandler = new CallLogQueryHandler(getActivity().getContentResolver(),
this, mLogLimit);
@@ -666,4 +666,17 @@ public class CallLogFragment extends ListFragment
return null;
}
+
+ public void onBadDataReported(String number) {
+ mAdapter.onBadDataReported(number);
+ mAdapter.notifyDataSetChanged();
+ }
+
+ public void onReportButtonClick(String number) {
+ DialogFragment df = ObjectFactory.getReportDialogFragment(number);
+ if (df != null) {
+ df.setTargetFragment(this, 0);
+ df.show(getActivity().getFragmentManager(), "report_dialog");
+ }
+ }
}