Skip to content

Commit c044b5e

Browse files
Andrew HsiehGerrit Code Review
authored andcommitted
Merge "- Using hard-fp - Immersive mode in android-19 - Fixed local reference release in JNI helper - Misc fixes Change-Id: I3ab19c2b66648bb7a011c462d9d98e75bc136ce6"
2 parents 1f1e737 + cc69f21 commit c044b5e

File tree

13 files changed

+54
-14
lines changed

13 files changed

+54
-14
lines changed

ndk/platforms/android-17/samples/Teapot/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<uses-sdk
77
android:minSdkVersion="11"
8-
android:targetSdkVersion="17" />
8+
android:targetSdkVersion="19" />
99
<uses-feature android:glEsVersion="0x00020000"></uses-feature>
1010
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
1111
<application

ndk/platforms/android-17/samples/Teapot/jni/Android.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ LOCAL_CFLAGS :=
1313
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2
1414
LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue ndk_helper
1515

16+
ifneq ($(filter %armeabi-v7a,$(TARGET_ARCH_ABI)),)
17+
LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
18+
LOCAL_LDLIBS += -lm_hard
19+
ifeq (,$(filter -fuse-ld=mcld,$(APP_LDFLAGS) $(LOCAL_LDFLAGS)))
20+
LOCAL_LDFLAGS += -Wl,--no-warn-mismatch
21+
endif
22+
endif
23+
1624
include $(BUILD_SHARED_LIBRARY)
1725

1826
$(call import-module,android/ndk_helper)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
APP_PLATFORM := android-9
22
APP_ABI := all
33

4-
APP_STL := stlport_static
4+
APP_STL := stlport_static

ndk/platforms/android-17/samples/Teapot/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=Google Inc.:Google APIs:17
14+
target=Google Inc.:Google APIs:19

ndk/platforms/android-17/samples/Teapot/src/com/sample/teapot/TeapotNativeActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ protected void onResume() {
4242
{
4343
getWindow().getDecorView().setSystemUiVisibility(View.STATUS_BAR_HIDDEN);
4444
}
45-
else if(SDK_INT >= 14)
45+
else if(SDK_INT >= 14 && SDK_INT < 19)
4646
{
4747
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LOW_PROFILE);
4848
}
49+
else if(SDK_INT >= 19)
50+
{
51+
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN
52+
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
53+
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
54+
}
4955

5056
}
5157
// Our popup window, you will call it from your C/C++ code later

ndk/platforms/android-18/samples/MoreTeapots/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<uses-sdk
77
android:minSdkVersion="11"
8-
android:targetSdkVersion="17" />
8+
android:targetSdkVersion="19" />
99
<uses-feature android:glEsVersion="0x00020000"></uses-feature>
1010
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
1111
<application

ndk/platforms/android-18/samples/MoreTeapots/jni/Android.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ LOCAL_CFLAGS :=
1212
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2
1313
LOCAL_STATIC_LIBRARIES := cpufeatures android_native_app_glue ndk_helper
1414

15+
ifneq ($(filter %armeabi-v7a,$(TARGET_ARCH_ABI)),)
16+
LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
17+
LOCAL_LDLIBS += -lm_hard
18+
ifeq (,$(filter -fuse-ld=mcld,$(APP_LDFLAGS) $(LOCAL_LDFLAGS)))
19+
LOCAL_LDFLAGS += -Wl,--no-warn-mismatch
20+
endif
21+
endif
22+
1523
include $(BUILD_SHARED_LIBRARY)
1624

1725
$(call import-module,android/ndk_helper)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
APP_PLATFORM := android-9
22
APP_ABI := all
33

4-
APP_STL := stlport_static
4+
APP_STL := stlport_static

ndk/platforms/android-18/samples/MoreTeapots/jni/MoreTeapotsNativeActivity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
//-------------------------------------------------------------------------
4242
const int32_t NUM_TEAPOTS_X = 8;
4343
const int32_t NUM_TEAPOTS_Y = 8;
44-
const int32_t NUM_TEAPOTS_Z = 6;
44+
const int32_t NUM_TEAPOTS_Z = 8;
4545

4646
//-------------------------------------------------------------------------
4747
//Shared state for our app.

ndk/platforms/android-18/samples/MoreTeapots/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=Google Inc.:Google APIs:17
14+
target=Google Inc.:Google APIs:19

0 commit comments

Comments
 (0)