SDL: updated to Android 6.0 Marshmallow framework
This commit is contained in:
@@ -922,15 +922,17 @@ else
|
|||||||
ln -s -f $SDK_DIR/extras/android/compatibility/v4/android-support-v4.jar project/libs
|
ln -s -f $SDK_DIR/extras/android/compatibility/v4/android-support-v4.jar project/libs
|
||||||
}
|
}
|
||||||
[ -e $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib/build.xml ] || \
|
[ -e $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib/build.xml ] || \
|
||||||
android update project -t android-22 -p $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib
|
android update project -t android-23 -p $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib
|
||||||
[ -e $SDK_DIR/extras/android/compatibility/v7/mediarouter/build.xml ] || { \
|
[ -e $SDK_DIR/extras/android/compatibility/v7/mediarouter/build.xml ] || { \
|
||||||
android update project -t android-22 -p $SDK_DIR/extras/android/compatibility/v7/mediarouter
|
android update project -t android-23 -p $SDK_DIR/extras/android/compatibility/v7/mediarouter
|
||||||
echo 'android.library.reference.1=../../../../../../../../../../../../../../${sdk.dir}/extras/android/compatibility/v7/appcompat' >> $SDK_DIR/extras/android/compatibility/v7/mediarouter/local.properties
|
echo 'android.library.reference.1=../../../../../../../../../../../../../../${sdk.dir}/extras/android/compatibility/v7/appcompat' >> $SDK_DIR/extras/android/compatibility/v7/mediarouter/local.properties
|
||||||
}
|
}
|
||||||
[ -e $SDK_DIR/extras/android/compatibility/v7/appcompat/build.xml ] || \
|
[ -e $SDK_DIR/extras/android/compatibility/v7/appcompat/build.xml ] || \
|
||||||
android update project -t android-22 -p $SDK_DIR/extras/android/compatibility/v7/appcompat
|
android update project -t android-23 -p $SDK_DIR/extras/android/compatibility/v7/appcompat
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ln -s -f $SDK_DIR/platforms/android-23/optional/org.apache.http.legacy.jar project/libs
|
||||||
|
|
||||||
if [ -e project/jni/application/src/project.patch ]; then patch -p1 --no-backup-if-mismatch < project/jni/application/src/project.patch || exit 1 ; fi
|
if [ -e project/jni/application/src/project.patch ]; then patch -p1 --no-backup-if-mismatch < project/jni/application/src/project.patch || exit 1 ; fi
|
||||||
|
|
||||||
echo Cleaning up dependencies
|
echo Cleaning up dependencies
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
/>
|
/>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21"/>
|
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/>
|
||||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
|
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
|
||||||
|
|||||||
@@ -1034,28 +1034,6 @@ public class MainActivity extends Activity
|
|||||||
this.runOnUiThread(cb);
|
this.runOnUiThread(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showTaskbarNotification()
|
|
||||||
{
|
|
||||||
showTaskbarNotification("SDL application paused", "SDL application", "Application is paused, click to activate");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stolen from SDL port by Mamaich
|
|
||||||
public void showTaskbarNotification(String text0, String text1, String text2)
|
|
||||||
{
|
|
||||||
NotificationManager NotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
|
||||||
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
Notification n = new Notification(R.drawable.icon, text0, System.currentTimeMillis());
|
|
||||||
n.setLatestEventInfo(this, text1, text2, pendingIntent);
|
|
||||||
NotificationManager.notify(NOTIFY_ID, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void hideTaskbarNotification()
|
|
||||||
{
|
|
||||||
NotificationManager NotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
||||||
NotificationManager.cancel(NOTIFY_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNewIntent(Intent i)
|
public void onNewIntent(Intent i)
|
||||||
{
|
{
|
||||||
@@ -1396,8 +1374,6 @@ public class MainActivity extends Activity
|
|||||||
|
|
||||||
public FrameLayout getVideoLayout() { return _videoLayout; }
|
public FrameLayout getVideoLayout() { return _videoLayout; }
|
||||||
|
|
||||||
static int NOTIFY_ID = 12367098; // Random ID
|
|
||||||
|
|
||||||
DemoGLSurfaceView mGLView = null;
|
DemoGLSurfaceView mGLView = null;
|
||||||
private static AudioThread mAudioThread = null;
|
private static AudioThread mAudioThread = null;
|
||||||
private static DataDownloader downloader = null;
|
private static DataDownloader downloader = null;
|
||||||
|
|||||||
@@ -376,6 +376,10 @@ abstract class DifferentTouchInput
|
|||||||
if( (buttonStateNew & i) != (buttonState & i) )
|
if( (buttonStateNew & i) != (buttonState & i) )
|
||||||
DemoGLSurfaceView.nativeMouseButtonsPressed(i, ((buttonStateNew & i) == 0) ? 0 : 1);
|
DemoGLSurfaceView.nativeMouseButtonsPressed(i, ((buttonStateNew & i) == 0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
if( (buttonStateNew & MotionEvent.BUTTON_STYLUS_PRIMARY) != (buttonState & MotionEvent.BUTTON_STYLUS_PRIMARY) )
|
||||||
|
DemoGLSurfaceView.nativeMouseButtonsPressed(2, ((buttonStateNew & MotionEvent.BUTTON_STYLUS_PRIMARY) == 0) ? 0 : 1);
|
||||||
|
if( (buttonStateNew & MotionEvent.BUTTON_STYLUS_SECONDARY) != (buttonState & MotionEvent.BUTTON_STYLUS_SECONDARY) )
|
||||||
|
DemoGLSurfaceView.nativeMouseButtonsPressed(4, ((buttonStateNew & MotionEvent.BUTTON_STYLUS_SECONDARY) == 0) ? 0 : 1);
|
||||||
buttonState = buttonStateNew;
|
buttonState = buttonStateNew;
|
||||||
}
|
}
|
||||||
super.process(event);
|
super.process(event);
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ AppName="XServer XSDL"
|
|||||||
AppFullName=x.org.server
|
AppFullName=x.org.server
|
||||||
|
|
||||||
# Application version code (integer)
|
# Application version code (integer)
|
||||||
AppVersionCode=11131
|
AppVersionCode=11132
|
||||||
|
|
||||||
# Application user-visible version name (string)
|
# Application user-visible version name (string)
|
||||||
AppVersionName="1.11.31"
|
AppVersionName="1.11.32"
|
||||||
|
|
||||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||||
@@ -21,7 +21,7 @@ AppVersionName="1.11.31"
|
|||||||
AppDataDownloadUrl="!!Data files|:data.tar.gz:data-1.tgz^!!Data files|:DroidSansMono.ttf:DroidSansMono.ttf^Additional fonts (90Mb)|:xfonts.tar.gz:http://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/xfonts.tgz/download"
|
AppDataDownloadUrl="!!Data files|:data.tar.gz:data-1.tgz^!!Data files|:DroidSansMono.ttf:DroidSansMono.ttf^Additional fonts (90Mb)|:xfonts.tar.gz:http://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/xfonts.tgz/download"
|
||||||
|
|
||||||
# Reset SDL config when updating application to the new version (y) / (n)
|
# Reset SDL config when updating application to the new version (y) / (n)
|
||||||
ResetSdlConfigForThisVersion=y
|
ResetSdlConfigForThisVersion=n
|
||||||
|
|
||||||
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
||||||
DeleteFilesOnUpgrade="%"
|
DeleteFilesOnUpgrade="%"
|
||||||
|
|||||||
@@ -39,3 +39,13 @@
|
|||||||
{
|
{
|
||||||
*;
|
*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-keep class org.apache.http.** { *; }
|
||||||
|
-keep class org.apache.commons.codec.** { *; }
|
||||||
|
-keep class org.apache.commons.logging.** { *; }
|
||||||
|
-keep class android.net.compatibility.** { *; }
|
||||||
|
-keep class android.net.http.** { *; }
|
||||||
|
-dontwarn org.apache.http.**
|
||||||
|
-dontwarn android.webkit.**
|
||||||
|
-dontwarn android.support.v4.app.**
|
||||||
|
-dontwarn com.google.android.gms.**
|
||||||
|
|||||||
@@ -11,4 +11,4 @@
|
|||||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||||
|
|
||||||
# Project target.
|
# Project target.
|
||||||
target=android-22
|
target=android-23
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ Installation
|
|||||||
|
|
||||||
Install latest Android SDK and NDK from http://developer.android.com/index.html
|
Install latest Android SDK and NDK from http://developer.android.com/index.html
|
||||||
You'll need to install Java Ant too. Since for building apk files some java classes are needed as well,
|
You'll need to install Java Ant too. Since for building apk files some java classes are needed as well,
|
||||||
it is recommended to install OpenJDK and its development files. (On RPM based distros
|
it is recommended to install OpenJDK and its development files. (On RPM based distros
|
||||||
usually called java-x.x.x-openjdk and java-x.x.x-openjdk-devel)
|
usually called java-x.x.x-openjdk and java-x.x.x-openjdk-devel)
|
||||||
The application will run on Android 2.3 and above, but will use features from Android 5.1 if available.
|
The application will run on Android 2.3 and above, but will use features from Android 6.0 if available.
|
||||||
The most supported environment for this port is Linux, MacOs should be okay too.
|
The most supported environment for this port is Linux, MacOs should be okay too.
|
||||||
If you're developing under Windows you'd better install Portable Ubuntu, to get proper Linux environment
|
If you're developing under Windows you'd better install Portable Ubuntu, to get proper Linux environment
|
||||||
running inside Windows, then install Linux toolchain on it.
|
running inside Windows, then install Linux toolchain on it.
|
||||||
|
|||||||
Reference in New Issue
Block a user