Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
24060272
Commit
24060272
authored
4 years ago
by
Hongwei Wang
Committed by
Android (Google) Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Do not reset shelf offset during fixed rotation" into rvc-dev
parents
34de8478
71eea489
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+26
-10
26 additions, 10 deletions
...stemUI/src/com/android/systemui/pip/phone/PipManager.java
with
26 additions
and
10 deletions
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+
26
−
10
View file @
24060272
...
...
@@ -44,7 +44,6 @@ import com.android.systemui.broadcast.BroadcastDispatcher;
import
com.android.systemui.pip.BasePipManager
;
import
com.android.systemui.pip.PipBoundsHandler
;
import
com.android.systemui.pip.PipSnapAlgorithm
;
import
com.android.systemui.pip.PipSurfaceTransactionHelper
;
import
com.android.systemui.pip.PipTaskOrganizer
;
import
com.android.systemui.shared.recents.IPinnedStackAnimationListener
;
import
com.android.systemui.shared.system.ActivityManagerWrapper
;
...
...
@@ -52,7 +51,6 @@ import com.android.systemui.shared.system.InputConsumerController;
import
com.android.systemui.shared.system.PinnedStackListenerForwarder.PinnedStackListener
;
import
com.android.systemui.shared.system.TaskStackChangeListener
;
import
com.android.systemui.shared.system.WindowManagerWrapper
;
import
com.android.systemui.stackdivider.Divider
;
import
com.android.systemui.util.DeviceConfigProxy
;
import
com.android.systemui.util.FloatingContentCoordinator
;
import
com.android.systemui.wm.DisplayChangeController
;
...
...
@@ -86,6 +84,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
private
PipTouchHandler
mTouchHandler
;
private
PipAppOpsListener
mAppOpsListener
;
private
IPinnedStackAnimationListener
mPinnedStackAnimationRecentsListener
;
private
boolean
mIsInFixedRotation
;
protected
PipTaskOrganizer
mPipTaskOrganizer
;
...
...
@@ -104,17 +103,35 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
mPipTaskOrganizer
.
getLastReportedBounds
(),
mTmpInsetBounds
);
// The bounds are being applied to a specific snap fraction, so reset any known offsets
// for the previous orientation before updating the movement bounds
mPipBoundsHandler
.
setShelfHeight
(
false
,
0
);
mPipBoundsHandler
.
onImeVisibilityChanged
(
false
,
0
);
mTouchHandler
.
onShelfVisibilityChanged
(
false
,
0
);
mTouchHandler
.
onImeVisibilityChanged
(
false
,
0
);
// for the previous orientation before updating the movement bounds.
// We perform the resets if and only if this callback is due to screen rotation but
// not during the fixed rotation. In fixed rotation case, app is about to enter PiP
// and we need the offsets preserved to calculate the destination bounds.
if
(!
mIsInFixedRotation
)
{
mPipBoundsHandler
.
setShelfHeight
(
false
,
0
);
mPipBoundsHandler
.
onImeVisibilityChanged
(
false
,
0
);
mTouchHandler
.
onShelfVisibilityChanged
(
false
,
0
);
mTouchHandler
.
onImeVisibilityChanged
(
false
,
0
);
}
updateMovementBounds
(
mTmpNormalBounds
,
true
/* fromRotation */
,
false
/* fromImeAdjustment */
,
false
/* fromShelfAdjustment */
);
}
};
private
DisplayController
.
OnDisplaysChangedListener
mFixedRotationListener
=
new
DisplayController
.
OnDisplaysChangedListener
()
{
@Override
public
void
onFixedRotationStarted
(
int
displayId
,
int
newRotation
)
{
mIsInFixedRotation
=
true
;
}
@Override
public
void
onFixedRotationFinished
(
int
displayId
)
{
mIsInFixedRotation
=
false
;
}
};
/**
* Handler for system task stack changes.
*/
...
...
@@ -212,9 +229,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
DeviceConfigProxy
deviceConfig
,
PipBoundsHandler
pipBoundsHandler
,
PipSnapAlgorithm
pipSnapAlgorithm
,
PipTaskOrganizer
pipTaskOrganizer
,
PipSurfaceTransactionHelper
surfaceTransactionHelper
,
Divider
divider
)
{
PipTaskOrganizer
pipTaskOrganizer
)
{
mContext
=
context
;
mActivityManager
=
ActivityManager
.
getService
();
...
...
@@ -239,6 +254,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
mAppOpsListener
=
new
PipAppOpsListener
(
context
,
mActivityManager
,
mTouchHandler
.
getMotionHelper
());
displayController
.
addDisplayChangingController
(
mRotationController
);
displayController
.
addDisplayWindowListener
(
mFixedRotationListener
);
// Ensure that we have the display info in case we get calls to update the bounds before the
// listener calls back
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment