Commit Graph

7066 Commits

Author SHA1 Message Date
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
Automerger Merge Worker
a227cf9b0f Merge "Add DSU default userdata partition size" am: 59d40857ad am: 026c077b36
Change-Id: Ib5a4835496c0c003f9ee1e4665adb1442f5cd3f2
2020-02-24 09:39:03 +00:00
Automerger Merge Worker
026c077b36 Merge "Add DSU default userdata partition size" am: 59d40857ad
Change-Id: I90d675f1ff0426c751b77442c6ce1c6e09fe6c72
2020-02-24 09:26:22 +00:00
Yo Chiang
f41e145480 Add DSU default userdata partition size
Use DEFAULT_USERDATA_SIZE as userdata partition size if the calling
Intent desn't specify the userdata size or the specified size is zero.

Bug: 145891687
Test: adb shell am start-activity \
  -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
  -a android.os.image.action.START_INSTALL \
  -d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip

Change-Id: I52767dfefef394403c5e16fcfd40792b14ff9a71
2020-02-24 15:06:56 +08:00
Automerger Merge Worker
893bf3b7f5 Merge "Improve BaseBundle#kindofEquals" am: 42ab50d14b am: 1f82fbb4ac
Change-Id: I0dadb4269692a86cab1c66e1c69d9a95bfddd9a2
2020-02-19 00:53:38 +00:00
Automerger Merge Worker
1f82fbb4ac Merge "Improve BaseBundle#kindofEquals" am: 42ab50d14b
Change-Id: Ic5c2c5bcf979236c77344d0507d071bbb83f624e
2020-02-19 00:33:09 +00:00
Treehugger Robot
42ab50d14b Merge "Improve BaseBundle#kindofEquals" 2020-02-18 23:56:30 +00:00
Treehugger Robot
0ed127a6b6 Merge "Add getAvbPublicKey to IDynamicSystemService" am: ecd7c440df am: d584bb1ef0
Change-Id: I6014b4ad6cf0bf6ee08ff999447625a89b522794
2020-02-18 13:03:44 +00:00
Treehugger Robot
d584bb1ef0 Merge "Add getAvbPublicKey to IDynamicSystemService" am: ecd7c440df
Change-Id: Id7554e8aa2ac376627a8181a1cb716fd53f53f22
2020-02-18 12:36:56 +00:00
Yo Chiang
d25e639b4e Add getAvbPublicKey to IDynamicSystemService
Wrapper for IGsiService::getAvbPublicKey()

Bug: 146418878
Test: Build pass
Change-Id: I67030bf0587297dc20e791c856c7373d473ae027
2020-02-18 18:32:44 +08:00
Suprabh Shukla
3b413dd57e Improve BaseBundle#kindofEquals
If both BaseBundles are empty, we can infer that without needing to
unparcel any of them.

Test: atest FrameworksCoreTests:android.os.BundleTest

Bug: 146037505
Change-Id: I04c28cdd1293227d9887b0c17e178f61328c1959
Merged-In: I04c28cdd1293227d9887b0c17e178f61328c1959
2020-02-14 14:05:00 -08:00
Automerger Merge Worker
2ddf24b6a8 Merge "Do not disable tracing in zygote." am: 88be2985c4 am: aee51d9eab
Change-Id: I8b6280d305ea53c5361442e4b7bb45aa164fb5d2
2020-02-13 16:20:06 +00:00