Commit Graph

7078 Commits

Author SHA1 Message Date
Andrew Sapperstein
23d5746e06 Fix broken @see tags in public documentation. am: 1f6e22cbd8
Change-Id: I04a78c9ba3770a4d651177aae697890094a52add
2020-05-05 21:12:04 +00:00
Andrew Sapperstein
1f6e22cbd8 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
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-05-01 00:42:22 +00:00
Treehugger Robot
edc94080d9 Merge "API to get hardware variant (SKU)" am: c042e44813
Change-Id: I82d12a6808ab8b178d3aee75a99ebd9c8fc7189c
2020-04-29 21:32:17 +00:00
Treehugger Robot
c042e44813 Merge "API to get hardware variant (SKU)" 2020-04-29 21:29:37 +00:00
Treehugger Robot
c451ad69d1 Merge "Update cleanupAppliedPayload comment." am: 14c78c2a55
Change-Id: I283fec0c9058d279b47f1c664005546eb8550ede
2020-04-28 21:33:02 +00:00
Treehugger Robot
14c78c2a55 Merge "Update cleanupAppliedPayload comment." 2020-04-28 21:16:24 +00:00
Yifan Hong
d3abb6d385 Update cleanupAppliedPayload comment.
ServiceSpecificException might be thrown, but it is not
actionable by the caller. Hence hide the comment.

Fixes: 151156841
Test: none
Change-Id: I07836fe2c5cc361fa81f6fc24851ad2b0721591b
2020-04-27 13:30:09 -07:00
Robin Lee
18556095b9 API to get hardware variant (SKU)
Bug: 151157621
Test: atest android.os.cts.BuildTest
Change-Id: I39b97f5ca3db25724bc50e7f0bbd177f6dc8cc02
2020-04-27 18:54:04 +00:00
Nikita Ioffe
a3fd43040b Merge "Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()" am: d8f9951f21
Change-Id: I35e5111b5db8be175c85032a90c82336ff9373be
2020-04-09 18:28:37 +00:00
Nikita Ioffe
cca499411f Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.

Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.

Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.

Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
Merged-In: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
(cherry picked from commit 57300d9057)
2020-04-09 17:56:25 +01:00
Xin Li
ab1261dddc DO NOT MERGE - Merge QQ2A.200405.005 into master
Bug: 150877681
Change-Id: Iacdd23c38aef7ff04c5d289720318d41cbf18158
Merged-In: I9265f01ed2f6e4aca7728d278f06ceea5633dac5
2020-04-07 15:13:00 -07:00
Treehugger Robot
2238c3f118 Merge "Include exception as cause of BadParcelableException" am: 9b88b3732d
Change-Id: I2e79f0c5cef6aab068e290c5682847142c9eb939
2020-04-03 18:51:21 +00:00
Treehugger Robot
9b88b3732d Merge "Include exception as cause of BadParcelableException" 2020-04-03 18:37:25 +00:00
Eugene Susla
9cdea35a61 Merge "Prevent HandlerThread from losing interrupted flag" am: f86d2fb44d
Change-Id: I8277cd9ce4a5ad03228ed8f351acd3d0e7892fdc
2020-04-03 17:14:40 +00:00
Eugene Susla
f86d2fb44d Merge "Prevent HandlerThread from losing interrupted flag" 2020-04-03 16:58:18 +00:00
Charles Munger
368949c23a Include exception as cause of BadParcelableException
Bug: 136208613
Test: Improved error message
Change-Id: I31404ef67f3b3c8788bd5b83ac5db94279f50f7c
2020-04-02 20:25:22 +00:00
Steven Moreland
f276d0b74d Merge "Document linkToDeath behavior on object cleanup." am: 2608950d10
Change-Id: I3c8a4f9f4da3aff87fa1f1e1fff0e016f1ec4cad
2020-04-01 18:57:19 +00:00
Steven Moreland
2608950d10 Merge "Document linkToDeath behavior on object cleanup." 2020-04-01 18:35:05 +00:00
Nikita Ioffe
ece1219eb9 Merge "Make init.userspace_reboot.is_supported a rw property" am: 67ee6aeb9e
Change-Id: I4ee415f6ee67ad88e6035fae5d7850e0933c1dd6
2020-04-01 13:32:15 +00:00
Mohammad Samiul Islam
aa0cebd8a4 Prevent staging multiple sessions on devices not supporting checkpoint am: 8c7142a658
Change-Id: I42c180ae216777624b4ad204466f0f64fccecbb9
2020-04-01 13:31:05 +00:00
Nikita Ioffe
67ee6aeb9e Merge "Make init.userspace_reboot.is_supported a rw property" 2020-04-01 13:14:22 +00:00
Mohammad Islam
cf2865a167 Merge changes from topics "abort-individual-session", "apk-checkpoint", "rebrand-to-revert", "supportsCheckPoint"
* changes:
  Enable filesystem checkpoint for staged apk installation
  Allow staging multiple sessions with non-overlapping packages (apk+apex)
  Replace abortActiveSession in StagingManager with revertActiveSessions
  Allow StagingManager to abort individual staged session
  Prevent staging multiple sessions on devices not supporting checkpoint
  Rebrand the term "rollback" to "revert" for apexd
2020-04-01 13:05:58 +00:00
Steven Moreland
16687cbce9 Document linkToDeath behavior on object cleanup.
In Java, this has always been the case, but it wasn't documented.

Bug: 152627219
Test: n/A
Change-Id: I8d93d2876bac8f16101a30afdf06699ece653d25
2020-03-31 14:22:13 -07:00
Nikita Ioffe
24e2259e5d Make init.userspace_reboot.is_supported a rw property
General recommendation is to avoid read-only properties, and instead control
"read-onlines" by only allowing init/vendor_init to set the property.

Since ro.init.userspace_reboot.is_supported was added in this release, and
nobody outside of the platform is querying it directly, it should be fine to
simply rename it.

Test: adb shell getprop init.userspace_reboot.is_supported
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I31b9ac7f2c92ce82664a0266aea62faa2bdd365f
2020-03-30 23:43:47 +01:00
Nikita Ioffe
8a6760b55c Merge "pm install-commit supports waiting for staged session to be ready" am: 1886454c78
Change-Id: Ide53b18b7c32d2dec5bd76cc4f39df65ccd2027e
2020-03-30 22:29:03 +00:00
Nikita Ioffe
87847be695 pm install-commit supports waiting for staged session to be ready
This change allows callers of adb install-multi-package to benefit from
--wait flag which will wait for the pre-installed verification of staged
sessions.

Test: atest PackageManagerShellCommandTest
Test: adb install-multi-package tzdata.apex shim.apex
Bug: 147694315
Change-Id: Ia356c4dff635ec230eb505fb400913c76ec84042
Merged-In: Ia356c4dff635ec230eb505fb400913c76ec84042
(cherry picked from commit 13973e1d89)
2020-03-28 19:28:01 +00:00
Mohammad Samiul Islam
8c7142a658 Prevent staging multiple sessions on devices not supporting checkpoint
Bug: 141843321
Test: atest StagedInstallTest#testFailStagingMultipleSessionsIfNoCheckPoint
Change-Id: I118ae628649e9bef82641ef18841205091e98a6a
Merged-In: I118ae628649e9bef82641ef18841205091e98a6a
(cherry picked from commit cc4c7d8cc6)
2020-03-26 10:41:19 +00:00
Yurii Zubrytskyi
793b42f6a2 Merge "Port the current code to new IncFS" am: e2ce10ceeb
Change-Id: I69f9529d94f680e757393b232a0671ce81fd5875
2020-03-26 07:33:56 +00:00
Yurii Zubrytskyi
12817bbbc3 Port the current code to new IncFS
Bug: 146080380
Test: manual, "cmd incremental install-start"

Change-Id: I6761c3f0e58b6d4de1ae3c4b31c23204fba9f740
Merged-In: I6761c3f0e58b6d4de1ae3c4b31c23204fba9f740
2020-03-24 14:02:44 -07:00
Michael Hoogasian
be9f42d836 Prevent HandlerThread from losing interrupted flag
I spent forever trying to figure out why one of my threads was losing its
interrupted flag, and eventually chased the problem to this. This change
keeps the behavior of blocking until the looper is intialized (i.e, any
InterruptedExceptions are still eaten), BUT it will restore the thread's
interrupted flag before returning, if needed.

Test: calling getLooper() from a thread with the interrupted flag set, then
verifying that the interrupted flag was still set after the call returned.

Change-Id: If1b1a0812fa672c02510b70faf4d813b82ae8589
Signed-off-by: Michael Hoogasian <michael.hoogasian@gmail.com>
2020-03-23 14:41:04 -04:00
Xin Li
3f0bfe4608 DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master
Bug: 151763422
Change-Id: I62d3293f617f630d3d2a3d5f67b764bf272769bf
2020-03-19 10:10:35 -07:00
sqian
a64f352596 API Council Feedbacks
1) Add Annotation for getCarrirPrivilegeStatus
2) Remove NullProinterException throwing in isDataConnectionAllowed
3) Add SdkConstant for ACTION_UPDATE_EMRGENCY_NUMBER_DB

Test: Treehugger
Bug: 148218347
Bug: 151455822
Change-Id: I4943491abf70641f9379862a67941295a4cf67f9
Merged-In: I4943491abf70641f9379862a67941295a4cf67f9
(cherry picked from commit 43c2f470ed)
2020-03-18 18:28:21 +00:00
Automerger Merge Worker
35a5b33540 Merge "Add method in Handler to remove messages with equal object" am: 36216f6f23 am: ed0ddab0d7
Change-Id: I6edcb322c66c7ceaee0e595fba2bec6e0674f4a3
2020-03-17 02:13:01 +00:00
Treehugger Robot
36216f6f23 Merge "Add method in Handler to remove messages with equal object" 2020-03-17 01:42:01 +00:00
fengjinlan
f30f5a3b9f Add method in Handler to remove messages with equal object
Change-Id: Ibae80f5008df54f4ac8544abb4cc5863ea3db86d
Signed-off-by: fengjinlan <fengjinlan@xiaomi.com>
2020-03-17 00:01:42 +00:00
Automerger Merge Worker
2b468ede41 API Council Feedbacks am: 9ae1afee27 am: f4ed9f5712
Change-Id: I4d0f0e5967942052a1333a518eb07531294fe084
2020-03-11 20:31:06 +00:00
Shuo Qian
9ae1afee27 API Council Feedbacks
1) Update doc of ACTION_UPDATE_EMERGENCY_NUMBER_DB
2) Add new APIs EXTRA_VERSION and EXTRA_REQUIRED_HASH
3) Rename isDataConnectionEnabled to IsDataConnectionAllowed
4) Format the API documentations with html format
5) Throw errors for shutdownAllRadios, isAnyRadioPoweredOn
6) Modify the doc of TelephonyManager.getEmergencyNumberDbVersion
7) Add UPDATE_CONFIG permission for ACTION_UPDATE_EMERGENCY_NUMBER_DB

Test: Treehugger; Manual made a call; make -j offline-sdk-docs
Bug: 147696692
Bug: 147805285
Bug: 148217670
Bug: 148218347
Change-Id: Idf3dee3de5ebf75ca8b8fbaaf879e69f7ae4b754
Merged-In: Idf3dee3de5ebf75ca8b8fbaaf879e69f7ae4b754
(cherry picked from commit dc86120fca)
2020-03-10 21:53:36 +00:00
Automerger Merge Worker
79a6a980f6 Merge "Adds Zygote policy flags to control how applications are launched" am: 335db814a5 am: 18fd9af1af
Change-Id: I75ecb13c426316ddbf0262f0bc41281365a1524d
2020-03-06 14:03:07 +00:00
Treehugger Robot
335db814a5 Merge "Adds Zygote policy flags to control how applications are launched" 2020-03-06 13:34:33 +00:00
Automerger Merge Worker
cea8b633f9 Merge "Clarify getCallingPid for oneway transactions." am: 26bbd81bd6 am: 79e3174053
Change-Id: I3e06faac78e6d864f1514876f4eb54fb7a522da5
2020-03-06 00:42:15 +00:00
Steven Moreland
26bbd81bd6 Merge "Clarify getCallingPid for oneway transactions." 2020-03-05 20:48:07 +00:00
Steven Moreland
61c5f8e68b Clarify getCallingPid for oneway transactions.
Seems this frequent gotcha is not documented here.

Bug: N/A
Test: N/A
Change-Id: Ia186cd8b9945b75b8342b0750713d8667cfef064
2020-03-05 19:20:37 +00:00
Automerger Merge Worker
bda3645a88 Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29 am: a339e2def4
Change-Id: Ia0243dcb9185d2b7c53429d5a5312e3a9065ddea
2020-03-05 17:17:10 +00:00
Automerger Merge Worker
a339e2def4 Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29
Change-Id: I9ff3ddc4dbf17d8d6401fc7c14ee8b16d7aafb2b
2020-03-05 17:00:50 +00:00
Yifan Hong
54aba47b29 Merge "UpdateEngine: fix cleanupAppliedPayload impl" 2020-03-05 16:41:16 +00:00
Automerger Merge Worker
2ee8512bfa Merge "Start process of next activity with top priority in advance" am: efbcd6752d am: 627bfca085
Change-Id: Ifb4da995dab885689f50dcf9890e64f8082194b0
2020-03-05 00:05:36 +00:00
Automerger Merge Worker
627bfca085 Merge "Start process of next activity with top priority in advance" am: efbcd6752d
Change-Id: I8e8dd0f20cd3a783e49468a7657e571812bca3eb
2020-03-04 23:54:10 +00:00
Chris Wailes
d0b322c5d2 Adds Zygote policy flags to control how applications are launched
This patch adds a zygote policy parameter to functions in the
ActivityManagerService (and associated classes) to allow for different
launch behavior based on the triggering event.  This will allow for
latency sensitive applications to utilize the Unspecialized App Process
Pool, without other processes draining the pool and causing excessive
refill events.

Test: Booted and launched several apps
Bug: 147613193
Bug: 146614089
Change-Id: Ib0a51c8720f95a7eafcab4ad2b5bb08f27a58d8c
Merged-In: Ib0a51c8720f95a7eafcab4ad2b5bb08f27a58d8c
(cherry picked from commit 4d05188588)
2020-03-04 13:29:39 -08:00
Riddle Hsu
364f2500e5 Start process of next activity with top priority in advance
In common cases, to resume the next activity we need to wait for the
current one to be paused. Since starting a process for activity is
asynchronous, if we already know the process of next activity has not
started yet, we can start the process earlier so the time waiting for
the pause to complete can be saved.

Also if the launching activity is going to be the top app, we can set
the top schedule group right after its process is started so the start
time before actually launching the activity can be improved.

Although before the current activity is paused, the next top activity
may still change and results some empty processes. That should not be
a common case and the process is still useful when going back the stack,
and the empty background processes are easier to be reclaimed.

Bug: 123043091
Test: AppLaunchTest
Test: Launch calculator from launcher, the event log am_proc_start will
      show "pre-top-activity".
Test: Cold launch a top activity, the system log should not show
      "not expected top priority".
Test: Use startActivities to start serveral activities in a sequence.
      Check "adb shell cat /proc/$pid/task/$pid/cgroup" for each process.
      Only the last one has top-app, others are background.

Change-Id: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
Merged-In: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
2020-03-03 16:36:46 -08:00
Yifan Hong
a962ca6700 UpdateEngine: fix cleanupAppliedPayload impl
IUpdateEngine.cleanupSuccessfulUpdate is now asynchronous with a callback.
Update UpdateEngine.cleanupAppliedPayload accordingly to use the new impl.

Bug: 147696014
Test: apply OTA
Change-Id: I9b308316dcb8e6a507063d3060fed7693da82a19
2020-03-03 12:13:10 -08:00