Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
14
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
6750db18
Commit
6750db18
authored
6 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Add DeX mode detection
parent
c632c2f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+13
-0
13 additions, 0 deletions
vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
with
13 additions
and
0 deletions
vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
+
13
−
0
View file @
6750db18
...
...
@@ -24,6 +24,7 @@ import android.annotation.TargetApi;
import
android.content.ComponentName
;
import
android.content.Context
;
import
android.content.pm.PackageManager
;
import
android.content.res.Configuration
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Build.VERSION_CODES
;
...
...
@@ -228,6 +229,18 @@ public class AndroidDevices {
return
false
;
}
public
static
boolean
isDex
(
Context
ctx
)
{
if
(!
AndroidUtil
.
isNougatOrLater
)
return
false
;
try
{
final
Configuration
config
=
ctx
.
getResources
().
getConfiguration
();
final
Class
configClass
=
config
.
getClass
();
return
configClass
.
getField
(
"SEM_DESKTOP_MODE_ENABLED"
).
getInt
(
configClass
)
==
configClass
.
getField
(
"semDesktopModeEnabled"
).
getInt
(
config
);
}
catch
(
Exception
ignored
)
{
return
false
;
}
}
public
static
class
MediaFolders
{
public
final
static
File
EXTERNAL_PUBLIC_MOVIES_DIRECTORY_FILE
=
Environment
.
getExternalStoragePublicDirectory
(
Environment
.
DIRECTORY_MOVIES
);
public
final
static
File
EXTERNAL_PUBLIC_MUSIC_DIRECTORY_FILE
=
Environment
.
getExternalStoragePublicDirectory
(
Environment
.
DIRECTORY_MUSIC
);
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
047fe044
·
6 years ago
mentioned in commit
047fe044
mentioned in commit 047fe044cc3ff9cc9e8179f58615c48ea9b42ef7
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