Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-Android
Commits
22e966e9
Commit
22e966e9
authored
Jul 24, 2014
by
Edward Wang
Browse files
Util: use -1 as default for consistency and add debug
parent
9f650102
Changes
1
Show whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/libvlc/LibVlcUtil.java
View file @
22e966e9
...
...
@@ -218,18 +218,21 @@ public class LibVlcUtil {
}
}
float
frequency
=
0
.
f
;
float
frequency
=
-
1
;
try
{
FileReader
fileReader
=
new
FileReader
(
"/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
);
BufferedReader
br
=
new
BufferedReader
(
fileReader
);
String
line
=
""
;
try
{
frequency
=
Float
.
parseFloat
(
br
.
readLine
())
/
1000
.
f
;
/* Convert to MHz */
line
=
br
.
readLine
();
frequency
=
Float
.
parseFloat
(
line
)
/
1000
.
f
;
/* Convert to MHz */
}
catch
(
NumberFormatException
e
)
{
/* keep default value of 0.f */
Log
.
w
(
TAG
,
"Could not parse maximum CPU frequency!"
);
Log
.
w
(
TAG
,
"Failed to parse: "
+
line
);
}
fileReader
.
close
();
}
catch
(
IOException
ex
)
{
Log
.
w
(
TAG
,
"Could not find maximum CPU frequency
.
"
);
Log
.
w
(
TAG
,
"Could not find maximum CPU frequency
!
"
);
}
errorMsg
=
null
;
...
...
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