diff options
author | Sven Gothel <[email protected]> | 2012-12-24 21:38:40 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-12-24 21:38:40 +0100 |
commit | a35beb22d712b6da85a794115b19d484a12c8643 (patch) | |
tree | 4dced2c6961f7a850dfd5f9e4e6d04d11ddec8b5 /src | |
parent | b478cf3ead567fcc79fd8b75cade17efe0af3127 (diff) |
NEWT/Android: Fix NewtBaseActivity.getWindow() recursion if used w/o delegated Activity, i.e. our ActivityLauncher
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java index 28c4da72f..c2379b648 100644 --- a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java +++ b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java @@ -59,8 +59,8 @@ public class NewtBaseActivity extends Activity { } public void setRootActivity(Activity rootActivity) { - this.isDelegatedActivity = true; this.rootActivity = rootActivity; + this.isDelegatedActivity = this != rootActivity; } public final boolean isDelegatedActivity() { @@ -231,7 +231,11 @@ public class NewtBaseActivity extends Activity { @Override public android.view.Window getWindow() { - return getActivity().getWindow(); + if( isDelegatedActivity() ) { + return getActivity().getWindow(); + } else { + return getWindow(); + } } @Override |