To avoid leaking IPackageManager methods directly into
PackageManagerService, moves the IPM implementation into an inner
class similar to PackageManagerInternal.
This will help enforce snapshot consistency by ensuring that all
non-IPM PMS methods can always take in a Computer instance to re-use.
Bug: 217961172
Test: presubmit
Change-Id: Ibf7bd3d1d90a40786279763ba8d62eb9348bb760
ag/16942831 creates a new AppSearchModule class that dispatches system
service lifecycle callbacks to both AppSearchManagerService and
ContactsIndexerManagerService.
Test: refactoring CL. Existing unit tests still pass.
Change-Id: Ia57732d0ad0c5de86a41b08ec4edafa2dca1ce0e
Change PowerManagerService to remove the extra systemReady method called
from SystemServer and use the boot phase for system services ready
instead.
Fix: 218847044
Test: PowerManagerServiceTest
Change-Id: Ib69f0a0a5168e270e413c25d75f739809787eded
This reverts commit 1e0219774f.
Reason for revert: we need explicit declaration in SystemServer for non-mainline devices since they use flattened apex
Fix: 215565746
Test: presubmit
Change-Id: Ie0cbe03c21a18a185df54a9cd9b9a2ff1ae6f821
NetworkStatsService is going to be moved into Connectivity mainlne
module and it will be not visible to SystemServiceResistry after
migration done. Thus:
1. Register service in NetworkStatsServiceInitialalizer, a separate
initializer is needed because the service needs to be created
before NetworkPolicyManagerService's initialization.
2. Call SystemReady at PHASE_ACTIVITY_MANAGER_READY phase where
it needs to be ready before StatsPullAtomService pulls at
PHASE_THIRD_PARTY_APPS_CAN_START.
3. Register manager in ConnectivityFrameworkInitializerTiramisu
instead of SystemServiceRegistery.
Test: atest FrameworksNetTests CtsNetTestCases NetworkUsageStatsTest
Bug: 204830222
Change-Id: I95020d816ed613ce3480a0720a5b71dcdc7fab72
configurable.
The content of the half watchdog is now more consistent with watchdogs
to make it more actionable (watchdog subject, memory psi, cpu data).
The half watchdog is also published to dropbox in a similar way to the
watchdog. We also use a thread to publish to dropbox to make sure that
we do not block the watchdog handler code.
For the half watchdog, we know wait for 5s to get the cpu data (similar to
the watchdog) which delays the next run. That's only 10% of the default
timeout though so that's not a big difference.
For the configurable watchdog timeout, we delay fetching the value to
be able to start the watchdog as early as possible when system server
starts to detect blocked threads that might happen early. As well, even
if fetching settings is broken, the watchdog will still be running with
the default timeout values.
Test: tested that the half watchdog is added to dropbox
~/master$ adb shell dumpsys dropbox | grep watchdog
2022-01-25 23:22:19 system_server_pre_watchdog (compressed text, 21612 bytes)
2022-01-25 23:22:56 system_server_watchdog (compressed text, 21386 bytes)
2022-01-25 23:29:09 system_server_pre_watchdog (compressed text, 21621 bytes)
The watchdogs and half wathdogs were generated by adding a message with
a long sleep on the ui thread
Runnable runnable = new Runnable() {
@Override
public void run() {
SystemClock.sleep(40_000); // 40s
}
};
Message msg = Message.obtain(UiThread.getHandler(), runnable);
msg.setAsynchronous(true);
UiThread.getHandler().sendMessage(msg);
Bug: 209932320
Change-Id: I1bca723d1d7bee98dc7e1aade73a2e4384d6f035
This reverts commit 1352272eb6.
Reason for revert: rollforward with a fix.
Add waitForBootComplete() after installing test apex and inspecting
logcat.
Bug: 192880996
Test: atest ApexSystemServicesTestCases PackageParserTest ApexManagerTestChange-Id: I7a238b439fc25da4ae1ab379cc66e54565dac293
Change-Id: I0270c24c471d8e7391260b7f731b6c0fb2fa0662
Sample of results:
history
0
class=class android.content.res.Resources
resourcesImpl
class=class android.content.res.ResourcesImpl
assets
class=class android.content.res.AssetManager
apkAssets=
0
class=class android.content.res.ApkAssets
debugName=<empty> and /system/framework/framework-res.apk
assetPath=/system/framework/framework-res.apk
1
class=class android.content.res.ApkAssets
debugName=/product/overlay/GoogleConfigOverlay.apk
assetPath=/product/overlay/GoogleConfigOverlay.apk
Fixes: 206615535
Test: Called from custom app to confirm format and info
Change-Id: I19a9fc60b61fff86e5b41a2d789d6dde8acf51a3
This reverts commit 0fc06be8ca.
Reason for revert: The original change is fine, but is not be
necessary anymore once the service is started from the
Connectivity initializer. This is to be submitted together with
changes achieving that.
Bug: 189355156
Bug: 214495869
Test: check service started from new path
Change-Id: I26e1a89522f7a8ce72e7576a1f2f697845eef617
This refactoring will let us have alternative implementations for the
state of microphone/camera. It also seperates the storage of the other
feature that is known as the "Sensor mute" so that the reuse of this
service doesn't get too convoluted.
Also extract the persitable state from the state implementation so that
alternative implementations can resuse the persistence code.
Some smaller changes:
* Start the sensor use dailog as user 0 always since system UI requires
user 0
* Use SystemClock.elapsedRealTime() instead of network time since it's
guaranteed to my monotonic. This will also change that intervals used in
telemetry aren't going to measure time the device is powered off.
Ignore-AOSP-First: New OWNERS file
Test: atest CtsSensorPrivacyTestCases SensorPrivacyServiceMockingTest
Bug: 200649586
Change-Id: I4c23c2509d7d1bdf49360fc9bbadb79ccd451dcc
Bug: 197684182
Created a new system service that aggregates information about:
1) signed partitions on device
2) APEXs installed on device
3) Modules installed on device
Introduces new adb shell commands as below:
adb shell cmd transparency get image_info [-a]
adb shell cmd transparency get apex_info [-v]
adb shell cmd transparency get module_info [-v]
Test: Built and tested locally on a bramble - the device boots.
Issuing adb shell commands as above provides correct outputs.
Change-Id: I2cae1bd794456688779c70c65b3f5ec8bcd7c6b3
Client apps need the ACCESS_AMBIENT_CONTEXT_EVENT permission to use the service. The permission protection level is internal|role.
API overview: http://go/ambient-framework-api
PRD: http://go/ambient-attribution-prd
Design doc: http://go/ambient-service-api
Test: CTS test
Bug: 192476579
Change-Id: I9daede83af34f215c278cb0530238faba1be5c70
Ignore-AOSP-First: to prevent new feature leak.
TrafficStats has static methods created in API level 8 that need
access to NetworkStatsManager but doesn't take a context.
Previously this was achieved by using ServiceManager, but
with TrafficStats moving to the connectivity module, this
is no longer possible.
Instead, make sure TrafficStats has an appropriate context by
the time any client code can call the relevant methods.
• In app code, this achieved by passing the application
context from ActivityThread#handleBindApplication, before any
app code can run.
• In the system server, this is achieved by passing the context
right after creating service.
Test: atest TrafficStatsTest CtsWebkitTestCases
Bug: 204830222
Change-Id: I251bb8a4431ad12ff61929879ef1363cf06b9244