diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-01-30 18:52:23 +1100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-01-30 09:11:34 +0100 |
commit | 3353687fb4af77de2a5a901d58b940367162f741 (patch) | |
tree | bb8c2f8ab29ae7aa11e0383d2c7a3086216a3f72 /android | |
parent | 04f4092f01287e7f8df060171e14f9e22bd5a584 (diff) |
fdo#60054 - sdremote - handle rotation without causing issues.
It seems there was a misunderstanding of onCreate's savedInstanceState cf.
http://developer.android.com/reference/android/app/Activity.html
Apparently we go through a onStop / onCreate cycle when rotating,
that triggered this.
Change-Id: I7cb1cf29bcae59ef26cf3bf0c2b3dd028eb8f878
(cherry picked from commit 74d2bcf697aeb631e927d8d87ea2ed5b96d816e6)
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'android')
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java index 5256f98cd40d..eb992f17d7d9 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/PresentationActivity.java @@ -71,18 +71,16 @@ public class PresentationActivity extends SherlockFragmentActivity { //((FrameLayout) findViewById(R.id.framelayout)).addView(mLayout); setContentView(R.layout.activity_presentation); - if (savedInstanceState == null) { - mPresentationFragment = new PresentationFragment(); + mPresentationFragment = new PresentationFragment(); - FragmentManager fragmentManager = getSupportFragmentManager(); + FragmentManager fragmentManager = getSupportFragmentManager(); - FragmentTransaction fragmentTransaction = fragmentManager - .beginTransaction(); - fragmentTransaction.add(R.id.presentation_interceptor, - mPresentationFragment, "fragment_presentation"); - fragmentTransaction.commit(); - } + FragmentTransaction fragmentTransaction = fragmentManager + .beginTransaction(); + fragmentTransaction.add(R.id.presentation_interceptor, + mPresentationFragment, "fragment_presentation"); + fragmentTransaction.commit(); mOuterLayout = (FrameLayout) findViewById(R.id.framelayout); } |