summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE.md28
-rw-r--r--LICENSE.txt22
-rw-r--r--drivers/unix/ip_unix.cpp15
-rw-r--r--drivers/unix/socket_helpers.h10
-rw-r--r--editor/editor_export.cpp6
-rw-r--r--editor/editor_run.cpp3
-rw-r--r--editor/editor_settings.cpp12
-rw-r--r--editor/property_editor.cpp2
-rw-r--r--main/main.cpp5
-rw-r--r--modules/gdnative/godot.cpp26
-rw-r--r--modules/gdnative/godot.h3
-rw-r--r--modules/gdnative/godot/godot_variant.cpp16
-rw-r--r--modules/gdnative/godot/godot_variant.h31
-rw-r--r--modules/gdscript/gd_editor.cpp2
-rw-r--r--modules/gdscript/gd_parser.cpp22
-rw-r--r--modules/gdscript/gd_parser.h2
-rw-r--r--platform/android/build.gradle.template3
-rw-r--r--platform/android/java/gradle/wrapper/gradle-wrapper.properties5
-rw-r--r--platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java4
19 files changed, 145 insertions, 72 deletions
diff --git a/LICENSE.md b/LICENSE.md
deleted file mode 100644
index 83dc84e041..0000000000
--- a/LICENSE.md
+++ /dev/null
@@ -1,28 +0,0 @@
- GODOT ENGINE
- http://www.godotengine.org
-
-************************************************************************
-
- Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur.
- Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-************************************************************************
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000000..0b5b0c341f
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur.
+Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-- Godot Engine <https://godotengine.org>
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index 1becf3accb..30d2377a04 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -77,7 +77,7 @@ static IP_Address _sockaddr2ip(struct sockaddr *p_addr) {
if (p_addr->sa_family == AF_INET) {
struct sockaddr_in *addr = (struct sockaddr_in *)p_addr;
ip.set_ipv4((uint8_t *)&(addr->sin_addr));
- } else {
+ } else if (p_addr->sa_family == AF_INET6) {
struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)p_addr;
ip.set_ipv6(addr6->sin6_addr.s6_addr);
};
@@ -180,15 +180,16 @@ void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const {
SOCKADDR_IN *ipv4 = reinterpret_cast<SOCKADDR_IN *>(address->Address.lpSockaddr);
ip.set_ipv4((uint8_t *)&(ipv4->sin_addr));
- } else { // ipv6
+ r_addresses->push_back(ip);
+
+ } else if (address->Address.lpSockaddr->sa_family == AF_INET6) { // ipv6
SOCKADDR_IN6 *ipv6 = reinterpret_cast<SOCKADDR_IN6 *>(address->Address.lpSockaddr);
ip.set_ipv6(ipv6->sin6_addr.s6_addr);
+ r_addresses->push_back(ip);
};
- r_addresses->push_back(ip);
-
address = address->Next;
};
adapter = adapter->Next;
@@ -205,6 +206,7 @@ void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const {
struct ifaddrs *ifAddrStruct = NULL;
struct ifaddrs *ifa = NULL;
+ int family;
getifaddrs(&ifAddrStruct);
@@ -212,6 +214,11 @@ void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const {
if (!ifa->ifa_addr)
continue;
+ family = ifa->ifa_addr->sa_family;
+
+ if (family != AF_INET && family != AF_INET6)
+ continue;
+
IP_Address ip = _sockaddr2ip(ifa->ifa_addr);
r_addresses->push_back(ip);
}
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 8e54afcdba..5fa727a9b9 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -100,13 +100,21 @@ static size_t _set_listen_sockaddr(struct sockaddr_storage *p_addr, int p_port,
};
};
-static int _socket_create(IP::Type p_type, int type, int protocol) {
+static int _socket_create(IP::Type &p_type, int type, int protocol) {
ERR_FAIL_COND_V(p_type > IP::TYPE_ANY || p_type < IP::TYPE_NONE, ERR_INVALID_PARAMETER);
int family = p_type == IP::TYPE_IPV4 ? AF_INET : AF_INET6;
int sockfd = socket(family, type, protocol);
+ if (sockfd == -1 && p_type == IP::TYPE_ANY) {
+ // Careful here, changing the referenced parameter so the caller knows that we are using an IPv4 socket
+ // in place of a dual stack one, and further calls to _set_sock_addr will work as expected.
+ p_type = IP::TYPE_IPV4;
+ family = AF_INET;
+ sockfd = socket(family, type, protocol);
+ }
+
ERR_FAIL_COND_V(sockfd == -1, -1);
if (family == AF_INET6) {
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 3774c8d4c3..cb1b958cca 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -210,7 +210,7 @@ EditorExportPreset::EditorExportPreset() {
void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug_host");
+ String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
host = "localhost";
@@ -620,7 +620,7 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, co
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug_host");
+ String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
host = "localhost";
@@ -2108,7 +2108,7 @@ static int _get_pad(int p_alignment, int p_n) {
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
- String host = EditorSettings::get_singleton()->get("network/debug_host");
+ String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (p_flags&EXPORT_REMOTE_DEBUG_LOCALHOST)
host="localhost";
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index d36b8cece5..e0ebe985cd 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -41,6 +41,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
List<String> args;
String resource_path = GlobalConfig::get_singleton()->get_resource_path();
+ String remote_host = EditorSettings::get_singleton()->get("network/debug/remote_host");
if (resource_path != "") {
args.push_back("-path");
@@ -49,7 +50,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
if (true) {
args.push_back("-rdebug");
- args.push_back("localhost:" + String::num(GLOBAL_GET("network/debug/remote_port")));
+ args.push_back(remote_host + ":" + String::num(GLOBAL_GET("network/debug/remote_port")));
}
args.push_back("-epid");
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 9fd76590a6..0a46acddb2 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -407,13 +407,12 @@ void EditorSettings::setup_network() {
IP::get_singleton()->get_local_addresses(&local_ip);
String lip;
String hint;
- String current = has("network/debug_host") ? get("network/debug_host") : "";
+ String current = has("network/debug/remote_host") ? get("network/debug/remote_host") : "";
+ int port = has("network/debug/remote_port") ? (int)get("network/debug/remote_port") : 6007;
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
String ip = E->get();
- if (ip == "127.0.0.1")
- continue;
if (lip == "")
lip = ip;
@@ -424,8 +423,11 @@ void EditorSettings::setup_network() {
hint += ip;
}
- set("network/debug_host", lip);
- add_property_hint(PropertyInfo(Variant::STRING, "network/debug_host", PROPERTY_HINT_ENUM, hint));
+ set("network/debug/remote_host", lip);
+ add_property_hint(PropertyInfo(Variant::STRING, "network/debug/remote_host", PROPERTY_HINT_ENUM, hint));
+
+ set("network/debug/remote_port", port);
+ add_property_hint(PropertyInfo(Variant::INT, "network/debug/remote_port", PROPERTY_HINT_RANGE, "1,65535,1"));
}
void EditorSettings::save() {
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 5ff5e680f6..3dd9ba080c 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -323,7 +323,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
c->show();
checks20gc->set_size(checks20gc->get_minimum_size());
- set_size(checks20gc->get_position() + checks20gc->get_size() + Vector2(4, 4) * EDSCALE);
+ set_size(checks20gc->get_position() + checks20gc->get_size() + c->get_size() + Vector2(4, 4) * EDSCALE);
} break;
case Variant::INT:
diff --git a/main/main.cpp b/main/main.cpp
index 33095e8599..ea7d8e075c 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -588,8 +588,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
ScriptDebuggerRemote *sdr = memnew(ScriptDebuggerRemote);
uint16_t debug_port = GLOBAL_GET("network/debug/remote_port");
if (debug_host.find(":") != -1) {
- debug_port = debug_host.get_slicec(':', 1).to_int();
- debug_host = debug_host.get_slicec(':', 0);
+ int sep_pos = debug_host.find_last(":");
+ debug_port = debug_host.substr(sep_pos + 1, debug_host.length()).to_int();
+ debug_host = debug_host.substr(0, sep_pos);
}
Error derr = sdr->connect_to_host(debug_host, debug_port);
diff --git a/modules/gdnative/godot.cpp b/modules/gdnative/godot.cpp
index 4b865966fd..bc53eb93f4 100644
--- a/modules/gdnative/godot.cpp
+++ b/modules/gdnative/godot.cpp
@@ -116,6 +116,28 @@ void GDAPI godot_method_bind_ptrcall(godot_method_bind *p_method_bind, godot_obj
mb->ptrcall(o, p_args, p_ret);
}
+godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error) {
+ MethodBind *mb = (MethodBind *)p_method_bind;
+ Object *o = (Object *)p_instance;
+ const Variant **args = (const Variant **)p_args;
+
+ godot_variant ret;
+ godot_variant_new_nil(&ret);
+
+ Variant *ret_val = (Variant *)&ret;
+
+ Variant::CallError r_error;
+ *ret_val = mb->call(o, args, p_arg_count, r_error);
+
+ if (p_call_error) {
+ p_call_error->error = (godot_variant_call_error_error)r_error.error;
+ p_call_error->argument = r_error.argument;
+ p_call_error->expected = (godot_variant_type)r_error.expected;
+ }
+
+ return ret;
+}
+
// @Todo
/*
void GDAPI godot_method_bind_varcall(godot_method_bind *p_method_bind)
@@ -224,6 +246,10 @@ void GDAPI godot_print_warning(const char *p_description, const char *p_function
_err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_WARNING);
}
+void GDAPI godot_print(const godot_string *p_message) {
+ print_line(*(String *)p_message);
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/modules/gdnative/godot.h b/modules/gdnative/godot.h
index e8f0bc0553..7214ce62df 100644
--- a/modules/gdnative/godot.h
+++ b/modules/gdnative/godot.h
@@ -228,7 +228,7 @@ typedef struct godot_method_bind {
godot_method_bind GDAPI *godot_method_bind_get_method(const char *p_classname, const char *p_methodname);
void GDAPI godot_method_bind_ptrcall(godot_method_bind *p_method_bind, godot_object *p_instance, const void **p_args, void *p_ret);
-
+godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, godot_object *p_instance, const godot_variant **p_args, const int p_arg_count, godot_variant_call_error *p_call_error);
////// Script API
typedef struct godot_native_init_options {
@@ -407,6 +407,7 @@ void GDAPI godot_free(void *p_ptr);
//print using Godot's error handler list
void GDAPI godot_print_error(const char *p_description, const char *p_function, const char *p_file, int p_line);
void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line);
+void GDAPI godot_print(const godot_string *p_message);
#ifdef __cplusplus
}
diff --git a/modules/gdnative/godot/godot_variant.cpp b/modules/gdnative/godot/godot_variant.cpp
index 2214f85056..e9fa4eb8c6 100644
--- a/modules/gdnative/godot/godot_variant.cpp
+++ b/modules/gdnative/godot/godot_variant.cpp
@@ -457,12 +457,22 @@ godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_varia
return pba;
}
-godot_variant GDAPI godot_variant_call(godot_variant *p_v, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount /*, godot_variant_call_error *r_error */) {
+godot_variant GDAPI godot_variant_call(godot_variant *p_v, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *p_error) {
Variant *v = (Variant *)p_v;
String *method = (String *)p_method;
- Variant **args = (Variant **)p_args;
+ const Variant **args = (const Variant **)p_args;
godot_variant res;
- memnew_placement_custom((Variant *)&res, Variant, Variant(v->call(*method, args, p_argcount)));
+ godot_variant_new_nil(&res);
+
+ Variant *ret_val = (Variant *)&res;
+
+ Variant::CallError r_error;
+ *ret_val = v->call(StringName(*method), args, p_argcount, r_error);
+ if (p_error) {
+ p_error->error = (godot_variant_call_error_error)r_error.error;
+ p_error->argument = r_error.argument;
+ p_error->expected = (godot_variant_type)r_error.expected;
+ }
return res;
}
diff --git a/modules/gdnative/godot/godot_variant.h b/modules/gdnative/godot/godot_variant.h
index 6f98b32363..0a5771d2f6 100644
--- a/modules/gdnative/godot/godot_variant.h
+++ b/modules/gdnative/godot/godot_variant.h
@@ -45,13 +45,6 @@ typedef struct godot_variant {
struct godot_transform2d;
typedef struct godot_transform2d godot_transform2d;
-#include "godot_array.h"
-#include "godot_dictionary.h"
-#include "godot_input_event.h"
-#include "godot_node_path.h"
-#include "godot_rid.h"
-#include "godot_transform2d.h"
-
typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_NIL,
@@ -93,6 +86,28 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_POOL_COLOR_ARRAY,
} godot_variant_type;
+typedef enum godot_variant_call_error_error {
+ GODOT_CALL_ERROR_CALL_OK,
+ GODOT_CALL_ERROR_CALL_ERROR_INVALID_METHOD,
+ GODOT_CALL_ERROR_CALL_ERROR_INVALID_ARGUMENT,
+ GODOT_CALL_ERROR_CALL_ERROR_TOO_MANY_ARGUMENTS,
+ GODOT_CALL_ERROR_CALL_ERROR_TOO_FEW_ARGUMENTS,
+ GODOT_CALL_ERROR_CALL_ERROR_INSTANCE_IS_NULL,
+} godot_variant_call_error_error;
+
+typedef struct godot_variant_call_error {
+ godot_variant_call_error_error error;
+ int argument;
+ godot_variant_type expected;
+} godot_variant_call_error;
+
+#include "godot_array.h"
+#include "godot_dictionary.h"
+#include "godot_input_event.h"
+#include "godot_node_path.h"
+#include "godot_rid.h"
+#include "godot_transform2d.h"
+
godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_v);
void GDAPI godot_variant_copy(godot_variant *p_dest, const godot_variant *p_src);
@@ -159,7 +174,7 @@ godot_pool_vector2_array GDAPI godot_variant_as_pool_vector2_array(const godot_v
godot_pool_vector3_array GDAPI godot_variant_as_pool_vector3_array(const godot_variant *p_v);
godot_pool_color_array GDAPI godot_variant_as_pool_color_array(const godot_variant *p_v);
-godot_variant GDAPI godot_variant_call(godot_variant *p_v, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount /*, godot_variant_call_error *r_error */);
+godot_variant GDAPI godot_variant_call(godot_variant *p_v, const godot_string *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant_call_error *p_error);
godot_bool GDAPI godot_variant_has_method(godot_variant *p_v, const godot_string *p_method);
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 4667e541dd..5d404e2f7d 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -2395,7 +2395,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
}
} break;
- case GDParser::COMPLETION_PRELOAD: {
+ case GDParser::COMPLETION_RESOURCE_PATH: {
if (EditorSettings::get_singleton()->get("text_editor/completion/complete_file_paths"))
get_directory_contents(EditorFileSystem::get_singleton()->get_filesystem(), options);
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index b02d7f713b..4ae62eb1d0 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -387,15 +387,21 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
_set_error("Expected '(' after 'preload'");
return NULL;
}
- completion_cursor = StringName();
- completion_type = COMPLETION_PRELOAD;
- completion_class = current_class;
- completion_function = current_function;
- completion_line = tokenizer->get_token_line();
- completion_block = current_block;
- completion_found = true;
tokenizer->advance();
+ if (tokenizer->get_token() == GDTokenizer::TK_CURSOR) {
+ completion_cursor = StringName();
+ completion_node = p_parent;
+ completion_type = COMPLETION_RESOURCE_PATH;
+ completion_class = current_class;
+ completion_function = current_function;
+ completion_line = tokenizer->get_token_line();
+ completion_block = current_block;
+ completion_argument = 0;
+ completion_found = true;
+ tokenizer->advance();
+ }
+
String path;
bool found_constant = false;
bool valid = false;
@@ -467,10 +473,10 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
_set_error("Expected ')' after 'preload' path");
return NULL;
}
+ tokenizer->advance();
ConstantNode *constant = alloc_node<ConstantNode>();
constant->value = res;
- tokenizer->advance();
expr = constant;
} else if (tokenizer->get_token() == GDTokenizer::TK_PR_YIELD) {
diff --git a/modules/gdscript/gd_parser.h b/modules/gdscript/gd_parser.h
index 4f3ca0dc5f..7e7e19de1b 100644
--- a/modules/gdscript/gd_parser.h
+++ b/modules/gdscript/gd_parser.h
@@ -437,7 +437,7 @@ public:
COMPLETION_PARENT_FUNCTION,
COMPLETION_METHOD,
COMPLETION_CALL_ARGUMENTS,
- COMPLETION_PRELOAD,
+ COMPLETION_RESOURCE_PATH,
COMPLETION_INDEX,
COMPLETION_VIRTUAL_FUNC,
COMPLETION_YIELD,
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index 8dfb006c00..e8de93067f 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.1.0'
+ classpath 'com.android.tools.build:gradle:2.3.1'
$$GRADLE_CLASSPATH$$
}
}
@@ -66,6 +66,7 @@ android {
$$GRADLE_ASSET_DIRS$$
]
jniLibs.srcDirs = [
+ 'libs'
$$GRADLE_JNI_DIRS$$
]
}
diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
index d57051703e..a11cc1b825 100644
--- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties
+++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#Fri May 12 08:50:03 KST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
+org.gradle.jvmargs=-Xmx1536M
diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java
index 627bf3eedd..e83faa2756 100644
--- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java
+++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java
@@ -569,10 +569,10 @@ public abstract class DownloaderService extends CustomIntentService implements I
*/
void pollNetworkState() {
if (null == mConnectivityManager) {
- mConnectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
+ mConnectivityManager = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
}
if (null == mWifiManager) {
- mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
+ mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
}
if (mConnectivityManager == null) {
Log.w(Constants.TAG,