summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2020-05-05 13:38:07 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-05 13:38:07 +0000
commit450205e4c6670e2a46bea7112aba79f173ea551e (patch)
treeeba2e33ba30105e38ca9997f6dbe912082d8d10c
parentd4d2427c013ad3032ea376bb6d8a638389022e16 (diff)
parent99f1015e592353226c2d3b55ffcc6b287672af81 (diff)
Merge "Use Buffered reader when loading favorites" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt
index cde258a056db..1bda841d4a63 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsFavoritePersistenceWrapper.kt
@@ -25,6 +25,7 @@ import com.android.systemui.backup.BackupHelper
import libcore.io.IoUtils
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException
+import java.io.BufferedInputStream
import java.io.File
import java.io.FileInputStream
import java.io.FileNotFoundException
@@ -152,7 +153,7 @@ class ControlsFavoritePersistenceWrapper(
return emptyList()
}
val reader = try {
- FileInputStream(file)
+ BufferedInputStream(FileInputStream(file))
} catch (fnfe: FileNotFoundException) {
Log.i(TAG, "No file found")
return emptyList()