Manager(client)->Service(server) seems to be easier to understand.
Test: builds
Bug: b/136132412 b/133435829
Change-Id: I3bc447fbf7a7aac917df7b4632def75e0da3f1a0
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
With this change when DPMS decides what user to wipe, it takes COPE
status into account.
Bug: 144978468
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I3841b04321090fdc035da91fdc1febea397640bb
(Very important conversations). Track VICs in a different
field, and update DND (and public apis) to allow
all, important, or no conversations through.
Test: atest, cts
Bug: 137397357
Change-Id: Iae04546eb7c0b1e79cfdbeec7311628cd7ad634a
If an app op change is made while syncing app ops from permissions, we
know it's being set to our desired state and don't need to be notified
again. This cuts the performance cost to at least half of what it was,
and prevents potential looping.
Bug: 136503238
Bug: 147673896
Bug: 146039935
Bug: 148706747
Test: manual
Change-Id: I643472800c0dfbf96c202093a697f0a72eee0780
Before AppPredictionPerUserService instantiates an instance of
RemoteAppPredictionService based on default componentName, do a
component lookup based on app prediction context and session id,
and switches to different service dynamically.
original architecure:
https://sequencediagram.googleplex.com/view/4764463320268800
proposed chages:
https://sequencediagram.googleplex.com/view/6517721785171968
Bug: 148173565
Test: atest AppPredictionServiceTest
Change-Id: Ic522d7ed76adafe06813ba488b83e222d61b23c1
After the holder has enqueued the runnable to disconnect, the
connections may be removed by other paths, e.g.
ActivityThread#handleDestroyActivity
-> ContextImpl#scheduleFinalCleanup
-> LoadedApk#removeContextRegistrations
-> unbindService
Then when executing the runnable, it will remove the removed
connection again and try to bind down the service. If a new service
instance has been started again, it will cause IllegalStateException.
This change keeps the reference of connections, so removeConnection
from ActiveServices still updates the exact list. The original
double-disconnect is protected by null out the holder and a new
flag to indicate disconnecting.
Bug: 146825978
Test: atest CtsAppTestCases:ServiceTest
Test: 1. Add sleep 5s in the disconnect-runnable to delay calling
ActivityManagerInternal#disconnectActivityFromServices.
2. Launch an activity which binds a service.
3. Finish the activity without unbind (so the
disconnect-runnable is enqueued and unbindService from
final-cleanup will be called. If DEBUG_CLEANUP is enabled,
the log in removeConnection should appear).
4. After the activity is destroyed for 2s, start the service
again (previous service is destroyed by unbind, so a new
service record is created).
5. The 5s delayed disconnect-runnable executes, and system
is still alive without any exception logs (originally
it will always crash the system).
Change-Id: I3ae85927da1c11b2560524b6642401741b5beae2
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by
*StatsLog.java
that is autogenerated for each module.
This CL replaces some usages of StatsLog with
FrameworkStatsLog.
Bug: 145952197
Test: m
Change-Id: Iaa2db34a7be4c3215f62cc36661ba8ac81656baa
Don't try to create cache directories locally; they need special
treatment for accurate quota tracking, so always ask StorageManager to
create them.
Bug: 146419093
Test: manual verification
Change-Id: I4c6ba15bc6bb55e0d08e435468afcca3eb1d2647
Bug: 140788621
This is a non-functional clean-up.
1. Rename the classes and methods used by the binder cache so that
everything public is based off of the binder name "hasSystemFeature".
2. Modified the hashCode() method to conform to the comments in cl/9965760
3. Moved hasSystemFeatureUnchached() logic into the cache recompute() method.
4. Made the cache static so that there is on per process. The recompute()
method uses the binder handle from ActivityThread, which is the same
handle that is passed to all other classes.
This change does not include the Java 8-incompatible syntax.
Test: Built a debug image and ran one iteration of MPTS. Verified that no
errors were seen.
Change-Id: I67b1cd3a151f4dc037c35f93f341a5de3e023941
There will be no special protection mechanisms around MODULE_APPS,
so we're going to remove it for now.
All the MODULE_APPS should be protected with a permission, etc, so
the change should be safe.
Bug: 148177503
Test: Build / treehugger
Change-Id: I76328c2d5aaa3f171bf8afde5b3d1accad8c2e2b
This adds the concept of a TaskTile to the WM. Due to
complexities in the current Stack/Task relationship, tiles
can't actually be part of the hierarchy, so the Stack
level has to internally resolve configurations as if they
were.
The TaskTiles themselves *are* ActivityStacks though from
the client/sysui perspective, though.
Bug: 133381284
Test: Added TaskTileTests
Change-Id: I9baad5ec899b4fab323a36c1533a40081727a2f7
Rename phoneId to slotIndex. Some of the classes are being put in an API
surface and phoneId is an internal concept. slotIndex is its replacement
and should be identical.
Bug: 148403082
Test: treehugger build only
Change-Id: Iecbf347c9d13877f2e3f74b6daa22661bade257a