I have my main activity A and when the user presses a button i open another activity B. But when this happens B doesn't just appear on top of A:
- A disappears
- secure keyguard shows up
- B appears
And when i get rid of B the same thing happens. This is annoying because there's a lot of flickering with no real purpose on the screen. Is there any way to achieve direct transition from A to B while keyguard is active without merging the 2 activities into 1?
Here is what i'm doing in onCreate for both activities:
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
And here is how i start the activity:
final Intent intent = new Intent(Sand.this, EditRule.class);
intent.putExtra(DB.KEY_PARENT_ID, id);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivityForResult(intent, 0);
overridePendingTransition(0, 0);
I also tried setting a null android:windowAnimationStyle in the activity theme but no luck.
UPDATE: i submitted this bug: https://code.google.com/p/android/issues/detail?id=68465&thanks=68465&ts=1397301860
Thanks, Teo