Skip to content
Commit 9e498372 authored by pioush.kumar-IN009423's avatar pioush.kumar-IN009423
Browse files

Youtube application when moving to PIP animation was very bad



Problem: {
    1. Start any new task with activity A
    2. From Activity A start new activity B. Finish A. B must be single task.
    3. B must be auto pip enabled. ( private final PictureInPictureParams.Builder mPipParamsBuilder = new PictureInPictureParams.Builder() .setAspectRatio(null); setPictureInPictureParams(mPipParamsBuilder.setAutoEnterEnabled(true).build()); )
    4. start activity C from B with flags { Intent intent = new Intent(MainActivity.this, com.example.pip.MainActivity.class); intent.addFlags(FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS|FLAG_ACTIVITY_PREVIOUS_IS_TOP); startActivity(intent); }
    5. B will move to PIP.
    6. Now press back key on C.
    7. Now open recents.
    8. Try to open same app.
    9. App will automatically close
}

Solution: {
        1. there are 2 tasks. One is PIP task and one is its parent task, in which dialog is opened.
        2. Parent task has a variable mPipChildActiivty which points to PIP activity and
        3. PIP task mLastParentBeforePip which points to Parent task. Both works in pairs
        4. But in this issue parent task is removed.
        5. But the mPipChildActiivty and mLastParentBeforePip are not dereferenced.
        6. Dereference the both variables when task is removed.
}

Bug: 265123000

Change-Id: Iccb6a101b6631eb6bc265ca30a299ced2ee2f5dd
Signed-off-by: default avatarpioush.kumar-IN009423 <pioush.kumar@oppo.com>
parent 5cd5d98e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment