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
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
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
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
ServiceSpecificException might be thrown, but it is not
actionable by the caller. Hence hide the comment.
Fixes: 151156841
Test: none
Change-Id: I07836fe2c5cc361fa81f6fc24851ad2b0721591b
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)
* 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
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
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)
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>