summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-24 14:56:38 -0700
committerDianne Hackborn <hackbod@google.com>2010-10-24 14:56:38 -0700
commite21d91c694e828e6285cc50e79b2a6be6e8c692b (patch)
treebff7d5088aa8dc568c33a1c68a7dbd976ebe0f58 /native
parentb6a2256e5461160a89d077b761d3253d95ce869f (diff)
downloadframeworks_base-e21d91c694e828e6285cc50e79b2a6be6e8c692b.zip
frameworks_base-e21d91c694e828e6285cc50e79b2a6be6e8c692b.tar.gz
frameworks_base-e21d91c694e828e6285cc50e79b2a6be6e8c692b.tar.bz2
Fix issue #3126018: No way to specify NativeActivity's native method
Change-Id: I59de6a543e7f7f45d963a905829a3f56f32bf8cf
Diffstat (limited to 'native')
-rw-r--r--native/include/android/native_activity.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/native/include/android/native_activity.h b/native/include/android/native_activity.h
index a8f11c9..d89bc8b 100644
--- a/native/include/android/native_activity.h
+++ b/native/include/android/native_activity.h
@@ -223,18 +223,34 @@ typedef void ANativeActivity_createFunc(ANativeActivity* activity,
/**
* The name of the function that NativeInstance looks for when launching its
- * native code.
+ * native code. This is the default function that is used, you can specify
+ * "android.app.func_name" string meta-data in your manifest to use a different
+ * function.
*/
extern ANativeActivity_createFunc ANativeActivity_onCreate;
/**
* Finish the given activity. Its finish() method will be called, causing it
- * to be stopped and destroyed.
+ * to be stopped and destroyed. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
*/
void ANativeActivity_finish(ANativeActivity* activity);
+/**
+ * Change the window format of the given activity. Calls getWindow().setFormat()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format);
+/**
+ * Change the window flags of the given activity. Calls getWindow().setFlags()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place. See window.h for flag constants.
+ */
void ANativeActivity_setWindowFlags(ANativeActivity* activity,
uint32_t addFlags, uint32_t removeFlags);
@@ -247,6 +263,12 @@ enum {
ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
};
+/**
+ * Show the IME while in the given activity. Calls InputMethodManager.showSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
/**
@@ -258,6 +280,12 @@ enum {
ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
};
+/**
+ * Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
#ifdef __cplusplus