mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Bump android SDK version back up to 26 to avoid 'this app was built for an older version of android and doesn't include the latest privacy protections' message when installing
I also set StrictMode.disableDeathOnFileUriExposure using some disgusting reflection so screenshots can continue to use file:// urls instead of content:// urls
This commit is contained in:
parent
d717c51059
commit
856c7a2f2a
@ -1,12 +1,12 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
compileSdkVersion 26
|
||||
|
||||
defaultConfig {
|
||||
applicationId = 'com.classicube.android.client'
|
||||
minSdkVersion 13
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 26
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DANDROID_STL=c++_static'
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.classicube;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
@ -20,6 +21,7 @@ import android.content.res.Configuration;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.StrictMode;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.Selection;
|
||||
@ -141,6 +143,14 @@ public class MainActivity extends Activity implements SurfaceHolder.Callback2 {
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
// TODO: semaphore for destroyed and surfaceDestroyed
|
||||
|
||||
// avoid FileUriExposed exceptions when taking screenshots
|
||||
try {
|
||||
Method m = StrictMode.class.getMethod("disableDeathOnFileUriExposure");
|
||||
m.invoke(null);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
Log.i("CC_WIN", "handing off to native..");
|
||||
System.loadLibrary("classicube");
|
||||
runGameAsync();
|
||||
|
Loading…
x
Reference in New Issue
Block a user