Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
bc5d4f94
Commit
bc5d4f94
authored
May 04, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.21.x'
parents
dedc4b4b
f8468451
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
3 deletions
+49
-3
NEWS
NEWS
+5
-0
AndroidManifest.xml
android/AndroidManifest.xml
+2
-2
build.py
android/build.py
+6
-0
meson.build
android/meson.build
+1
-1
Settings.java
android/src/Settings.java
+35
-0
No files found.
NEWS
View file @
bc5d4f94
...
...
@@ -8,6 +8,11 @@ ver 0.22 (not yet released)
- ffmpeg: new plugin based on FFmpeg's libavfilter library
- hdcd: new plugin based on FFmpeg's "af_hdcd" for HDCD playback
ver 0.21.9 (not yet released)
* Android
- fix crash on ARMv7
- request storage permission on Android 6+
ver 0.21.8 (2019/04/23)
* input
- smbclient: download to buffer instead of throttling transfer
...
...
android/AndroidManifest.xml
View file @
bc5d4f94
...
...
@@ -2,8 +2,8 @@
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"org.musicpd"
android:installLocation=
"auto"
android:versionCode=
"3
0
"
android:versionName=
"0.21.
8
"
>
android:versionCode=
"3
2
"
android:versionName=
"0.21.
9
"
>
<uses-sdk
android:minSdkVersion=
"21"
android:targetSdkVersion=
"26"
/>
...
...
android/build.py
View file @
bc5d4f94
...
...
@@ -138,6 +138,12 @@ class AndroidNdkToolchain:
libstdcxx_ldflags
=
libstdcxx_flags
+
' -L'
+
libcxx_libs_path
libstdcxx_libs
=
'-lc++_static -lc++abi'
if
self
.
is_armv7
:
# On 32 bit ARM, clang generates no ".eh_frame" section;
# instead, the LLVM unwinder library is used for unwinding
# the stack after a C++ exception was thrown
libstdcxx_libs
+=
' -lunwind'
if
use_cxx
:
self
.
cxxflags
+=
' '
+
libstdcxx_cxxflags
self
.
ldflags
+=
' '
+
libstdcxx_ldflags
...
...
android/meson.build
View file @
bc5d4f94
...
...
@@ -6,7 +6,7 @@ android_sdk = get_option('android_sdk')
android_abi = get_option('android_abi')
android_sdk_build_tools_version = '27.0.0'
android_sdk_platform = 'android-2
1
'
android_sdk_platform = 'android-2
3
'
android_build_tools_dir = join_paths(android_sdk, 'build-tools', android_sdk_build_tools_version)
android_sdk_platform_dir = join_paths(android_sdk, 'platforms', android_sdk_platform)
...
...
android/src/Settings.java
View file @
bc5d4f94
...
...
@@ -21,10 +21,12 @@ package org.musicpd;
import
java.util.LinkedList
;
import
android.Manifest
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences.Editor
;
import
android.content.pm.PackageManager
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Message
;
...
...
@@ -178,6 +180,14 @@ public class Settings extends Activity {
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
/* TODO: this sure is the wrong place to request
permissions - it will cause MPD to quit
immediately; we should request permissions when we
need them, but implementing that is complicated, so
for now, we do it here to give users a quick
solution for the problem */
requestAllPermissions
();
setContentView
(
R
.
layout
.
settings
);
mRunButton
=
(
ToggleButton
)
findViewById
(
R
.
id
.
run
);
mRunButton
.
setOnCheckedChangeListener
(
mOnRunChangeListener
);
...
...
@@ -203,6 +213,31 @@ public class Settings extends Activity {
super
.
onCreate
(
savedInstanceState
);
}
private
void
checkRequestPermission
(
String
permission
)
{
if
(
checkSelfPermission
(
permission
)
==
PackageManager
.
PERMISSION_GRANTED
)
return
;
try
{
this
.
requestPermissions
(
new
String
[]{
permission
},
0
);
}
catch
(
Exception
e
)
{
Log
.
e
(
TAG
,
"requestPermissions("
+
permission
+
") failed"
,
e
);
}
}
private
void
requestAllPermissions
()
{
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
<
23
)
/* we don't need to request permissions on
this old Android version */
return
;
/* starting with Android 6.0, we need to explicitly
request all permissions before using them;
mentioning them in the manifest is not enough */
checkRequestPermission
(
Manifest
.
permission
.
READ_EXTERNAL_STORAGE
);
}
private
void
connectClient
()
{
mClient
=
new
Main
.
Client
(
this
,
new
Main
.
Client
.
Callback
()
{
...
...
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