Commit Graph

18394 Commits

Author SHA1 Message Date
Mocy Sheng
35501e5b25 Merge "Fix nullable annotation to match overriden method in super class" 2020-05-12 13:00:27 +00:00
Charles Chen
805bc242e9 Merge "Introducee maxBounds in WindowConfiguration" 2020-05-12 10:42:47 +00:00
Riddle Hsu
5b198db82d Merge changes from topic "b147213487" into rvc-dev am: 8e726a2ef7 am: 2d42c72f14 am: bd9a3d97c6 am: 9f1ad6529f
Change-Id: Icaff9e75d20f5c9b5ae0b1afddb5985576bf9019
2020-05-12 10:13:03 +00:00
Riddle Hsu
2d42c72f14 Merge changes from topic "b147213487" into rvc-dev am: 8e726a2ef7
Change-Id: Ic8fbd04c2ae5bf57c76476639ad28dea1e560d27
2020-05-12 09:20:34 +00:00
Riddle Hsu
8e726a2ef7 Merge changes from topic "b147213487" into rvc-dev
* changes:
  Send fixed rotation adjustments to the associated client
  Add support to override display adjustments by token
  Add fixed rotation display adjustments
2020-05-12 09:05:17 +00:00
Hongwei Wang
24eed933a2 Merge "Set mIsInMultiWindowMode in activity creation" into rvc-dev am: 954820b047 am: 65404c8253 am: 3b55fc902f am: ae97d8bb76
Change-Id: I796093780d936558da49859c6f69e4623c545e69
2020-05-12 06:20:42 +00:00
Hongwei Wang
65404c8253 Merge "Set mIsInMultiWindowMode in activity creation" into rvc-dev am: 954820b047
Change-Id: I881c754d12e8ec25897ad230b97994aae0fc046e
2020-05-12 05:39:31 +00:00
Hongwei Wang
f7e5a23106 Set mIsInMultiWindowMode in activity creation
When an Activity is launched directly into split-screen mode, there
won't be any onMultiWindowModeChanged callback. Upon activity creation,
the current windowing mode should be part of the configuration, use
the windowing mode from that as initial values for both
isInPictureInPictureMode and isInMultiWindowMode.

Bug: 155811896
Bug: 156204380
Test: launch activity to split-screen secondary and verify
      isInMultiWindowMode in dumpsys
Change-Id: I6061a2d5687b68a981abcf8b184bfb007cdcf501
2020-05-11 18:03:55 -07:00
Tim Murray
27a1d00948 Merge "fix app binder tracing on userdebug builds" into rvc-dev am: 52d70eaa12 am: bc6fda94b2 am: 648a549d0b am: 592de6e335
Change-Id: Ieb5763c2a1dcf7972a4cb190a50da891c1249c43
2020-05-11 21:17:27 +00:00
Tim Murray
bc6fda94b2 Merge "fix app binder tracing on userdebug builds" into rvc-dev am: 52d70eaa12
Change-Id: Ib4f930c18eb434b698600dbdafc36daee79d98fc
2020-05-11 20:37:03 +00:00
Tim Murray
52d70eaa12 Merge "fix app binder tracing on userdebug builds" into rvc-dev 2020-05-11 20:20:03 +00:00
Mocy Sheng
ba61f71ff3 Fix nullable annotation to match overriden method in super class
Bug: 156238511
Test: Treehugger
Change-Id: I349e8628ea77d3051f40f903c3438c3fc0a489ea
2020-05-11 14:44:12 -05:00
Tim Murray
6d2b1bfe38 fix app binder tracing on userdebug builds
All apps are profileable on debuggable builds, so enable binder
tracing during app startup on debuggable builds if binder tracing has
already been enabled.

Test: binder tracing shows up for new apps on userdebug
Bug: 156259316
Change-Id: I8cc6c2f711943c21b54f346a23ba7089dc9c9180
2020-05-11 10:27:09 -07:00
Riddle Hsu
d490c57905 Send fixed rotation adjustments to the associated client
So the real information of display can be adjusted according
to the adjustments for the application started with fixed
rotation transform.

The enabling adjustments may be sent in different ways:
- Launch activity
  The information is bundled with LaunchActivityItem.
- Resume activity or update non-activity window
  Send a standalone FixedRotationAdjustmentsItem.

The disabling adjustments (null) are always sent by
FixedRotationAdjustmentsItem.

Bug: 147213487
Test: AppConfigurationTests#testRotatedInfoWithFixedRotationTransform
      TransactionParcelTests#testFixedRotationAdjustments

Change-Id: I5238888a5c8352db83fc12749f4de2bfabf46026
2020-05-11 22:17:03 +08:00
Riddle Hsu
e03b9669e3 Add support to override display adjustments by token
This is the bridge to link customized adjustments to an activity
or window token.

The DisplayAdjustments in ResourcesImpl is associated with
ResourcesKey. The new usage requires to associate with token.
That is why the new field is added in Resources.

Bug: 147213487
Test: atest ResourcesManagerTest#testOverrideDisplayAdjustments
Change-Id: Ie79c331654d564aee7af8c6ce98a4c72dd3132b1
2020-05-11 13:30:14 +08:00
Beverly Tai
1284caefec Merge "Add badge colors for dark theme" into rvc-dev am: 78a66d6c36 am: 3e2a0d2682 am: 1c1c47c972 am: c7914e7a94
Change-Id: I344d57b6ace676f599b0919890b9c0c035b062fd
2020-05-10 19:06:14 +00:00
Beverly Tai
3e2a0d2682 Merge "Add badge colors for dark theme" into rvc-dev am: 78a66d6c36
Change-Id: I7ad6f0991a78cfba9bcd77383309acb70a6fe89a
2020-05-10 18:19:47 +00:00
Beverly Tai
78a66d6c36 Merge "Add badge colors for dark theme" into rvc-dev 2020-05-10 18:10:15 +00:00
Charles Chen
32f14f0378 Introducee maxBounds in WindowConfiguration
This value is used to report WM#getMaximumWindowMetrics.
Current approach, which is use logical display metrics,
is not compatible with display area feature.
Especially, when multiple task display area feature
are phasing in.

Test: atest WindowConfigurationTests
Bug: 151414021

Change-Id: Iaa1f52395a1b7a0a7fefd5c31cfde703fa81f509
2020-05-07 22:42:15 +08:00
Alex Johnston
451d4a697b Merge "Deprecate organization color" 2020-05-07 13:38:01 +00:00
Beverly
2b4306a8ec Add badge colors for dark theme
Test: manual
Test: atest UserManagerTest#testProfileTypeInformation
Fixes: 149669756
Change-Id: Ib3fd377a4902bbe936d574dc52bac4eae6e25dd4
2020-05-07 09:20:19 -04:00
Hui Yu
290a50e950 Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev am: a6099ac785 am: 94fd91f864 am: 8cec6219e5 am: ed4c6c68fd
Change-Id: I969ead2c74ac88adc2a3ef7093a6ed58a3e1cc2b
2020-05-06 17:29:28 +00:00
Marco Ballesio
18f72ce98e ActivityManager API to check availability of app freezer am: 240bea3f47 am: 6efdd471ad am: 96408c9e08 am: 7eb6d93099
Change-Id: I09090f89c14d25c6d7a473a9e922d0763049217f
2020-05-06 17:27:55 +00:00
Hui Yu
94fd91f864 Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev am: a6099ac785
Change-Id: Ia04a9d5b4dbbceaa878c7d9e53ff5957aa1e3e20
2020-05-06 17:01:19 +00:00
Hui Yu
a6099ac785 Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev 2020-05-06 16:59:34 +00:00
Marco Ballesio
6efdd471ad ActivityManager API to check availability of app freezer am: 240bea3f47
Change-Id: If0374ae56edc195ced81ca48ad8cff4de55b3a14
2020-05-06 16:50:24 +00:00
Marco Ballesio
ce9b47859d Merge changes from topic "developer option for app freezer" into rvc-dev
* changes:
  Resources and strings for freezer settings
  Settings option to enable/disable the app freezer
  ActivityManager API to check availability of app freezer
2020-05-06 16:35:44 +00:00
Galia Peycheva
802233ad3e Merge "Add isDreaming method to DreamManager" into rvc-dev am: 95f8aba25e am: 96a580f73c am: ac5303faef am: 5e636a4bf6
Change-Id: I929b26b032f3bc08541ff869deaf04c4c3293275
2020-05-06 09:30:14 +00:00
Galia Peycheva
ac5303faef Merge "Add isDreaming method to DreamManager" into rvc-dev am: 95f8aba25e am: 96a580f73c
Change-Id: Id8965fb0f1ec21bfca2eda1656cb253623dcf504
2020-05-06 08:56:05 +00:00
Galia Peycheva
376b0200b7 Merge "Add isDreaming method to DreamManager" into rvc-dev am: 95f8aba25e
Change-Id: Iff2e5e2cdd023e97665508669b74594b0065800a
2020-05-06 08:40:11 +00:00
Galia Peycheva
95f8aba25e Merge "Add isDreaming method to DreamManager" into rvc-dev 2020-05-06 08:18:19 +00:00
Marco Ballesio
240bea3f47 ActivityManager API to check availability of app freezer
A method to verify the availability of the app freezer is required for
configuration code running in places like the Settings app

Bug: 155465196
Change-Id: I5779d263536091689a099eec0815f207dfbbf6ad
Test: verified its workings through the developer options CL
2020-05-05 15:22:43 -07:00
Galia Peycheva
e1903416bb Add isDreaming method to DreamManager
This CL adds isDreaming to DreamMaanger and changes the way it starts a
dream to use IDreamManager.dream()

DreamManager is only used for testing. So far it has been using the
DreamManagerInternal.testDream() API to start the dream. This restricts
the amount of verification that can be done in the dream tests because
it doesn't put the device in a dreaming state -
IDreamManager.isDreaming() is always false.
IDreamManager.dream() puts the device in a dreaming state and enables
better testing.

Bug: 152994058

Test: atest DreamManagerServiceTests
Change-Id: Id4d947e83eabcafa9724764b8d063357c5f2cb49
2020-05-05 21:59:24 +02:00
Adam Bookatz
d0b3845cad Merge "Listener to watch op starts" into rvc-dev am: 316bc6ff66 am: 2d3310ec59 am: 911b6104c8 am: fa8147715d
Change-Id: Ief89629b6100e140d0d081f401a78c4c8ce40baf
2020-05-05 01:53:29 +00:00
Adam Bookatz
911b6104c8 Merge "Listener to watch op starts" into rvc-dev am: 316bc6ff66 am: 2d3310ec59
Change-Id: I81143dc94dd471f4fdc32ad5881d3416ccd267e4
2020-05-05 01:21:53 +00:00
Adam Bookatz
9a7193540b Merge "Listener to watch op starts" into rvc-dev am: 316bc6ff66
Change-Id: Ibfb5fa140c85c8548096993e9228eb917ab1487e
2020-05-05 01:05:07 +00:00
Adam Bookatz
182862e595 Listener to watch op starts
Currently, there is
onOpNoted - tells listeners that noteOp has occurred
onOpActiveChanged - tells listeners that an op's 'active' state has
changed, i.e. that a successfull startOp or stopOp has happened

There was, however, no way of telling a listener that a startOp has
happened (regardless of whether it was successful). This cl introduces
it, via a OnOpStartedListener.

This is required by the ForegroundServiceAppOpSessionEnded atom,
which counts the number of accepted vs. rejected attempts, and
therefore also needs to know when a rejected start happened.

This cl also contains some cosmetic moving of code so that
startOperation() and noteOperationImpl() are almost
exactly parallel.

* Also *
This cl fixes a bug I discovered in stopWatchingNoted, in which
the callback wasn't fully removed. Consequently, if a callback
was unregistered and then re-registered, the re-registration would
mistakingly be ignored (in direct contradiction to the javadoc).

Test: atest UidAtomTests#testForegroundServiceAccessAppOp
Test: atest AppOpsStartedWatcherTest AppOpsActiveWatcherTest AppOpsNotedWatcherTest
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\(256\)'
Bug: 152800926
Change-Id: Icdb9edf6b2b7c5807b339c1aabb32e882190b071
2020-05-04 21:59:29 +00:00
Hui Yu
3e376ab5d1 Revert "Add isUidActiveOrForeground() for camera/audio to use."
Revert "Add isUidActiveOrForeground for camera/audio to use."

Revert submission 10829580-isUidForeground

Reason for revert: In CameraService.cpp, before this change, around "am.isUidActive", there was up to 300 ms retry. After this change, the code could move forward fast without retry, but at "mAppOpsManager->startOpNoThrow" call, for the same reason as uid is not updated fast enough, "mAppOpsManager->startOpNoThrow" could also fail.

This CL does not really fix the root cause, but it changes the timing and now the code fails at "mAppOpsManager->startOpNoThrow" call.

Also the timing change may also cause recent multiple CTS test failures.

Bug: 154570809, 155032617, 154849083


Reverted Changes:
Iffed63293:Add isUidActiveOrForeground() for camera/audio to ...
I3685e0c8d:Add isUidActiveOrForeground() for camera/audio to ...
I51ed1fe78:Add isUidActiveOrForeground for camera/audio to us...

Change-Id: I07cbf45949d14489404cb304c80c9ba4276ebe63
2020-05-04 18:07:16 +00:00
Garfield Tan
c461dd36c1 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev am: abe5a4f3f5 am: 9c23045bbb am: f0905bc532 am: af058c74e4
Change-Id: I9750bd5a7d61e0b89fd241c2b1e149e113f5c2bb
2020-05-02 01:19:18 +00:00
Andrew Sapperstein
26410036c0 Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev am: 975ca816ec am: 6fd486eeec
Change-Id: I1d15205acdab14710e00196dd126fb46187cc0bb
2020-05-02 00:46:01 +00:00
Andrew Sapperstein
e6790083a4 Fix broken @see tags in public documentation. am: 8fe35e5f21 am: 1ba3a59941
Change-Id: I889d786482befe047f9666f28eb882a7dea3148b
2020-05-02 00:45:55 +00:00
Garfield Tan
f0905bc532 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev am: abe5a4f3f5 am: 9c23045bbb
Change-Id: Ic6662252b07b7df86a322db8f11d6d0babc05330
2020-05-02 00:45:12 +00:00
Andrew Sapperstein
3b0ca2b358 Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev am: 975ca816ec
Change-Id: I30efa4f3aefc466e138541b34ae8901005ee9902
2020-05-02 00:36:11 +00:00
Andrew Sapperstein
f181c2f44b Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ic95104f61b736d05f18c7465e77951771f39fcbf
2020-05-02 00:36:07 +00:00
Garfield Tan
5093027291 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev am: abe5a4f3f5
Change-Id: I8e7841c4f9203c5495f1b59d7d7b55a4cb4742a1
2020-05-02 00:34:48 +00:00
Andrew Sapperstein
1ba3a59941 Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ie98055acbc2afeb2c0a8f578161bde02d9dc615d
2020-05-02 00:29:34 +00:00
Andrew Sapperstein
975ca816ec Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev
* changes:
  Update inner class constructor refs to use proper syntax.
  Fix broken @see tags in public documentation.
2020-05-02 00:21:33 +00:00
Garfield Tan
abe5a4f3f5 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev
* changes:
  Remove TaskRecordFactory.
  Notify when task changes requested orientation.
2020-05-02 00:10:29 +00:00
Darryl Johnson
846899c23f Merge "Don't override activity display adjustments with app config" into rvc-dev am: ceb2befc1b am: c7a318285d am: 9a8414e36b am: 0ddc6d6d4d
Change-Id: I946a878e36af79cd4849865af380462eaeedef06
2020-05-02 00:05:49 +00:00
Darryl Johnson
9a8414e36b Merge "Don't override activity display adjustments with app config" into rvc-dev am: ceb2befc1b am: c7a318285d
Change-Id: Ib84b70f5ecf47c3d5d269ba9d83a73063ab2ecf4
2020-05-01 23:27:14 +00:00