Commit Graph

7095 Commits

Author SHA1 Message Date
Steven Moreland
5f9914e6b1 HwBinder.setTrebleTestingOverride
To replace usages of environment variable TREBLE_TESTING_OVERRIDE which
is problematic for some clients using setenv in a multi-threaded
environment.

Bug: 156668058
Test: hidl_test_java
Change-Id: I7f7c51b9cfb01a81941154dc406a599cc6edd151
2020-07-08 18:03:34 +00:00
Nicolas Geoffray
ebe415b310 Merge "Remove unused / unimplemented CorePlatformAPI methods." 2020-07-02 10:44:44 +00:00
Nicolas Geoffray
1ce94d5409 Remove unused / unimplemented CorePlatformAPI methods.
Test: m
Bug: 154796679
Change-Id: I7dc1ad23894c8067c3d7bfb7dab526e7f2596918
2020-06-30 13:17:15 +01:00
Luke Huang
3cd122f485 Disable sockets and DNS if process lacks INTERNET permission.
This is a Client-only solution.
  - Add to NetdClient a per-process std::atomic_boolean
    similar to netIdForProcess and netIdForResolv.
  - The boolean says whether the process should be
    allowed Internet connectivity.
  - Add an @hide method to NetUtils.java to set the boolean;
    call it from the initialization code of the new
    process just after forking from zygote.
  - Make netdClientSocket and dnsOpenProxy check the
    boolean. If the boolean is false, return EPERM from
    socket calls.

Bug: 150028556
Test: atest NetworkUtilsTest
Test: atest CtsAppSecurityHostTestCases:UseProcessTest
(cherry-pick from internal branch, ag/11881939)
Merged-In: If002280fbad493dfc2db3d9d505c0257d49a9056
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
2020-06-24 11:58:57 +00:00
Treehugger Robot
5dbd259527 Merge "Use device SKU for Build.SKU instead of product/odm SKU" am: d1acd32722
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318696

Change-Id: Ida9865813088b5b1c6a0d0a728acb93dbe75cfda
2020-06-02 21:01:22 +00:00
Treehugger Robot
d1acd32722 Merge "Use device SKU for Build.SKU instead of product/odm SKU" 2020-06-02 20:48:33 +00:00
Treehugger Robot
841a116b7e Merge "Add ParcelableHolder type" am: 7d2fc62868
Change-Id: If7258d57ff14020c3127aa7eadd892ed51301cd4
2020-05-29 21:42:41 +00:00
Treehugger Robot
7d2fc62868 Merge "Add ParcelableHolder type" 2020-05-29 04:05:46 +00:00
Robin Lee
7b772fdcd1 Use device SKU for Build.SKU instead of product/odm SKU
Change-Id: I9c8bebf04cf0fa1a9cfd5211ea53c38bfb0affa7
Test: atest android.os.cts.BuildTest
Bug: 155840001
Bug: 151157621
2020-05-28 07:39:54 +00:00
Brad Ebinger
b9677fd658 Merge "Add clearAll method to RegistrantList for easier cleanup" am: e3f505a02d
Change-Id: I0f3d742b83488a649bac48bf52863fb188242cfc
2020-05-26 23:30:16 +00:00
Brad Ebinger
a659f19f39 Add clearAll method to RegistrantList for easier cleanup
Bug: 155320231
Fixes: 155819930
Test: atest FrameworksTelephonyTests
Change-Id: I6f1896ae163e77cff30e89a5b01b41162fc58200
Merged-In: I6f1896ae163e77cff30e89a5b01b41162fc58200
2020-05-26 14:45:13 -07:00
Jeongik Cha
a98415b043 Add ParcelableHolder type
To give a way to extend a stable parcelable object, a wraper for a
parcelable is necessary.
The reason why it needs to be wrapped is allowing to trasfer an extended
parcelable even though some of modules using the parcelable don't
know the type of an extension.

Whenever setParcelable() is called, it checks stability level

Bug: 146611855
Test: atest aidl_integration_test aidl_unittests

Change-Id: I6895976658fd7450b2ee47076a03079995777143
2020-05-26 22:05:30 +09:00
Mathew Inwood
fcce9c56d4 Merge "Remove garbage spaces" am: b29fb46920
Change-Id: I1fb3e6a7f598be9ea8d993a39e3f3ee6ac554f4d
2020-05-20 09:17:59 +00:00
Mathew Inwood
b29fb46920 Merge "Remove garbage spaces" 2020-05-20 09:01:15 +00:00
Treehugger Robot
a5ace2e7be Merge "Add isStable in Parcelable interface" am: 9bb27b0311
Change-Id: Ia3ac39e9b47e2fdcebca868823dd6536d88f9860
2020-05-18 22:16:05 +00:00
Taesu Lee
c3ca1c2945 Remove garbage spaces
Test: build

Change-Id: Ia15e39bbcc410e9ffcf0f267e5a385d66a3bf420
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-05-18 08:57:31 +00:00
Jeongik Cha
7782abe5d2 Add isStable in Parcelable interface
Bug: 156242606
Test: m
Change-Id: I353958ebe24911ac9fb684878931aecad7e09b97
2020-05-18 04:29:26 +00:00
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