Since Android 7.0, partners were able to export some of their native
shared libraries to apps. So far, the native libraries were provided to
all apps regardless of whether they are actually needed or not. Even
worse, it was impossible to prevent the installation of an app to the
device where the some (or all) of the required native libs don't exist;
the apps had to manually handle the case, which sometimes impossible
when the dependency is so fundamental.
This change introduces a new tag <uses-native-library> to the app
manifest. Similary to the existing <uses-library> tag which is for
(java) shared libraries, the new tag is used to describe the depedencies
to the native shared libraries.
Apps targeting Android S or higher are required to use the tag to import
the native shared libraries. Libraries that are not depended on won't be
available to the app even if the libraries are listed in the
public.libraries*.txt files. Furthermore, when the dependency can't be
satisfied for an app, the package manager refejects installing the app.
The dependency can be optional using the `android:required` attribute.
When it is set to true, the absence of the lib on the device doesn't
prevent the app from being installed. However, the app has to gracefully
deal with the absence.
The changed behavior only affects apps targeting S or higher. Existing
apps are unaffected; they still get all the public native libraries
regardless of whether they have <uses-native-library> tags or not; the
tags are simply ignored.
This is the first version of the implementation and therefore needs
further refinements. The followings are two major TODOs.
1) The native shared lib dependencies of the java shared libraries
are not enforced. For example, if an app depends on a java shared
library foo and foo depends on some native shared libraries, the
classloader where code from foo is loaded still gets all native shared
libraries. This should be fixed.
2) New APIs should be added. SharedLibraryInfo should be extended to
represent native shared libraries. The meaning of
ApplicationInfo.sharedLibraryFiles should be revised. Finally, the new
tag should be made public.
Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Change-Id: Iceb038aa86872d23e9faf582ae91b1fdcaf5c64c
Don't clone-then-discard, just work from what we have already, and start
fresh for potential new work.
Bug: 161534313
Test: atest android.content.cts.SharedPreferencesTest
Change-Id: I6edb2b09537f5e77cc2ad3e4d2f32a89b945ad80
Add a removeListener method to allow deregistration of interest in
config changes, update tests. Also, hide binder interfaces on the
android.app methods.
Test: Treehugger / atest of touched test files
Bug: 149014708
Bug: 159888952
Change-Id: Ic1a14c34334eb276724d97c4e763360d51cb035b
This app op was introduced to support --no-isolated-storage
instrumentation flag in MediaProvider mainline module. Because it was
very late in the release cycle, app op wasn't exposed as @SystemApi in
rvc-dev, even though there CTS tests written around it, and
MediaProvider module depends on it.
To make things fair, expose it as @SystemApi.
Test: atest CtsScopedStorageHostTest
Bug: 159708202
Change-Id: Ifddf2cb920285eda5f859972937b0f9084fc32a3
With this change, if user selects a preferred activity with "Always"
checked, there will only be one mAlways=true intent filter
for a given action.
BUG: 161394369
Test: manual
Test: atest FrameworksServicesTests
Change-Id: I3d5ee0130f6f07530bb53f9c1509d5121a46a34a
Bug: 159039903
A set of small changes to the class to allow for addition debugging.
1. Distinguish a cache that is disabled because the nonce has not
set from a cache that is disabled because it is corked.
2. Count the times the cache was bypassed because it was corked, unset,
or disabled. This does not count the times the cache was bypassed
because it was locally disabled. Add these counts to dumpsys.
3. Count the number of times a cache is invalidated, corked, and
recorked (corked while already corked). Add these counts to dumpsys.
4. Log some additional information if cache inconsistency is detected.
5. Record cache overflows and cache high-water marks.
Test: Run the following tests with and without the changes. Verify that
the changes do not affect behavior.
* CtsContactsProviderTestCases
* FrameworksServicesTests
* FrameworksServicesTests:UserManagerServiceCreateProfileTest
* PlatformScenarioTests
* PtsChreTestCases
* FrameworksServicesTests:UserManagerServiceUserInfoTest
* FrameworksServicesTests:UserManagerServiceIdRecyclingTest
* CtsProviderTestCases
* FrameworksServicesTests:UserSystemPackageInstallerTest
* FrameworksServicesTests:PackageManagerSettingsTests
* FrameworksServicesTests:UserLifecycleTests
* CtsCalendarProviderTestCases
* BluetoothInstrumentationTests
Pull a bug report and verify that the new counters are included.
Change-Id: I38d5545947d6f09c7e62e094c7b2858aab4a8cf9
... in the AppError
The processName could be different in case the crashing component
specifies a different one other than the global process name.
Bug: 161165487
Test: atest android.jobscheduler.cts
Test: Manual - induce a crash in a receiver w/ different proc name \
verify the proc name is showing up in dumpsys
Change-Id: Ied1658091edbd16d75a61e15e3501a92b222ab42
Add an override of BackupManager#requestBackup where type of the
operation (a regular backup or a migration) can be specified.
Bug: 160407842
Test: atest UserBackupManagerServiceTest
Change-Id: Ia54fa26b040c3ec3612672585561794ff831afef
Introduce strategy which uniformly samples OPs, without biasing in
favour of specific ops.
Use this strategy half of the time.
Test: atest RuntimeMessageCollectionTest && statsd_testdrive 10069
Bug: 143519689
Change-Id: I481d3a9ef9c66f04577b57432cecdf2c02055e58
- Remove parameter movedToDifferentDisplay because it can be
retrieved by comparing current display id and new id. Then
some logic can be shared.
- REPORT_TO_ACTIVITY was used to distinguish whether to report
new configuration to the activity according it is process or
activity level change. Since the conditions had been separated
by different methods, its usages can be removed.
Bug: 160780522
Test: atest MultiDisplayActivityLaunchTests
Change-Id: I914963261ba339ba8c7bb5c50d7a8b25791db12e
Add null checks in both ContextWrapper and before obtaining
ContextImpl#getOuterContext.
Test: atest ContextTest#testIsUiContext_ContextWrapper
fixes: 160037462
Change-Id: Ic6a71dd9ac4b195d219d6e5431f2f2b199a400fa
This CL will be part of a series to implement backup / restore of all
app data during a device-to-device migration. Detailed overview of the changes at go/br-fsd2d-design-doc-app-data.
Bug: 160407842
Test: atest AppBackupUtilsTest
Change-Id: I35ce627f1d372437d8ba8495029c6df15db31552
Bug: 159443507
Test: Built and flashed onto local adt-3 device
Test: Ran tests from ag/12034683
Test: Attempted to execute resetAppErrors via
adb shell service call activity 219
Change-Id: I3723d9aae18679b4292c6efb8549563063d64b98
IllegalArgumentException was thrown when reporting size config
for local activities while relaunch.
Bug: 120008604
Test: start ActivtiyGroup activities and update display cutout
Change-Id: If376012cd0741bc7436dc45aeb2f0216aee32a02
Bug: 156887617
Test: Update a notification between 10-30 seconds after the last update, watch bell icon stay visible.
Change-Id: Ib737fd78ac5afa26ee0e456ffbee6c6dc0a5c835
Several partners with devices that have small displays have run into
issues w/ CTS-on-GSI testing as these builds hardcode support for
split-screen. This prevents split-screen from being reported as
supported if the display isn't compatible according to the CDD.
Bug: 158310372
Test: android.server.wm.SplitScreenTests#testMinimumDeviceSize()
Change-Id: I0dfd6caca5116dccc115d64b755998171abe831f
Replace with SystemServiceRegistry.registerContextAwareService,
which is a @SystemApi. See ag/9734296 for reference.
Bug: 160380016
Test: atest
CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I9b6da97e0e0f5181ce8681a399ca090e67f6fd4e
MediaSessionManager calls ServiceManager#getService(string) to get
ISessionManager, but it is a hidden API that will not be made into
@SystemApi (ag/6329675).
Instead, create a wrapper class that can only retrieve specified
media service binders. (ag/10123575 for reference)
Bug: 159955826
Test: atest
CtsMediaTestCases:android.media.cts.MediaSessionManagerTest
Change-Id: I1ab89d1217e8e3d071b38da772ee96889e9859b1