Skip to content

Commit

Permalink
Replaced wrapper method calls in native code with function calls.
Browse files Browse the repository at this point in the history
	Change on 2018/04/14 by tball <[email protected]>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192901718
  • Loading branch information
tomball committed Apr 17, 2018
1 parent 5a76450 commit 24fec22
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -610,12 +610,13 @@ private native void makeRequest() throws IOException /*-[
// The HttpURLConnection headerFields map uses a null key for Status-Line.
NSString *statusLine = [NSString stringWithFormat:@"HTTP/1.1 %d %@", responseCode,
self->responseMessage_];
[self addHeaderWithNSString:nil withNSString:statusLine];
ComGoogleJ2objcNetIosHttpURLConnection_addHeaderWithNSString_withNSString_(
self, nil, statusLine);
// Copy remaining response headers.
[response.allHeaderFields enumerateKeysAndObjectsUsingBlock:
^(id key, id value, BOOL *stop) {
[self addHeaderWithNSString:key withNSString:value];
ComGoogleJ2objcNetIosHttpURLConnection_addHeaderWithNSString_withNSString_(self, key, value);
}];
if (response.statusCode >= JavaNetHttpURLConnection_HTTP_BAD_REQUEST) {
Expand Down
8 changes: 4 additions & 4 deletions jre_emul/Classes/com/google/j2objc/util/NativeTimeZone.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ public static native String[] getAvailableNativeTimeZoneNames() /*-[


public static native NativeTimeZone get(String name) /*-[
return [ComGoogleJ2objcUtilNativeTimeZone fromNativeTimeZoneWithId:
[NSTimeZone timeZoneWithName:name]];
return ComGoogleJ2objcUtilNativeTimeZone_fromNativeTimeZoneWithId_(
[NSTimeZone timeZoneWithName:name]);
]-*/;

public static native NativeTimeZone getDefaultNativeTimeZone() /*-[
return [ComGoogleJ2objcUtilNativeTimeZone fromNativeTimeZoneWithId:
[NSTimeZone defaultTimeZone]];
return ComGoogleJ2objcUtilNativeTimeZone_fromNativeTimeZoneWithId_(
[NSTimeZone defaultTimeZone]);
]-*/;

private static native NativeTimeZone fromNativeTimeZone(Object nativeTimeZone) /*-[
Expand Down
2 changes: 1 addition & 1 deletion jre_emul/Classes/java/lang/Runtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void runShutdownHooks() {

private native void registerShutdownHooks() /*-[
atexit_b(^{
[self runShutdownHooks];
JavaLangRuntime_runShutdownHooks(self);
});
]-*/;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private void postResultIfNotInvoked(Result result) {

private native Result postResult(Result result) /*-[
dispatch_async(dispatch_get_main_queue(), ^{
[self finishWithId:result];
AndroidOsAsyncTask_finishWithId_(self, result);
});
return result;
]-*/;
Expand Down

0 comments on commit 24fec22

Please sign in to comment.