Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
533
Issue boards
Milestones
Wiki
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
2f602fbf
Commit
2f602fbf
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Prevent potential NPE at app initialization
parent
c3502e93
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
+2
-2
2 additions, 2 deletions
vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
with
2 additions
and
2 deletions
vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
+
2
−
2
View file @
2f602fbf
...
...
@@ -103,8 +103,8 @@ public class AndroidDevices {
isChromeBook
=
pm
!=
null
&&
pm
.
hasSystemFeature
(
"org.chromium.arc.device_management"
);
hasPlayServices
=
pm
==
null
||
hasPlayServices
(
pm
);
hasPiP
=
AndroidUtil
.
isOOrLater
||
AndroidUtil
.
isNougatOrLater
&&
isAndroidTv
;
isPhone
=
ctx
=
=
null
||
((
TelephonyManager
)
ctx
.
getSystemService
(
Context
.
TELEPHONY_SERVICE
))
.
getPhoneType
()
!=
TelephonyManager
.
PHONE_TYPE_NONE
;
final
TelephonyManager
tm
=
ctx
!
=
null
?
((
TelephonyManager
)
ctx
.
getSystemService
(
Context
.
TELEPHONY_SERVICE
))
:
null
;
isPhone
=
tm
==
null
||
tm
.
getPhoneType
()
!=
TelephonyManager
.
PHONE_TYPE_NONE
;
// hasCombBar test if device has Combined Bar : only for tablet with Honeycomb or ICS
hasCombBar
=
!
AndroidDevices
.
isPhone
&&
AndroidUtil
.
isHoneycombOrLater
&&
!
AndroidUtil
.
isJellyBeanMR1OrLater
;
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
f3f31670
·
7 years ago
mentioned in commit
f3f31670
mentioned in commit f3f316702d555674315d6bd7f205c2cfd0010b80
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment