diff --git a/changeAppSettings.sh b/changeAppSettings.sh index bfa314bdd..939df2763 100755 --- a/changeAppSettings.sh +++ b/changeAppSettings.sh @@ -922,15 +922,17 @@ else 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 ] || \ - 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 ] || { \ - 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 } [ -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 +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 echo Cleaning up dependencies diff --git a/project/AndroidManifestTemplate.xml b/project/AndroidManifestTemplate.xml index 3f704ce62..3f5601df0 100644 --- a/project/AndroidManifestTemplate.xml +++ b/project/AndroidManifestTemplate.xml @@ -40,7 +40,7 @@ /> - + diff --git a/project/java/MainActivity.java b/project/java/MainActivity.java index 1cf4ac684..ddde7b8d0 100644 --- a/project/java/MainActivity.java +++ b/project/java/MainActivity.java @@ -1034,28 +1034,6 @@ public class MainActivity extends Activity 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 public void onNewIntent(Intent i) { @@ -1396,8 +1374,6 @@ public class MainActivity extends Activity public FrameLayout getVideoLayout() { return _videoLayout; } - static int NOTIFY_ID = 12367098; // Random ID - DemoGLSurfaceView mGLView = null; private static AudioThread mAudioThread = null; private static DataDownloader downloader = null; diff --git a/project/java/Video.java b/project/java/Video.java index e4f19a965..eb5e1cf0c 100644 --- a/project/java/Video.java +++ b/project/java/Video.java @@ -376,6 +376,10 @@ abstract class DifferentTouchInput if( (buttonStateNew & i) != (buttonState & i) ) 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; } super.process(event); diff --git a/project/jni/application/xserver/AndroidAppSettings.cfg b/project/jni/application/xserver/AndroidAppSettings.cfg index 13e7aae1e..e70b7850d 100644 --- a/project/jni/application/xserver/AndroidAppSettings.cfg +++ b/project/jni/application/xserver/AndroidAppSettings.cfg @@ -7,10 +7,10 @@ AppName="XServer XSDL" AppFullName=x.org.server # Application version code (integer) -AppVersionCode=11131 +AppVersionCode=11132 # 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^...' # 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" # 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) DeleteFilesOnUpgrade="%" diff --git a/project/proguard.cfg b/project/proguard.cfg index ce2ed6afe..04bc836d6 100644 --- a/project/proguard.cfg +++ b/project/proguard.cfg @@ -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.** diff --git a/project/project.properties b/project/project.properties index 00cf62bac..916037e33 100644 --- a/project/project.properties +++ b/project/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-22 +target=android-23 diff --git a/readme.txt b/readme.txt index 2a5f4ac79..0130364c3 100644 --- a/readme.txt +++ b/readme.txt @@ -12,9 +12,9 @@ Installation 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, -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) -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. 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.