summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2020-06-05 11:19:46 (GMT)
committerDanny Baumann <dannybaumann@web.de>2020-06-05 12:36:54 (GMT)
commit8392b6a039d4c123534440b23e82c09f46648756 (patch)
tree89943f64e827cf296ac0a117aa2fc0316e9204f1
parent05afe35d97edac5aeaa3b5792cd44b72481bc67a (diff)
downloadandroid_packages_apps_Dialer-lineage-17.1.zip
android_packages_apps_Dialer-lineage-17.1.tar.gz
android_packages_apps_Dialer-lineage-17.1.tar.bz2
Iterate old recordings properly when migrating call recording data.lineage-17.1
SparseArray.get() expects a key, not an index. Change-Id: I0ba40180dc9df9f8a8f4036ccbe47cc59a50cfbb
-rw-r--r--java/com/android/dialer/callrecord/CallRecordingAutoMigrator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/com/android/dialer/callrecord/CallRecordingAutoMigrator.java b/java/com/android/dialer/callrecord/CallRecordingAutoMigrator.java
index bc29d22..20df88e 100644
--- a/java/com/android/dialer/callrecord/CallRecordingAutoMigrator.java
+++ b/java/com/android/dialer/callrecord/CallRecordingAutoMigrator.java
@@ -84,8 +84,8 @@ public class CallRecordingAutoMigrator {
int id = -1;
long creationTime = System.currentTimeMillis();
for (int i = 0; i < oldRecordingData.size(); i++) {
- if (TextUtils.equals(recording.getName(), oldRecordingData.get(i).fileName)) {
- creationTime = oldRecordingData.get(i).creationTime;
+ if (TextUtils.equals(recording.getName(), oldRecordingData.valueAt(i).fileName)) {
+ creationTime = oldRecordingData.valueAt(i).creationTime;
id = oldRecordingData.keyAt(i);
break;
}