Commit Graph

11057 Commits

Author SHA1 Message Date
TreeHugger Robot
96d587172c Merge "Disable XOM on libraries for apps with targetSdkVerison<Q" 2019-03-26 23:38:46 +00:00
Jeff Vander Stoep
739c0b5193 Disable XOM on libraries for apps with targetSdkVerison<Q
Apps may (and do) assume that libraries are readable. To avoid app
breakage, mark execute-only sections of as read+execute
for apps with targetSdkVersion<Q.

Bug: 128907672
Test: Check libc for app with targetSdk==current
cat /proc/25950/maps | grep libc.so
77c01e3000-77c028b000 --xp 00041000 07:20 106 /apex/com.android.runtime/lib64/bionic/libc.so
Test: Check libc for app with targetSdk<current
cat /proc/26355/maps | grep libc.so
77c01e3000-77c028b000 r-xp 00041000 07:20 106
/apex/com.android.runtime/lib64/bionic/libc.so

Change-Id: I90b5c91923c8008ae4b4818985842fe3e354a850
2019-03-26 13:11:30 -07:00
TreeHugger Robot
ddd19b3537 Merge "Move some common functionality to AbstractResolverComparator." 2019-03-26 18:46:33 +00:00
TreeHugger Robot
ec90ac525d Merge "Changed process names for USAPs." 2019-03-26 18:07:56 +00:00
TreeHugger Robot
a967066a1e Merge "Modify AbstractRemoteService#mBindInstantServiceAllowed to #mBindingFlags in order to support multiple binding flags" 2019-03-26 17:16:05 +00:00
George Hodulik
935624421b Move some common functionality to AbstractResolverComparator.
Uri http/https intents bump default browser to front, and also
apps that are specific to the uri.
We also move the usage stats reporting to the abstract class.
Updates methods to be package-private.

Test:atest frameworks/base/core/tests/coretests/src/com/android/internal/app -- passes except previous failures https://paste.googleplex.com/6680684066242560
Test:adb shell am start -d "http://developer.android.com" -- Chrome is bumped to front, checked logs to confirm this was not just coincidental.
Bug:129014961

Change-Id: I203e8bc86d6321a5f124f3c19210c44a1065f072
2019-03-26 16:58:08 +00:00
Michal Karpinski
322df0bb74 Modify AbstractRemoteService#mBindInstantServiceAllowed to #mBindingFlags
in order to support multiple binding flags

And supply BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS for RemoteFillService.

Test: atest CtsAutoFillServiceTestCases
Test: atest AutofillManagerServiceTest
Bug: 126267782
Change-Id: Id5262d6a4e0fde0ad874020f783cfbf72fe201f4
2019-03-26 11:07:33 +00:00
Misha Wagner
b6f1833799 Merge "Clean up KernelCpuThreadReader" 2019-03-26 09:31:58 +00:00
Chris Wailes
0753040b62 Changed process names for USAPs.
This CL causes unspecialized app process to change their name to either
usap32 or usap64 after forking and before waiting on incoming
specialization requests.

Test: m & boot & check `ps -a`
Change-Id: I6a5d78d9fce8a204a3b65601f5767dd8f0f64ea7
2019-03-25 18:01:30 -07:00
Andrei-Valentin Onea
ed37f17a3b Merge changes from topic "android-internal-srcs"
* changes:
  Add @UnsupportedAppUsage annotations
  Add android internal dirs to hiddenapi-mappings
2019-03-25 13:57:20 +00:00
Jeff Sharkey
ff200957fd Query specific collections for properties.
We're now enforcing the public API schema, so clients like MTP need
to query specific collections when asking for properties that are
specific to those media types.

Also refactor MediaScanner calls to go through MediaProvider, so
they can be handled by ModernMediaScanner.  We no longer directly
try inserting items, and instead rely completely on the scanner.

Bug: 127625964, 122263824
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic86982766606a619afafe725f9c60013a5671840
2019-03-24 14:21:01 -06:00
TreeHugger Robot
4b58630ef2 Merge "Fixed a property naming mismatch." 2019-03-23 09:55:19 +00:00
Chris Wailes
da5b64e7f2 Fixed a property naming mismatch.
Device configuration properties in ZygoteConfig.java used old names for
certain values.  These name strings have been updated to the correct
values and additional logging has been added to help catch future
issues.

Test: m
Test: boot and check log for USAP messages
Change-Id: I2fb92afe7edd9b1254dd3be659ec5063aa0b8e16
2019-03-22 17:45:28 -07:00
TreeHugger Robot
4f3f18dec3 Merge "Fixed Content Capture workflow when service package is updated." 2019-03-22 23:00:01 +00:00
TreeHugger Robot
c20dd2763f Merge "Sharesheet - Resolve crash when no targets are present" 2019-03-22 21:33:22 +00:00
Andrei Onea
15884391c0 Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.app
  com.android.internal.database
  com.android.internal.http
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.menu
  com.android.internal.widget
  com.android.server.net
  com.android.server
  com.google.android.collect
  com.google.android.util

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ia5306f4713298b46ae3aba6fc9d87fae41f8a593
2019-03-22 17:58:43 +00:00
Matt Pietal
0f457e6f19 Sharesheet - Resolve crash when no targets are present
After the sharesheet closes, a timeout message propagates to a handler
for processing, which causes an NPE

Bug: 129137525
Test: atest ChooserActivityTest
Change-Id: I200b068b74998ce9d22d85ad3574c130f959de4f
2019-03-22 13:42:10 -04:00
Irina Dumitrescu
801dfc476f Merge "Change existing LockPatternUtil APIs to fail untrusted password updates." 2019-03-22 16:12:39 +00:00
Irina Dumitrescu
c90674dcc2 Change existing LockPatternUtil APIs to fail untrusted password updates.
Add alternative APIs to allow untrusted password changes explicitly, so the caller
can choose to use them if needed.

Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
Bug: 120039091
Change-Id: I4ca03c9185081d300d7e325965b1e20515e33d51
2019-03-22 16:07:03 +00:00
Sunny Goyal
006ab03fb7 Merge "Updating the AppTarget API to use a builder for constuction" 2019-03-22 15:55:17 +00:00
TreeHugger Robot
f81337ade4 Merge "Sharesheet - Support landscape mode" 2019-03-22 12:31:22 +00:00
TreeHugger Robot
0917f93924 Merge "Raster and badge directshare with IconFactory" 2019-03-22 03:57:26 +00:00
TreeHugger Robot
f621dfc7d5 Merge "Make LSS report honest password quality to DPMS" 2019-03-22 03:02:04 +00:00
Brad Stenning
75eaf771f8 Merge "Provide a hook for forcing all system bars to be displayed at all times" 2019-03-22 02:18:58 +00:00
Felipe Leme
2f28843249 Fixed Content Capture workflow when service package is updated.
The workflow already handles the case where the service dies and the framework re-establishes
the binder connection, but that didn't work when it died because the package was being updated.

This CL fixes this scenario by gracefully pausing the existing sessions before the package is
updated, then resuming them afterwards.

Test: manual verification
Test: atest CtsContentCaptureServiceTestCases # sanity check minus flakiness

Bug: 126266412
Fixes: 129072171

Change-Id: Ibc6b723c7bc08b4f920436f365d6006bc8fac7b6
2019-03-21 18:15:05 -07:00
TreeHugger Robot
e08a4e19c9 Merge "Move public methods of ResolverComparator to abstract class." 2019-03-22 01:09:29 +00:00
George Hodulik
30f0c6f32a Move public methods of ResolverComparator to abstract class.
The public methods of ResolverComparator are moved to
AbstractResolverComparator. The original implementation is moved to
subclass ResolverRankerServiceResolverComparator. Next on the
agenda is to move more of the common functionality to
AbstractResolverComparator.

Bug:129014961
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
      Tests pass except WindowDecorActionBarTest https://paste.googleplex.com/6680684066242560
      Also manually tested text, image, no matching apps, browsable/URI
Change-Id: I8bd4e923b448c6f9d4e55cc0d15f74752f42b85d
2019-03-21 12:01:34 -07:00
Matt Pietal
faedea813f Sharesheet - Support landscape mode
Measure the current icon width, and support a max of 4 icons wide in
portrait mode, or 8 in lanscape mode. Also correct an issue with cell
visibility; app targets were fading out when they should've been
instantly invisible.

Bug: 120419081
Test: atest ChooserActivityTest and visual inspection
Change-Id: I635532aff362b65900ec02bafaae818267b2d51f
2019-03-21 12:22:37 -04:00
TreeHugger Robot
ba5cb9136c Merge changes from topic "whichless"
* changes:
  BatteryStats remove which - log warnings
  LongSamplingCounter - remove update()
  Remove which from BatteryStats
2019-03-21 14:16:28 +00:00
Annie Meng
153edfc35e Merge "API Review: Make dataManagementLabel a CharSequence" 2019-03-21 10:17:09 +00:00
TreeHugger Robot
b9b1befb36 Merge "Trigger Augmented Autofill when the standard service used FillResponse.disableAutofill()" 2019-03-20 23:59:30 +00:00
Jeff Sharkey
5212157f0b Merge "Fix reading app ops data - framework" 2019-03-20 23:44:16 +00:00
Brad Stenning
e057369877 Provide a hook for forcing all system bars to be displayed at all times
Bug: 121257946

Test: manual
Change-Id: Ibbf41a03b0229b62366a42543e542af954a0ea8b
2019-03-20 16:27:47 -07:00
Mike Digman
9c4ae50255 Raster and badge directshare with IconFactory
Removes badge view and id. Unifies permission check for icon
loading. Fixes a threading issue in IconFactory so badging works
properly. Partly setting up for label and sublabel loading in a
future commit.

Fixes: 126568207
Test: manual
Change-Id: I265d08cc3a5c1499da252307fea6e28b22d59066
2019-03-20 13:29:35 -07:00
Felipe Leme
adb34f58de Trigger Augmented Autofill when the standard service used FillResponse.disableAutofill()
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.augmented.DisableAutofillTest
Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 123099744

Change-Id: Ic40727a72f931d7a062dedf02fa83d091648498b
2019-03-20 12:03:30 -07:00
Sunny Goyal
11af969687 Updating the AppTarget API to use a builder for constuction
Bug: 124017728
Test: Everything compiles
Change-Id: I1c07a5dcf0483d014b8350a03ccce141405f6089
2019-03-20 11:03:43 -07:00
Bookatz
db6d624a19 BatteryStats remove which - log warnings
In ag/6694908, BatteryStats is changed to only support the "which" of
STATS_SINCE_CHARGED. Here, we deal with BatteryStats calls that attempt
to use a different which, logging the event, exiting, and/or just using
STATS_SINCE_CHARGED as applicable.

Test: compiles
Bug: 70892428
Change-Id: Id0e9f863d8b1a5fb7baa770683c0c4ec5880e976
2019-03-20 10:13:58 -07:00
Pavel Grafov
19a4fb3fe0 Make LSS report honest password quality to DPMS
Previously password quality would be promoted to whatever admin
has requested or depending on whether it was PIN or password.

Bug: 120536847
Test: manual, steps from b/123924734
Test: atest DeviceAdminHostSideTestApi24#testRunDeviceOwnerPasswordTest
Test: atest MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest PasswordMetricsTest
Change-Id: I51ca2d327f4c6db8f74c0b0ec35e4a3a346a9b5c
2019-03-20 15:53:02 +00:00
Adrian Roos
5f9ec2c1c6 Merge "Gestures: Assemble per-window exclusion zones" 2019-03-20 15:28:03 +00:00
Svet Ganov
8e5bf968c1 Fix reading app ops data - framework
There was an optimized code path that is hit if the op
has not been accessed that does not write the uid state
information which did not add the closing tag which
resulted in producing a malformed XML.

Test: atest android.app.appops.cts.AppOpsTest#testNonHistoricalStatePersistence

bug:128872367

Change-Id: Iaddcce09b41f3e124e1838b65731d8dac9ca64e3
2019-03-20 15:12:23 +00:00
Annie Meng
4eb4efc466 API Review: Make dataManagementLabel a CharSequence
Make the data management label a CharSequence for the system APIs:
- BackupManager#updateTransportAttributes
- BackupManager#getDataManagementLabel
- BackupTransport#dataManagementLabel

Renames dataManagementLabel -> dataManagementIntentLabel to change
return type

Removes getDataManagementLabel AIDL method as usages converted to use
"forUser" version in topic CL.

Bug: 113856654
Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest BackupManagerTransportAttributesHostSideTest
3) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
4) Manual: boot and verify transports registered properly using old API;
Modify LocalTransport to use new API, verify success

Change-Id: Ia48017156debe0a29684909f58927fa1fbf972f9
2019-03-20 12:13:10 +00:00
Misha Wagner
3989eb02bc Clean up KernelCpuThreadReader
This includes (as well as nits by IntelliJ):
- Removing getCurrentProcessCpuUsage, as it was only used in tests
- Updating class documentation
- Adding @Presubmit annotations to tests
- Reformat using google-java-format

Test: atest KernelCpuThreadReaderTest

Change-Id: I710773043b9e9ef40545c20667fe2f79e9915e43
2019-03-20 11:19:21 +00:00
Adam He
c384395d1a Merge changes from topics "aa_fill_ui", "aa_cancellation"
* changes:
  Don't show fill ui if fillrequest times out.
  Implemented CancellationSignal for augmented autofill requests.
2019-03-19 17:31:37 +00:00
Matt Pietal
73a873f235 Sharesheet - Profile switching & permissions
Need to make sure all content uris have the userid prepended in them,
otherwise when switching profiles the chooser will be denied access.
This is needed for content preview in the chooser itself.

Bug: 128597855
Test: atest ChooserActivityTest
Change-Id: Id835c7b443c1c5a83a8bf61d0545d86e32e92bfc
2019-03-19 07:36:10 -04:00
Andreas Gampe
5c22b02211 Merge "Zygote: Load system server code early" 2019-03-19 00:09:44 +00:00
Bookatz
1371b9ac52 LongSamplingCounter - remove update()
It wasn't being used anywhere and was requiring an extra long. Since
LongSamplingCounter takes up (cumulatively, due the huge number of
them) a lot of memory, each byte counts for a lot. (It was added in
ag/3771500, but appears to have never been used, so we restore its
original algorithm.)

Test: atest LongSamplingCounterTest
Change-Id: I7349e927ae6fe8c941e408c4d0843b638bf070e9
2019-03-18 16:17:56 -07:00
Mike Ma
99e57c3c40 Remove which from BatteryStats
BatteryStats tracks three "which" states:
STATS_SINCE_CHARGED,
STATS_CURRENT,
STATS_SINCE_UNPLUGGED

However, only STATS_SINCE_CHARGED is really needed; the other two
just take up a lot of unjustifiable RAM. We therefore remove them from
the implementation here.
We also remove mLastTime and mLastCount from Timers and Counters, since
it was always zero anyway.

While the other two "whiches" are left as constants, they are ignored,
and all functions treat any which as STATS_SINCE_CHARGED. In particular,
SystemHealthManager now uses STATS_SINCE_CHARGED, rather than
STATS_SINCE_UNPLUGGED for all of its Battery statistics.

This is adapted from ag/4310406, but slimmed down to just the 'which'
removal parts.

Bug: 70892428
Test: com.android.internal.os.BatteryStatsTests
Change-Id: I86f2743ff30afc15bbaa12c68f3206ea528857a1
2019-03-18 16:17:36 -07:00
TreeHugger Robot
93b4ed4cd8 Merge "Force LSKF in ConfirmCredential UI when pending escrow token exists" 2019-03-18 19:44:47 +00:00
Adam He
52577fcc24 Implemented CancellationSignal for augmented autofill requests.
Fixes: 122728762
Bug: 127062800
Test: atest android.autofillservice.cts.augmented.AugmentedLoginActivityTest#testCancellationSignalCalledAfterTimeout
Change-Id: Id6f0d6f5ac4e47b07e32c255fdbb02af878b6921
2019-03-18 11:42:33 -07:00
Adrian Roos
4ffc8977e2 Gestures: Assemble per-window exclusion zones
Adds a facility to listen for per-window exclusion zones and
assembles them into a per-display exclusion zone ready for
consumption by interested parties.

Bug: 126360272
Test: atest DisplayContentTests
Change-Id: Ic186f86ca551af98a5f77beb254d257c281a4160
2019-03-18 17:45:05 +00:00