Commit Graph

17156 Commits

Author SHA1 Message Date
TreeHugger Robot
1527beb31e Merge "Add public docs to AppOpsManager" 2020-02-05 18:07:42 +00:00
Tony Mak
4624cdd12e Merge "Make TCS.getDefaultTextClassifierImplementation returns a ... SystemTextClassifier that is backed by ExtServices" 2020-02-05 14:44:39 +00:00
Julia Reynolds
e79019393a Merge "Separate concept of VIC from DND" 2020-02-05 12:21:25 +00:00
TreeHugger Robot
b85646d57b Merge "Wipe device when COPE PO max password attemps exceeded" 2020-02-05 11:52:38 +00:00
Neil Fuller
1b883e2118 Merge "Remove System APIs not required for R" 2020-02-05 11:47:13 +00:00
Yuhan Zhao
be5015b00a Merge "Intercepting activites that could cause lock task mode violation in ActivityStartInterceptor." 2020-02-05 07:42:49 +00:00
Jacky Kao
dc50df397b Merge "Changing the return type of takeScreenshot() (1/n)" 2020-02-05 05:53:34 +00:00
Alex Buynytskyy
716588dec9 Minor renaming: IIncrementalManagerNative -> IIncrementalService.
Manager(client)->Service(server) seems to be easier to understand.

Test: builds
Bug: b/136132412 b/133435829
Change-Id: I3bc447fbf7a7aac917df7b4632def75e0da3f1a0
2020-02-05 01:35:06 +00:00
Yuhan Zhao
f3b3d41560 Intercepting activites that could cause lock task mode violation in ActivityStartInterceptor.
Test: Manual
Test: atest WmTests:ActivityRecordTests
Test: atest WmTests:ActivityStartInterceptorTest
Test: atest WmTests:LockTaskControllerTest
Bug: b/131614258
Screenshot: https://screenshot.googleplex.com/hPy1b9NgkNj
Change-Id: Ibba62d4cd0065cab9c46fcb575c207d1a88bd02f
2020-02-04 14:38:39 -08:00
Winson Chung
3d358dba3d Merge "Add lock task check when entering split screen" 2020-02-04 21:39:36 +00:00
Tony Mak
c5a7432ebf 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
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
2020-02-04 20:36:52 +00:00
Pavel Grafov
a5b15b2531 Wipe device when COPE PO max password attemps exceeded
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
2020-02-04 19:46:09 +00:00
Philip P. Moltmann
9e36700b49 Add public docs to AppOpsManager
Test: Built
Bug: 148816360
Change-Id: I5560ed20104a7a13f67dec3e8989a405b54d5fb7
2020-02-04 11:27:20 -08:00
Julia Reynolds
24edc00304 Separate concept of VIC from DND
(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
2020-02-04 14:23:46 -05:00
Neil Fuller
567a91279f Remove System APIs not required for R
Test: treehugger
Bug: 148842434
Change-Id: If022a726a058a90cb5446d220628c76800da8e96
2020-02-04 18:59:23 +00:00
TreeHugger Robot
26fc52f729 Merge "enable dynamic binding in AppPredictionSession" 2020-02-04 17:50:32 +00:00
TreeHugger Robot
8b39a3373f Merge "Don't callback twice for app op changes in PermissionPolicyService." 2020-02-04 07:23:50 +00:00
TreeHugger Robot
5f87e0dfee Merge "Make the disconnecting list from activity up-to-date" 2020-02-04 05:29:04 +00:00
Hai Zhang
f4ef0394bb Don't callback twice for app op changes in PermissionPolicyService.
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
2020-02-03 14:49:35 -08:00
Pinyao Ting
6b172567d5 enable dynamic binding in AppPredictionSession
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
2020-02-03 14:39:47 -08:00
TreeHugger Robot
27e12881e4 Merge "Use FrameworkStatsLog instead of StatsLog" 2020-02-03 21:36:22 +00:00
Winson Chung
7ccc68114e Add lock task check when entering split screen
- Simplifies the checks we have to do from SysUI

Bug: 148244169
Test: atest SplitScreenTests
Change-Id: I80b09d23fc6e03d94ea6c1ece48fd31a52d54419
2020-02-03 11:04:40 -08:00
Riddle Hsu
60a494ae38 Make the disconnecting list from activity up-to-date
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
2020-02-03 18:25:51 +00:00
Automerger Merge Worker
df8efd3e47 Merge "API docs tidy up" am: 6aef6673df am: 8586776fbf am: a8e6d67fb5
Change-Id: Ia043ca171dfe1c64fc0f3295eed5547e3d0f6d47
2020-02-03 18:22:36 +00:00
Automerger Merge Worker
a8e6d67fb5 Merge "API docs tidy up" am: 6aef6673df am: 8586776fbf
Change-Id: Iae5b7ebccc7a21f758897b82c6e72ba3a73624ef
2020-02-03 18:10:03 +00:00
Automerger Merge Worker
8586776fbf Merge "API docs tidy up" am: 6aef6673df
Change-Id: I0be18d5713fa9ad17a53cfbf2ba445a181bc4a0c
2020-02-03 18:00:44 +00:00
Makoto Onuki
df2457279f Merge "Do not use @SystemApi(client = MODULE_APPS) (documents/settings)" 2020-02-03 17:51:48 +00:00
Neil Fuller
6aef6673df Merge "API docs tidy up" 2020-02-03 17:48:03 +00:00
Muhammad Qureshi
e2b2432bc6 Use FrameworkStatsLog instead of StatsLog
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
2020-02-03 09:17:40 -08:00
TreeHugger Robot
aac44351dd Merge "Always create application cache directories through StorageManager." 2020-02-03 15:11:39 +00:00
Automerger Merge Worker
ea2a336113 Merge "Minor refactor of ChangeReporter and PlatformCompat" am: 55d16fac97 am: a8116d930c am: f8f7f29b32
Change-Id: Ic7db4dd118dceb1f8fe618cf341cbf725c818520
2020-02-03 13:10:18 +00:00
TreeHugger Robot
2cd7cddffe Merge "Add vendor_cross_profile_apps.xml and hidden API to read them." 2020-02-03 13:07:42 +00:00
Automerger Merge Worker
f8f7f29b32 Merge "Minor refactor of ChangeReporter and PlatformCompat" am: 55d16fac97 am: a8116d930c
Change-Id: I88dece6fe0c24d6da086ed37fb02282dc9411a16
2020-02-03 12:58:10 +00:00
Automerger Merge Worker
a8116d930c Merge "Minor refactor of ChangeReporter and PlatformCompat" am: 55d16fac97
Change-Id: I691696fa0ffa50c87bb3afb26173f4cc595453a2
2020-02-03 12:46:12 +00:00
Martijn Coenen
92f08ee675 Always create application cache directories through StorageManager.
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
2020-02-03 13:42:16 +01:00
Treehugger Robot
55d16fac97 Merge "Minor refactor of ChangeReporter and PlatformCompat" 2020-02-03 12:37:48 +00:00
Automerger Merge Worker
b3fc3ce03f Merge "Rename phoneId to slotIndex" am: 4e540a1c59 am: d0045fbffd am: 5b54abfa84
Change-Id: I59bf3ec187cb59d17860b85ad5cead58fc1017c0
2020-02-03 12:28:16 +00:00
Automerger Merge Worker
5b54abfa84 Merge "Rename phoneId to slotIndex" am: 4e540a1c59 am: d0045fbffd
Change-Id: I54dbb777059261678e47d19ea52ead6310bcbf54
2020-02-03 12:19:14 +00:00
Neil Fuller
fb23c3ea2e API docs tidy up
Based on feedback from API council.

Bug: 148402959
Bug: 148402200
Test: treehugger only
Change-Id: I273ced8ec61dd72d8fd290b976ecfe1e613a1941
2020-02-03 12:17:27 +00:00
Automerger Merge Worker
d0045fbffd Merge "Rename phoneId to slotIndex" am: 4e540a1c59
Change-Id: If220028441547c85c3540c52af9f714a15853b3a
2020-02-03 12:09:10 +00:00
TreeHugger Robot
1ea322ad85 Merge "Update documentation for DELEGATION_CERT_SELECTION" 2020-02-03 12:05:36 +00:00
Neil Fuller
4e540a1c59 Merge "Rename phoneId to slotIndex" 2020-02-03 11:55:39 +00:00
Jonathan Scott
38f9ab54ca Add vendor_cross_profile_apps.xml and hidden API to read them.
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest;
Change-Id: Ie84e7d28ddc9c1f46d33cb4a543b04615b3b26e7
2020-02-03 10:51:33 +00:00
Lee Shombert
8960811819 Clean up hasSystemFeature binder cache
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
2020-02-02 17:48:43 +00:00
Makoto Onuki
e479728fe2 Do not use @SystemApi(client = MODULE_APPS) (documents/settings)
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
2020-01-31 15:26:32 -08:00
Evan Rosky
611a3cab1f Merge "Add TaskTile concept to Window Manager" 2020-01-31 22:57:35 +00:00
Evan Rosky
0037e5f901 Add TaskTile concept to Window Manager
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
2020-01-31 10:26:45 -08:00
Neil Fuller
d8da3387c4 Rename phoneId to slotIndex
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
2020-01-31 17:06:33 +00:00
Automerger Merge Worker
2594ced93c Merge "Do not block for connector in TetheringManager" am: 6674b930fd am: bd9b1908fb am: e094cf9519
Change-Id: If1187beb53716d2c8f9855634a9b913ffceee604
2020-01-31 16:27:56 +00:00
Automerger Merge Worker
e094cf9519 Merge "Do not block for connector in TetheringManager" am: 6674b930fd am: bd9b1908fb
Change-Id: Id5444dabe26a46a703edc54f9713531a63f9e211
2020-01-31 16:15:55 +00:00