diff options
author | Anthony Lee <anthonylee@google.com> | 2014-09-30 15:55:31 -0700 |
---|---|---|
committer | Anthony Lee <anthonylee@google.com> | 2014-10-01 21:27:19 -0700 |
commit | 55733814f213809baaa8eaa8984ff026bdb08b4e (patch) | |
tree | 66976c709ec9b3706254fd60fc8ea9384cd4ba19 /src/com/android/dialer/calllog/CallLogAdapter.java | |
parent | 56493453580bb0db9a7ebd90b3c9868c8e3a8a59 (diff) | |
download | android_packages_apps_Dialer-55733814f213809baaa8eaa8984ff026bdb08b4e.tar.gz android_packages_apps_Dialer-55733814f213809baaa8eaa8984ff026bdb08b4e.tar.bz2 android_packages_apps_Dialer-55733814f213809baaa8eaa8984ff026bdb08b4e.zip |
Fix HTTP request to a report bad caller ID entry in the call log (1/2)
A few things needed to change to fix this bug.
1. Add object ID to ContactInfo and make sure that it is persisted
2. Adding a new row means migration from older versions of DBs
3. Fix logic that determines if we can report a given call log entry since
the strategy of using isExternal() is not valid. UI impact.
4. Fix the HTTP request that is generated to include a valid object ID
intead of using the source ID.
Bug: 17692726
Change-Id: If541fea963837118b7466b6c59f453103cdbdc4a
Diffstat (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index b585b89c1..dcd2de3c0 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -758,7 +758,11 @@ public class CallLogAdapter extends GroupingListAdapter final PhoneCallDetails details; views.reported = info.isBadData; - views.isExternal = mContactInfoHelper.isExternal(info.sourceType); + + // The entry can only be reported as invalid if it has a valid ID and the source of the + // entry supports marking entries as invalid. + views.canBeReportedAsInvalid = mContactInfoHelper.canReportAsInvalid(info.sourceType, + info.objectId); // Restore expansion state of the row on rebind. Inflate the actions ViewStub if required, // and set its visibility state accordingly. @@ -1023,7 +1027,7 @@ public class CallLogAdapter extends GroupingListAdapter views.rowId, views.callIds, null) ); - if (views.isExternal && !views.reported) { + if (views.canBeReportedAsInvalid && !views.reported) { views.reportButtonView.setVisibility(View.VISIBLE); } else { views.reportButtonView.setVisibility(View.GONE); |