You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement Activity.isInMultiWindowMode()
This commit is contained in:
@@ -311,3 +311,8 @@ JNIEXPORT void JNICALL Java_android_app_Activity_nativeFileChooser(JNIEnv *env,
|
|||||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
|
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jboolean JNICALL Java_android_app_Activity_isInMultiWindowMode(JNIEnv *env, jobject this)
|
||||||
|
{
|
||||||
|
return !gtk_window_is_maximized(window);
|
||||||
|
}
|
||||||
|
|||||||
@@ -45,6 +45,14 @@ JNIEXPORT void JNICALL Java_android_app_Activity_nativeOpenURI
|
|||||||
JNIEXPORT void JNICALL Java_android_app_Activity_nativeFileChooser
|
JNIEXPORT void JNICALL Java_android_app_Activity_nativeFileChooser
|
||||||
(JNIEnv *, jobject, jint, jstring, jstring, jint);
|
(JNIEnv *, jobject, jint, jstring, jstring, jint);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: android_app_Activity
|
||||||
|
* Method: isInMultiWindowMode
|
||||||
|
* Signature: ()Z
|
||||||
|
*/
|
||||||
|
JNIEXPORT jboolean JNICALL Java_android_app_Activity_isInMultiWindowMode
|
||||||
|
(JNIEnv *, jobject);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -575,5 +575,5 @@ public class Activity extends ContextThemeWrapper implements Window.Callback {
|
|||||||
public Uri getReferrer() { return null; }
|
public Uri getReferrer() { return null; }
|
||||||
public void setDefaultKeyMode(int flag) {}
|
public void setDefaultKeyMode(int flag) {}
|
||||||
public void registerForContextMenu(View view) {}
|
public void registerForContextMenu(View view) {}
|
||||||
public boolean isInMultiWindowMode() { return true; }
|
public native boolean isInMultiWindowMode();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user