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
06341ecb
Commit
06341ecb
authored
1 year ago
by
Toshiki Kikuchi
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Allow Task#setDragResizing on W_M_MULTI_WINDOW" into main
parents
121a0b3d
2970ffce
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
services/core/java/com/android/server/wm/Task.java
+1
-1
1 addition, 1 deletion
services/core/java/com/android/server/wm/Task.java
services/tests/wmtests/src/com/android/server/wm/TaskTests.java
+29
-0
29 additions, 0 deletions
...es/tests/wmtests/src/com/android/server/wm/TaskTests.java
with
30 additions
and
1 deletion
services/core/java/com/android/server/wm/Task.java
+
1
−
1
View file @
06341ecb
...
...
@@ -2909,7 +2909,7 @@ class Task extends TaskFragment {
if
(
mDragResizing
!=
dragResizing
)
{
// No need to check if allowed if it's leaving dragResize
if
(
dragResizing
&&
!(
getRootTask
().
getWindow
ingMode
()
==
WINDOWING_MODE_FREEFORM
))
{
&&
!(
getRootTask
().
getWindow
Configuration
().
canResizeTask
()
))
{
Slog
.
e
(
TAG
,
"Drag resize isn't allowed for root task id="
+
getRootTaskId
());
return
;
}
...
...
This diff is collapsed.
Click to expand it.
services/tests/wmtests/src/com/android/server/wm/TaskTests.java
+
29
−
0
View file @
06341ecb
...
...
@@ -1583,6 +1583,35 @@ public class TaskTests extends WindowTestsBase {
task
.
getTopChild
());
}
@Test
public
void
testSetDragResizing
()
{
final
Task
task
=
createTask
(
mDisplayContent
);
// Allowed for freeform.
task
.
setWindowingMode
(
WINDOWING_MODE_FREEFORM
);
task
.
setDragResizing
(
true
);
assertTrue
(
task
.
isDragResizing
());
task
.
setDragResizing
(
false
);
assertFalse
(
task
.
isDragResizing
());
// Allowed for multi-window.
task
.
setWindowingMode
(
WINDOWING_MODE_MULTI_WINDOW
);
task
.
setDragResizing
(
true
);
assertTrue
(
task
.
isDragResizing
());
task
.
setDragResizing
(
false
);
assertFalse
(
task
.
isDragResizing
());
// Disallowed for fullscreen.
task
.
setWindowingMode
(
WINDOWING_MODE_FULLSCREEN
);
task
.
setDragResizing
(
true
);
assertFalse
(
task
.
isDragResizing
());
task
.
setDragResizing
(
false
);
assertFalse
(
task
.
isDragResizing
());
}
private
Task
getTestTask
()
{
return
new
TaskBuilder
(
mSupervisor
).
setCreateActivity
(
true
).
build
();
}
...
...
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