SystemTextClassifier that is backed by ExtServices
1. The default textclassifier is always provided by
config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
by calling TCS.getDefaultTextClassifierImplementation(), so that
they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
is used to process requests from apps and the platform. Otherwise,
the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
can be overridden. If the overridden package is neither
the default one nor the system one, the package is considered as a
untrusted text classifier, which can only see requests from itself.
Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
make sure smart selection works. Run dumpsys textclassification
to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
Run dumpsys textclassification to make sure everything is unbound.
Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
Observe that no TC is bound and fallback to NO_OP.
BUG: 148049185
Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
Make TCS.getDefaultTextClassifierImplementation returns a ...
SystemTextClassifier that is backed by ExtServices
1. The default textclassifier is always provided by
config_servicesExtensionPackage (i.e. ExtServices)
2. OEM can specify a system text classifier by specifying
config_defaultTextClassifierPackage.
3. System text classifiers can get an instance of the default textclassifier
by calling TCS.getDefaultTextClassifierImplementation(), so that
they can add their customization on top of the default TCS.
4. If config_systemTextClassifierPackage is set, the specified package
is used to process requests from apps and the platform. Otherwise,
the default textclassifier is used.
5. For testing and droidfooding purpose, text classifier service package
can be overridden. If the overridden package is neither
the default one nor the system one, the package is considered as a
untrusted text classifier, which can only see requests from itself.
Test: m mts && mts-tradefed run mts-extservices
Test: Not setting config_defaultTextClassifierPackage. Select some text and
make sure smart selection works. Run dumpsys textclassification
to make sure the default TCS is bound.
Test: Setting config_defaultTextClassifierPackage and repeat the above.
Make sure the specified OEM text classifier is used.
Test: Set the service override config to be ExtServices.
Run dumpsys textclassification to make sure everything is unbound.
Select some text and make sure ExtServices is bound.
Test: Set the service override to be AiAi and repeat the above.
Test: Set the service to be something invalid and repeat the above.
Observe that no TC is bound and fallback to NO_OP.
BUG: 148049185
Change-Id: Ia2fb549fda49363e0d0ebc4b7e0d31cb76e11ee0
1. Add a test API for GTS tests to recover the saved rules after the test.
2. Fix a bug where we incorrectly hashed the certificate hashes again.
3. Do not skip the integrity verification for rule providers if one settings is
enabled. This is because otherwise installs from GTS test will not be checked.
Bug: 145674131
Test: manual run of GTS test.
Test: atest AppIntegrityManagerServiceImplTest
Change-Id: Ia61265b1e9d20d310b695ad20982da80b5d659ba
Having a change id without a description will fail m offline-sdk-docs
once https://android-review.googlesource.com/q/topic:%22compatdocs%22
is merged.
The description is based on the comment on rethrowSecurityException.
Test: m offline-sdk-docs
Bug: 144927670
Change-Id: I49af09b92432f823b10967b02b81f5d8e0ffd593
Fix some issues when apps start declaring processes, add validation
that apps don't use processes they haven't declared (if they
declared some). Also add package dump output for the processes it
has declared.
Bug: 143085640
Test: atest CtsAppSecurityHostTestCases:UseProcessTest
Change-Id: If1d13bf402d2b0aea06f0c2c02d5e392c774c812
Permissions that have the new wellbeing protection flag will be granted
to the retail demo app, as defined by the OEM in the system resource.
The PACAKGE_USAGE_STATS permission is updated to use the retailDemo
flag.
Bug: 146043112
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: I30b451e6e88a4d65af5e5f774bcd30a14721a8a9
This change adds a --force-queryable flag to adb install to allow, for
development and testing purposes, the ability to install a package so it
is visible to all other packages on the device.
Bug: 142386643
Test: atest AppEnumerationTests
Change-Id: Id793ac39a4dfb022fc5e4c0c1230a3da77bf41c6
Incremental (go/incremental-apk) requires bind-mounting on /data/app/...
directories. The purpose of this change is to avoid leaking package names in
/proc/mounts.
Default apk path of an installed app:
Before: /data/app/[packageName]-[randomString]/base.apk
After: /data/app/~~[randomStringA]/[packageName]-[randomStringB]/base.apk
BUG: b/147371381 b/148237378
Test: manual
Change-Id: Ib05b187dc006272603709a95534c40744cd62f0c
Replace the existing usages of now-deprecated API
WindowManager.getDefaultDisplay() with WindowMetrics or
Context.getDisplay() in frameworks/base.
Bug: 128338354
Test: Build, auto test
Change-Id: I02d38a022c5e0e6e9d699f03d35b65d6c8126da9
Adds a new flag to ShortcutInfo to mark it as cached. Also adds new
APIs in ShortcutManager to remove or retrieve a cached shortcut.
Bug: 148084870
Test: atest com.android.server.pm.ShortcutManagerTest1 \
com.android.server.pm.ShortcutManagerTest2 \
com.android.server.pm.ShortcutManagerTest3 \
com.android.server.pm.ShortcutManagerTest4 \
com.android.server.pm.ShortcutManagerTest5 \
com.android.server.pm.ShortcutManagerTest6 \
com.android.server.pm.ShortcutManagerTest7 \
com.android.server.pm.ShortcutManagerTest8 \
com.android.server.pm.ShortcutManagerTest9 \
com.android.server.pm.ShortcutManagerTest10
Change-Id: I859b416ccd4228eec10a436550ff98866a62af66
Add Bundle parameter to createWindowContext method to allow
passing window-related options.
Bug: 128338354
Test: Build, auto test
Change-Id: I19cf9335068ecf94c9d94a99be0e8f1021f78e34
This changes refactors the ResourcesLoader APIs.
The main changes are:
Rather than pairing a ResourcesLoader with a ResourcesProvider, a
ResourcesProvider is paired with an AssetsProvider which is only
responsible for overriding the values of file-base resources and
assets. An AssetsProvider can be shared between multiple
ResourcesProviders.
ResourcesLoader now holds a list of ResourcesProviders.
ResourcesLoaders are part of ResourcesKeys and requests for resources
with the same loaders will use the same underlying ResourcesImpl. This
allows the loader specific code in RM to be cleaned up.
ResourcesLoaders and Resources objects use callbacks to notify RM
of changes to the Resources instance that may require a new
ResourcesImpl.
When a context is created from another context, the new context will
include the loaders of the original context. Change to list of either
context's loaders will not change the loaders of the other context,
but changes to the providers a loaders uses will update all Resources
objects that use that loader.
Activity resources will include the loaders of the application context
at the time of the Activity's creation.
Bug: 147359613
Test: atest ResourceLoaderTests
Change-Id: I2957c803d3f0c1280abfd3c723d76b18df2c3789
With the recent sha-1 news, and since minSdk less than 18 for RSA and
minSdk less than 21 for DSA require sha-1, APK signature verification
will now require a minimum of a V2 signature for apps targeting R+.
Bug: 148313868
Test: atest PkgInstallSignatureVerificationTest
Change-Id: I8f518102a0b7cef190cbca59d140d380ae41c326
Ethernet tethering can be started via
startTethering(TETHERING_ETHERNET).
Test: flashed, enabled ethernet tethering, verified internet access on
downstream.
Bug: 130840861
Change-Id: I34842acd94b972e440c3622f7617df10c18acf65
Add locus update event to the Usage Stats.
Test: Build and run on a test device with a test app.
Bug: 147594233, 147100454
Change-Id: I1e058ac87244d47719606d8dcfaea2df4bff43d2
Signed-off-by: Yuliya Kamatkova <yuliyak@google.com>
1. Move isSatisifed into RuleEvaluator to minimise the API surface.
2. Add a new global settings for skipping integrity component for rule
providers.
3. Incorporate changes suggested by API review in http://b/147835536.
Note that this change is forked from ag/9974531.
Test: atest frameworks/base/core/tests/coretests/src/android/content/integrity/
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/integrity
Bug: 145290357, 147835536
Change-Id: Ic358a83b6bdcd4cb783e6904869f7dc2d136a55e