Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
3b4e2d0a
Commit
3b4e2d0a
authored
Apr 08, 2015
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use larger cache on Android 3+ devices
parent
57c5ff8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vlc-android/src/org/videolan/vlc/util/BitmapCache.java
vlc-android/src/org/videolan/vlc/util/BitmapCache.java
+4
-2
No files found.
vlc-android/src/org/videolan/vlc/util/BitmapCache.java
View file @
3b4e2d0a
...
...
@@ -20,6 +20,7 @@
package
org.videolan.vlc.util
;
import
org.videolan.libvlc.LibVlcUtil
;
import
org.videolan.vlc.VLCApplication
;
import
android.app.ActivityManager
;
...
...
@@ -51,8 +52,9 @@ public class BitmapCache {
// Get memory class of this device, exceeding this amount will throw an
// OutOfMemory exception.
final
int
memClass
=
((
ActivityManager
)
context
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
)).
getMemoryClass
();
final
ActivityManager
am
=
((
ActivityManager
)
context
.
getSystemService
(
Context
.
ACTIVITY_SERVICE
));
final
int
memClass
=
LibVlcUtil
.
isHoneycombOrLater
()
?
am
.
getLargeMemoryClass
()
:
am
.
getMemoryClass
();
// Use 1/5th of the available memory for this memory cache.
final
int
cacheSize
=
1024
*
1024
*
memClass
/
5
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment