Commit Graph

19241 Commits

Author SHA1 Message Date
TreeHugger Robot
50260a9714 Merge "Suppress more error prone warnings that are false positives" 2020-10-26 21:16:49 +00:00
Eran Messeri
4f2f5f1547 Merge "Remove DO/PO "policy" from DeviceAdminInfo" 2020-10-26 20:36:06 +00:00
Ashwini Oruganti
9295e47189 Suppress more error prone warnings that are false positives
Bug: 160794467
Test: TH
Change-Id: I8fd2524c9841d5f7e36d987d762f9bc6c11c4216
2020-10-26 19:17:31 +00:00
Shuo Qian
9b0f817a13 Merge "Introduce new App Ops permission for 3rd-party InCallService" 2020-10-26 18:20:24 +00:00
Mariia Sandrikova
771dfa640b Merge "Move letterbox task positioning to LetterboxTaskListener." 2020-10-26 18:03:53 +00:00
TreeHugger Robot
764a15f7c7 Merge "Revert "Add STATE_USER_PROFILE_FINALIZED as an additional user state"" 2020-10-26 15:43:21 +00:00
Mariia Sandrikova
2d81132f30 Move letterbox task positioning to LetterboxTaskListener.
Changes:
- Introduce LetterboxTaskListerner
- Pass activity bounds and task position from WM Core to WM Shell
- Position a task from LetterboxTaskListener.

Fix: 170210431, 170213038, 168706428, 171549361
Test: go/wm-smoke
Test: atest ShellTaskOrganizerTests, LetterboxTaskListenerTest
Change-Id: I9c25b7fe1053900fe3b6eea8e71db302a0c14a5a
2020-10-26 15:42:32 +00:00
Antoan Angelov
7599f05cef Revert "Add STATE_USER_PROFILE_FINALIZED as an additional user state"
This reverts commit c000651999.

Reason for revert: This should be merged at the same time as the other feature CLs, otherwise the updated check will break without the not-yet-merged ManagedProvisioning changes

Change-Id: I54dec27a303d49f5b33230f001d041c05368be29
Fixes: 171674106
2020-10-26 13:35:53 +00:00
Winson Chung
fb314e008e Merge "1/ Add basic infra for global drag handling in the Shell" 2020-10-23 23:59:19 +00:00
Shuo Qian
334ab546e4 Introduce new App Ops permission for 3rd-party InCallService
This permission is intended to be used internally as a system App Ops permission, and let CompanionDeviceManager or RoleManager to grant with
users. If it is granted by user, the corresponding companion app has the ability to query the details of the ongoing calls, and also manage its life cycle.

Bug: 169595473
Test: atest ThirdPartyInCallServiceAppOpsPermissionTest
Change-Id: Ie0f790aab2edcd52cfdbded2630347b9f8dd4d49
2020-10-23 16:58:36 -07:00
Winson Chung
c932060175 1/ Add basic infra for global drag handling in the Shell
- Add private window flag INTERCEPT_GLOBAL_DRAG_AND_DROP (protected by
  MANAGE_ACTIVITY_STACKS permission) to be considered as a part of the
  normal flow for global drag and drops even if the window is not
  visible.  In addition, the window with the flag receives the clip
  data on DRAG_STARTED and the drag surface on DROP.  If the window
  consumes the drop, then it will relinquish cleanup of the drag surface
  from the system.
- Add MIMETYPE_APPLICATION_ACTIVITY for an app to report that they are
  starting a global drag of an activity. The associated data must
  include an intent with the pending intent and user to launch the
  activity for.
- Add a test drag handler on the shell end to receive the drag, setup a
  drag layout, and just launch the intent (for now).

Bug: 169894807
Test: atest DragDropControllerTest
Test: atest DragDropTest

Change-Id: I7f5cdca3cf515b693a8f1e507e90e22a670b5fa6
Merged-In: I7f5cdca3cf515b693a8f1e507e90e22a670b5fa6
Signed-off-by: Winson Chung <winsonc@google.com>
2020-10-23 20:00:19 +00:00
Eran Messeri
7d0becbcca Remove DO/PO "policy" from DeviceAdminInfo
Remove the USES_POLICY_DEVICE_OWNER and USES_POLICY_PROFILE_OWNER from
DeviceAdminInfo, and all the code referring to these constants.

This is to prevent callers calling getActiveAdminXXX variants which
take in the DO/PO constant, leading them to use getDeviceOwnerLocked,
getProfileOwnerLocked, etc.

The USES_POLICY_PROFILE_OWNER constant was particularly confusing because
it implied Device Owner was also acceptable for this "policy", which
was plain wrong in some cases.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest com.android.cts.devicepolicy.MixedDeviceOwnerTest com.android.cts.devicepolicy.MixedProfileOwnerTest
Change-Id: Ie78bb8a1948f29ac440f220e14f71b8a0f7f32e1
2020-10-23 16:33:24 +01:00
Julia Reynolds
61bf3a9e8e Support for "recent conversations"
- Provide some extra information needed to display conversations
and to create their conversation specific channels
- Uncache unmodified recent conversations after 10 days

Test: atest
Bug: 171191376
Change-Id: I33ddc2485d560b7252b99af02ed796b667ec02e7
2020-10-22 12:16:22 -04:00
Riddle Hsu
01d9fe8db3 Merge "Only rely on ActivityConfigurationChangeItem to update activity config" 2020-10-22 09:24:16 +00:00
Riddle Hsu
06ccd09f91 Only rely on ActivityConfigurationChangeItem to update activity config
This removes the legacy path that updates or set the pending activity
config when process config is changed. Since the handling of activity
config is separated, the legacy path from process config change almost
becomes no-op because the activity override config will dominate the
result of config difference.

This removal may also avoid the config change happened on unexpected
timing if the process registered to an activity as a config listener.
And the condition (in collectComponentCallbacks) for deciding whether
to deliver config to activity is not consistent with task manager
service on server side.

Bug: 171389102
Test: CtsWindowManagerDeviceTestCases:AppConfigurationTests
Change-Id: Ia4f9a9cc3538f5f419bdc9d125e2a930074e2f86
2020-10-22 13:23:22 +08:00
Louis Chang
187615a98b Merge "Skip notifying configuration changed for restarting activities" 2020-10-22 01:17:37 +00:00
Antoan Angelov
9810e057e9 Merge "Add STATE_USER_PROFILE_FINALIZED as an additional user state" 2020-10-21 20:16:46 +00:00
arangelov
c000651999 Add STATE_USER_PROFILE_FINALIZED as an additional user state
This will be used as an intermediate state after
STATE_USER_PROFILE_COMPLETE once the work profile has been created.

With the current admin-integrated flow refactoring changes,
the work profile will be finalized earlier than before.
Therefore, we add this new state so that SetupWizard
can differentiate between this state and STATE_USER_UNMANAGED.

Instead of the user states for work profile provisioning being
STATE_USER_UNMANAGED -> STATE_USER_PROFILE_COMPLETE ->
STATE_USER_UNMANAGED, they will now be STATE_USER_UNMANAGED ->
STATE_USER_PROFILE_COMPLETE -> STATE_USER_PROFILE_FINALIZED.

Note that CTS testing this API is infeasible, since it's
a system API and it requires the MANAGE_PROFILE_AND_DEVICE_OWNERS
signature permission which can't be granted to a CTS app.

Bug: 161402545
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest#testSetUserProvisioningState_managedProfileFromSetupWizard_primaryUser
Change-Id: I421d8ad431de6aef779a0b58b7f074ffc74dda48
2020-10-21 20:15:29 +00:00
Jeff DeCew
ddc2dcce49 Merge changes I6fd9aeec,I296e9d53
* changes:
  Minimize use of header in adjusting notification colors.
  Remove setExpanded from the NotificationHeaderView
2020-10-21 19:12:53 +00:00
Winson Chung
5c0e676957 Merge "Remove single task display path" 2020-10-21 17:09:17 +00:00
Winson Chung
d660f73a42 Remove single task display path
Test: atest TaskStackChangedListenerTest
Test: atest RecentTasksTest
Bug: 165794879
Change-Id: I4c86e58026be7bcbbd8a2568b396a281668b9385
2020-10-21 17:08:55 +00:00
Jeff Sharkey
1992cdb4de Merge changes from topic "oct16c"
* changes:
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStrings.
  Apply fixes for EfficientStringsChecker.
  Apply fixes for EfficientCollections.
  Trivial refactor for consistent naming.
  Expand formatSimple() to support widths.
  Refinement of EfficientStringsChecker.
2020-10-21 15:27:15 +00:00
Jeff DeCew
858ad2ac33 Minimize use of header in adjusting notification colors.
Also adds support for 'inverted' icons.

Test: atest SystemUITests
Test: manual testing of numerous notification configurations
Change-Id: I6fd9aeec9f5971495d514add2bbb30b50db7d3c1
2020-10-21 10:32:19 -04:00
Jeff DeCew
73e65d4291 Remove setExpanded from the NotificationHeaderView
Test: atest SystemUITests
Change-Id: I296e9d530d2c0ba581828dee0dc2026df0e38c3c
2020-10-21 09:57:07 -04:00
Louis Chang
368d86e6e7 Skip notifying configuration changed for restarting activities
Relaunching clients or scheduling configuration changes events
were not necessary since the activity is currently being started.

Bug: 170134300
Test: restart activity after process restarted and config changed
Change-Id: I1072c951d1db91bb6c41d6f19fd5dad4f674f089
2020-10-21 15:58:39 +08:00
Jeff Sharkey
c603ca2dd8 Apply fixes for EfficientStrings.
Refactoring to avoid StringBuffer synchronization overhead.

Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ibf843ed780c1202d5d96a11eaca889e592f19263
2020-10-20 22:00:20 -06:00
Jeff Sharkey
1c08f48253 Apply fixes for EfficientStringsChecker.
The recently-built Error Prone checker has found many instances where
we're always paying the cost of StringBuilder concatenation, even in
the typical cases where preconditions are successfully met.

Benchmarks have shown that even when replacing these with varargs
formatter strings, the default case is 20x faster.

Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If8c00bc73467bfb91ec16c162969c9d26ca53646
2020-10-20 22:00:16 -06:00
TreeHugger Robot
5e42bc3505 Merge "PendingIntent for permission slice should be immutable." 2020-10-20 19:42:43 +00:00
Pinyao Ting
606e6c440d PendingIntent for permission slice should be immutable.
Bug: 170769497
Test: manual
Change-Id: I9cfea119ae77327d56fda5513fc30d994ea1e11e
2020-10-20 10:37:53 -07:00
Anton Hansson
586a3cf229 Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-20 09:04:03 +01:00
Jeff DeCew
e12ff8a21c Remove the old seamless chip
Test: manual - play audio, use the real seamless chip
Change-Id: I0cc93c222dd6ae7bc3a823f27967d98fb39e8cd9
2020-10-16 15:15:34 -04:00
Jing Ji
1bc7222b15 Merge "Fix the value of RSS total in meminfo dump" 2020-10-16 17:12:55 +00:00
John Reck
44ca28c5c9 Remove some dead code
Simplify state by deleting unused & always true stuff

Test: builds
Change-Id: Idf679aff5e809e567dac21a127cb9d6ace894f0e
2020-10-16 13:53:05 +00:00
Jing Ji
a122ed8145 Fix the value of RSS total in meminfo dump
Bug: 171015766
Test: Manual - adb shell dumpsys meminfo com.android.systemui,
      verify the correctness of the RSS total
Change-Id: I21c7198cdad773adfced4b66257b9e01f1cffad2
2020-10-15 23:06:21 -07:00
Roman Kalukiewicz
34573d564a Merge "Add @Nullable annotation to the parameter of Object.equals() methods." 2020-10-16 01:25:15 +00:00
Wale Ogunwale
870354d967 Merge "Add launch cookie support to activities/tasks" 2020-10-15 22:47:12 +00:00
Wale Ogunwale
0227500a45 Add launch cookie support to activities/tasks
Allow callers to associate callbacks from WM containing TaskInfo with
activity launches they requested.

Bug: 129067201
Test: Bubbles works.
Change-Id: If43170d64d8aea0796d55fb480f5ee9c0465a696
2020-10-15 12:54:12 -07:00
TreeHugger Robot
47ca2ea1b0 Merge "Made CacheQuotaHint testable." 2020-10-15 18:44:02 +00:00
Roman Kalukiewicz
24403f7ef2 Add @Nullable annotation to the parameter of Object.equals() methods.
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.

The change was generated by running

find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'

in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.

Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
2020-10-15 10:48:01 -07:00
Lee Shombert
626323eb27 Merge "Enable in-process permission caches for system_server" 2020-10-15 15:37:03 +00:00
TreeHugger Robot
ab52125cc6 Merge "Migrate Presentation to WindowContext" 2020-10-15 05:57:03 +00:00
TreeHugger Robot
dd99181279 Merge "Suppress one off errorprone warnings for AndroidFrameworkPendingIntentMutability" 2020-10-15 01:14:33 +00:00
Ashwini Oruganti
ecd15ed9a9 Suppress one off errorprone warnings for AndroidFrameworkPendingIntentMutability
These are essentially false positives that are just taking the flags in
as an argument and passing that over to PendingIntent methods. This
change should clear up the noise.

Bug: 160794467
Test: Errorprone builds should no longer show these as violations
Exempt-From-Owner-Approval: Trivial warning suppression
Change-Id: I8ae309fd53140718d41f4d3b94f92e111cdd8955
2020-10-14 21:35:06 +00:00
Eugene Susla
4587809e21 Merge "Expose get/set notification listeners as a @SystemAPI" 2020-10-14 21:10:06 +00:00
Hall Liu
9f1a46639b Merge changes from topic "home-vis-listener"
* changes:
  Adapt to the new test-current.txt generator
  Expose the HomeVisibilityListener API
2020-10-14 16:59:47 +00:00
Winson Chung
13d990e697 Merge "Return the existing tasks when registering an organizer" 2020-10-14 15:45:19 +00:00
Rob Carr
6958abb97b Merge changes from topic "scaling-mode-cleanup"
* changes:
  SurfaceControl: Remove setOverrideScalingMode
  ScreenRotationAnimation: Use Surface#setScalingMode
  WindowManager: Remove windowsAreScaleable
2020-10-14 06:10:46 +00:00
Winson Chung
3f4c002e1f Return the existing tasks when registering an organizer
- Existing tasks for supported windowing modes are returned when
  registering the organizer and the organizer will not receive
  onTaskAppeared() for these tasks.  For now, the shell task
  organizer will keep these tasks for reporting task appeared when
  individual components add listeners for their windowing modes.
- Fixed some tests now that we organize fullscreen tasks

Bug: 162028888
Test: atest WindowOrganizerTests
Test: atest ShellTaskOrganizerTests
Change-Id: Iedc5f58fbfa819e753a5dcea7a8eb9dee8b6843b
2020-10-13 20:58:25 -07:00
Darryl Johnson
829b71b0f1 Merge "Add binder interface to DeviceStateManagerService." 2020-10-14 02:59:36 +00:00
Treehugger Robot
633529ac46 Merge "Do not send WTF when ETHERNET_SERVICE" am: f03005d5e0 am: e7e458954c am: 9ab252e8ed am: 85fd427b99
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1458804

Change-Id: Ied86b97532d214a7fac4de0393a9a18b07007c19
2020-10-14 02:24:47 +00:00