Commit Graph

18374 Commits

Author SHA1 Message Date
Alex Johnston
451d4a697b Merge "Deprecate organization color" 2020-05-07 13:38:01 +00: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
Darryl Johnson
ff6c2812a2 Merge "Don't override activity display adjustments with app config" into rvc-dev am: ceb2befc1b
Change-Id: Id837346ceb71c7c2b330e3bac639df83a5301808
2020-05-01 23:26:15 +00:00
Darryl Johnson
ceb2befc1b Merge "Don't override activity display adjustments with app config" into rvc-dev 2020-05-01 23:05:10 +00:00
Garfield Tan
afa0de8a91 Notify when task changes requested orientation.
This allows listener know task's orientation request change before
handling display rotation through IDisplayWindowRotationController if
they can register a local TaskStackListener.

Bug: 150409355
Test: atest WmTests:TaskStackChangedListenerTest#testNotifyTaskRequestedOrientationChanged
Change-Id: Id7bfc3e63329ce26d454b7e9c143e084e04dd365
2020-05-01 12:52:46 -07:00
Andrew Sapperstein
88d565e7e7 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
2020-05-01 18:33:15 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
a296471054 Merge "Update inner class constructor refs to use proper syntax." 2020-05-01 18:00:05 +00:00
Dianne Hackborn
7d681bec7c Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev am: f55fbde1bd am: 0dc0c1971a am: 77afbab0f5 am: 5f21e77fbf
Change-Id: I40b1e5f5b4aa0809db242a3bff828d386dc7884e
2020-05-01 16:49:22 +00:00
Dianne Hackborn
0dc0c1971a Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev am: f55fbde1bd
Change-Id: I1cd032b49e67a291dac2b3eb1edac881229e3082
2020-05-01 16:03:51 +00:00
Dianne Hackborn
f55fbde1bd Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev 2020-05-01 15:49:51 +00:00
Abodunrinwa Toki
143b8a9762 Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde am: f58bd41b0e am: 5eb7265785 am: e076eb2584
Change-Id: I1781f9427954eebd5226ae7cea3170c96fe4de5c
2020-05-01 11:53:18 +00:00
Alex Johnston
76f073c016 Deprecate organization color
* Deprecate setOrganizationColor,
  setOrganizationColorAsUser,
  getOrganizationColor,
  getOrganizationColorAsUser
  from DevicePolicyManager.

Bug: 155464031
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I4ba476168cded62786113bae1db0fdaca0989484
2020-05-01 12:45:51 +01:00
Abodunrinwa Toki
5eb7265785 Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde am: f58bd41b0e
Change-Id: Id6192fc8dd949482fd3dc76a19a0a6aa40c39432
2020-05-01 11:18:27 +00:00
Abodunrinwa Toki
1b15228e8a Merge "Rewrite Icons from the TCS." into rvc-dev am: 1cf3ce8fde
Change-Id: If75f84e06e5be0650e82ce07bc58a0d5c09b7dfe
2020-05-01 11:12:54 +00:00
Abodunrinwa Toki
1cf3ce8fde Merge "Rewrite Icons from the TCS." into rvc-dev 2020-05-01 10:52:43 +00:00
TreeHugger Robot
91d226868b Merge "Add the IME insets to virtual display for bubble" into rvc-dev am: 75c82108f6 am: 4fa0ef1238 am: 05c7a93791 am: 5c48aef6e9
Change-Id: I83da92d549759c48869f0f2c555e3196b137fe80
2020-05-01 04:52:40 +00:00
TreeHugger Robot
4fa0ef1238 Merge "Add the IME insets to virtual display for bubble" into rvc-dev am: 75c82108f6
Change-Id: Ic4d3d31a5e332ca31cf85d0da380da9f19961810
2020-05-01 04:14:30 +00:00
TreeHugger Robot
75c82108f6 Merge "Add the IME insets to virtual display for bubble" into rvc-dev 2020-05-01 03:58:14 +00:00
Hongwei Wang
c3f2b2e418 Merge "Move PIP/MW mode callbacks to be on the client side" into rvc-dev am: 28c136e1cb am: 33e9c04263 am: 2cf2b18cc2 am: 512ab10e98
Change-Id: Ic905afba9ce3abe5bb4d114219b315a5605eb384
2020-05-01 00:51:44 +00:00
Dianne Hackborn
9106f2a73d Fix #155437855: "dumpsys activity" package filtering doesn't filter everything
Clean up various code paths to correctly use the "packageName" option to
limit its output to only information about that package.

Also do a little re-arranging of the output to cleanup a bit recent
stuff that was added, so the end of the output is still the important
high-level summary of process states.

Bug: 155437855
Test: manually inspected various "dumpsys activity" output.
Change-Id: I2ebe6f7ab3d433281993eb3959d375e2e53e0df9
2020-04-30 17:29:16 -07:00
Andrew Sapperstein
6b1e3188a3 Merge "Fix broken @see tags in public documentation." 2020-05-01 00:27:47 +00:00