diff options
Diffstat (limited to 'platform/android')
7 files changed, 19 insertions, 72 deletions
diff --git a/platform/android/AndroidManifest.xml.template b/platform/android/AndroidManifest.xml.template index 3e42b7a3cd..13d10b5026 100644 --- a/platform/android/AndroidManifest.xml.template +++ b/platform/android/AndroidManifest.xml.template @@ -201,6 +201,6 @@ $$ADD_PERMISSION_CHUNKS$$ <uses-permission android:name="godot.custom.18"/> <uses-permission android:name="godot.custom.19"/> -<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="23"/> +<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27"/> </manifest> diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template index 7269e658b4..cc45fee95f 100644 --- a/platform/android/build.gradle.template +++ b/platform/android/build.gradle.template @@ -21,7 +21,6 @@ allprojects { } dependencies { - compile 'com.android.support:support-v4:27.+' // can be removed if minSdkVersion 16 and modify DownloadNotification.java & V14CustomNotification.java $$GRADLE_DEPENDENCIES$$ } diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 6d9f0a7e9a..6fe137a386 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1153,7 +1153,7 @@ public: String package_name = p_preset->get("package/unique_name"); if (remove_prev) { - ep.step("Uninstalling..", 1); + ep.step("Uninstalling...", 1); print_line("Uninstalling previous version: " + devices[p_device].name); @@ -1232,7 +1232,7 @@ public: } } - ep.step("Running on Device..", 3); + ep.step("Running on Device...", 3); args.clear(); args.push_back("-s"); args.push_back(devices[p_device].id); @@ -1323,6 +1323,8 @@ public: virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) { + ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags); + String src_apk; EditorProgress ep("export", "Exporting for Android", 105); @@ -1490,7 +1492,7 @@ public: ret = unzGoToNextFile(pkg); } - ep.step("Adding Files..", 1); + ep.step("Adding Files...", 1); Error err = OK; Vector<String> cl = cmdline.strip_edges().split(" "); for (int i = 0; i < cl.size(); i++) { @@ -1624,14 +1626,14 @@ public: password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass"); user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user"); - ep.step("Signing Debug APK..", 103); + ep.step("Signing Debug APK...", 103); } else { keystore = release_keystore; password = release_password; user = release_username; - ep.step("Signing Release APK..", 103); + ep.step("Signing Release APK...", 103); } if (!FileAccess::exists(keystore)) { @@ -1641,9 +1643,9 @@ public: List<String> args; args.push_back("-digestalg"); - args.push_back("SHA1"); + args.push_back("SHA-256"); args.push_back("-sigalg"); - args.push_back("MD5withRSA"); + args.push_back("SHA256withRSA"); String tsa_url = EditorSettings::get_singleton()->get("export/android/timestamping_authority_url"); if (tsa_url != "") { args.push_back("-tsa"); @@ -1663,7 +1665,7 @@ public: return ERR_CANT_CREATE; } - ep.step("Verifying APK..", 104); + ep.step("Verifying APK...", 104); args.clear(); args.push_back("-verify"); @@ -1683,7 +1685,7 @@ public: static const int ZIP_ALIGNMENT = 4; - ep.step("Aligning APK..", 105); + ep.step("Aligning APK...", 105); unzFile tmp_unaligned = unzOpen2(unaligned_path.utf8().get_data(), &io); if (!tmp_unaligned) { diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java index 73e6f83bec..a9f674803c 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java @@ -27,7 +27,6 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.os.Messenger; -import android.support.v4.app.NotificationCompat; /** * This class handles displaying the notification associated with the download @@ -49,9 +48,8 @@ public class DownloadNotification implements IDownloaderClient { private IDownloaderClient mClientProxy; final ICustomNotification mCustomNotification; - // NotificationCompat.Builder is used to support API < 16. This can be changed to Notification.Builder if minimum API >= 16. - private NotificationCompat.Builder mNotificationBuilder; - private NotificationCompat.Builder mCurrentNotificationBuilder; + private Notification.Builder mNotificationBuilder; + private Notification.Builder mCurrentNotificationBuilder; private CharSequence mLabel; private String mCurrentText; private PendingIntent mContentIntent; @@ -187,7 +185,7 @@ public class DownloadNotification implements IDownloaderClient { void setTimeRemaining(long timeRemaining); - NotificationCompat.Builder updateNotification(Context c); + Notification.Builder updateNotification(Context c); } /** @@ -220,7 +218,7 @@ public class DownloadNotification implements IDownloaderClient { mContext.getSystemService(Context.NOTIFICATION_SERVICE); mCustomNotification = CustomNotificationFactory .createCustomNotification(); - mNotificationBuilder = new NotificationCompat.Builder(ctx); + mNotificationBuilder = new Notification.Builder(ctx); mCurrentNotificationBuilder = mNotificationBuilder; } diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java index 390bde96e9..56b2331e31 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java @@ -22,7 +22,6 @@ import com.google.android.vending.expansion.downloader.Helpers; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; -import android.support.v4.app.NotificationCompat; public class V14CustomNotification implements DownloadNotification.ICustomNotification { @@ -54,14 +53,13 @@ public class V14CustomNotification implements DownloadNotification.ICustomNotifi mCurrentKB = currentBytes; } - void setProgress(NotificationCompat.Builder builder) { + void setProgress(Notification.Builder builder) { } @Override - public NotificationCompat.Builder updateNotification(Context c) { - // NotificationCompat.Builder is used to support API < 16. This can be changed to Notification.Builder if minimum API >= 16. - NotificationCompat.Builder builder = new NotificationCompat.Builder(c); + public Notification.Builder updateNotification(Context c) { + Notification.Builder builder = new Notification.Builder(c); builder.setContentTitle(mTitle); if (mTotalKB > 0 && -1 != mCurrentKB) { builder.setProgress((int) (mTotalKB >> 8), (int) (mCurrentKB >> 8), false); diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 5557c1de44..fc41adeb76 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -330,17 +330,6 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos> if (touch.size()) { //end all if exist - { - Ref<InputEventMouseButton> ev; - ev.instance(); - ev->set_button_index(BUTTON_LEFT); - ev->set_button_mask(BUTTON_MASK_LEFT); - ev->set_pressed(false); - ev->set_position(touch[0].pos); - ev->set_global_position(touch[0].pos); - input->parse_input_event(ev); - } - for (int i = 0; i < touch.size(); i++) { Ref<InputEventScreenTouch> ev; @@ -358,21 +347,6 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos> touch[i].pos = p_points[i].pos; } - { - //send mouse - Ref<InputEventMouseButton> ev; - ev.instance(); - // ev.type = Ref<InputEvent>::MOUSE_BUTTON; - ev->set_button_index(BUTTON_LEFT); - ev->set_button_mask(BUTTON_MASK_LEFT); - ev->set_pressed(true); - ev->set_position(touch[0].pos); - ev->set_global_position(touch[0].pos); - input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y)); - last_mouse = touch[0].pos; - input->parse_input_event(ev); - } - //send touch for (int i = 0; i < touch.size(); i++) { @@ -387,19 +361,6 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos> } break; case 1: { //motion - if (p_points.size()) { - //send mouse, should look for point 0? - Ref<InputEventMouseMotion> ev; - ev.instance(); - ev->set_button_mask(BUTTON_MASK_LEFT); - ev->set_position(p_points[0].pos); - input->set_mouse_position(Point2(ev->get_position().x, ev->get_position().y)); - ev->set_speed(input->get_last_mouse_speed()); - ev->set_relative(p_points[0].pos - last_mouse); - last_mouse = p_points[0].pos; - input->parse_input_event(ev); - } - ERR_FAIL_COND(touch.size() != p_points.size()); for (int i = 0; i < touch.size(); i++) { @@ -432,16 +393,6 @@ void OS_Android::process_touch(int p_what, int p_pointer, const Vector<TouchPos> if (touch.size()) { //end all if exist - Ref<InputEventMouseButton> ev; - ev.instance(); - ev->set_button_index(BUTTON_LEFT); - ev->set_button_mask(BUTTON_MASK_LEFT); - ev->set_pressed(false); - ev->set_position(touch[0].pos); - ev->set_global_position(touch[0].pos); - input->set_mouse_position(Point2(touch[0].pos.x, touch[0].pos.y)); - input->parse_input_event(ev); - for (int i = 0; i < touch.size(); i++) { Ref<InputEventScreenTouch> ev; diff --git a/platform/android/os_android.h b/platform/android/os_android.h index 12181b3688..d2457e538d 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -93,7 +93,6 @@ public: private: Vector<TouchPos> touch; - Point2 last_mouse; GFXInitFunc gfx_init_func; void *gfx_init_ud; |