Commit Graph

5203 Commits

Author SHA1 Message Date
Jeff Sharkey
179d6b3f0c Deprecate storage "low" and "ok" broadcasts.
These broadcasts resulted in a terrible user experience where dozens
of apps would wake up and try deleting everything they possibly can,
meaning that we'd thrash between showing/hiding the low space
notification to users.

Instead, if apps have data that they're okay being purged when the
system is chronically low on space, we want to strongly encourage
them to rely on the much-improved getCacheDir() behaviors in OC.

Test: builds, boots
Bug: 35406598
Change-Id: I74abfba1b8d3948363b79f8b66ca0ad60faac756
2017-03-12 17:31:20 -06:00
TreeHugger Robot
642028fccd Merge "Replaced auto-fill by autofill to keep it consistent with API style." 2017-03-10 07:05:41 +00:00
Felipe Leme
640f30a776 Replaced auto-fill by autofill to keep it consistent with API style.
This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
2017-03-09 08:14:49 -08:00
TreeHugger Robot
6e2026c348 Merge "Fix stale data due to stopped loader." 2017-03-09 15:13:09 +00:00
TreeHugger Robot
c66b2d2313 Merge "Add OverlayManagerService#setEnableExclusive" 2017-03-09 03:14:57 +00:00
George Mount
899ca3236d Fix stale data due to stopped loader.
Bug 33185424

When stopping an CursorLoader while data is being loaded,
the load task will be canceled. This CL marks the data as
changed if the cancel is called while the loader is stopped.

Test: I63b48210a25be72d13a2a6182eb1757cbe6a1949
Change-Id: Ibf9c5facdcc5160f6ed146c5fdd063549ac2a7a8
2017-03-08 15:29:27 -08:00
Jeff Sharkey
60f95aa00a Move lagging users over to new storage API.
Over the last month we've been moving everyone over to the new
StorageStatsManager public APIs, but we missed these users.

The ApplicationsState changes are straightforward, but we had to
completely rewrite StorageMeasurement to use the new fast-path
quota APIs.

Test: builds, boots, UI using StorageMeasurement works.
Bug: 36056120
Change-Id: If02177c95bf8c96ae4eceac4d631a168f99bef84
2017-03-08 13:57:29 -07:00
TreeHugger Robot
aae1cc597d Merge "Expose Instant App API defined in MR1" 2017-03-07 23:20:53 +00:00
Daniel Nishi
8603ad42df Merge "Use the fast track for the AppCollector." 2017-03-07 22:55:20 +00:00
Jason Monk
929ed8d2f4 Add OverlayManagerService#setEnableExclusive
This lets settings use one call to set the current theme overlay
for the "android" package.

Test: Change theme in Settings -> Display
Change-Id: Ia566e58c5479dedb7184f4218151f8080f8ebc0f
2017-03-07 16:01:20 -05:00
Todd Kennedy
9c9fdf27ff Expose Instant App API defined in MR1
These were created in MR1 but couldn't be submitted because
they were defined too late [after API freeze].

Change-Id: Ie6884236776bd26e9d0b557fd125b8c77b0ad93b
Fixes: 34890162
Fixes: 35193180
Fixes: 35193418
Test: manual
2017-03-07 11:40:59 -08:00
TreeHugger Robot
a61627935e Merge "Support non-system Font Providers" 2017-03-07 18:17:15 +00:00
TreeHugger Robot
c7eefdbda7 Merge "Framework: Avoid string allocations" 2017-03-07 16:02:54 +00:00
Clara Bayarri
3c4be77db9 Support non-system Font Providers
To do this, the developer must specify the set of certificate
hashes that represent the authority's app. This allows us to
verify that the authority we find is indeed the one intended
by the developer.

Bug: 35025705
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
CTS attached to topic
Change-Id: I605f9a93bbca8705936ead08efb4a5b4fdcc4882
2017-03-07 14:59:33 +00:00
TreeHugger Robot
8cfea13985 Merge "Move requestKeyboardShortcuts intent to com.android" 2017-03-07 03:59:47 +00:00
Andreas Gampe
e9a5262f2a Framework: Avoid string allocations
Avoid common string allocations for ":complete".

Test: m
Test: Device boots
Change-Id: I8c7a53346a4e1aa1beefd17429e13e20ab510f20
2017-03-06 17:27:09 -08:00
TreeHugger Robot
a485f71fd7 Merge "Refactor EphemeralResolverService" 2017-03-06 21:39:17 +00:00
Clara Bayarri
847d8683a0 Move requestKeyboardShortcuts intent to com.android
Test: none
Bug: 35307747
Change-Id: Ibaf260ebe75bc80d48167209af7d034c582160b7
2017-03-06 16:48:44 +00:00
TreeHugger Robot
64979aacb5 Merge "expose isSealed() from the installer session" 2017-03-04 00:47:36 +00:00
TreeHugger Robot
4992dbb6f7 Merge "Mark ACTION_VOICE_ASSIST as SystemApi" 2017-03-03 23:58:19 +00:00
Todd Kennedy
1fb3404b2b Refactor EphemeralResolverService
* Change name to InstantAppResolverService
* Left old service in place to handle existing client
  [to be removed prior to O launch]
* When resolving phase II, return a list instead of a single item

Bug: 34763730
Test: Build and verify resolution occurs w/ legacy & new resolver service
Change-Id: Ieccaf91538bd91c04f4be4e35d8264619d7cd6d7
2017-03-03 15:45:20 -08:00
Todd Kennedy
04cc191c3c expose isSealed() from the installer session
Change-Id: I5232a012fbee8931b0e3f584d6bb2e273a789dee
Fixes: 35948628
Test: Manual
2017-03-03 15:03:30 -08:00
TreeHugger Robot
e096df0063 Merge "Adding support for passing arbitrary extras when requesting to pin a widget. Also defining an extra constant for widget preview which can be used by developers to provide a snapshot of the widget with the pin request" 2017-03-03 22:26:49 +00:00
Amith Yamasani
1645203104 Mark ACTION_VOICE_ASSIST as SystemApi
.. since it is implemented by a system app. This allows the
CTS test that verifies android.* namespace intents to pass.

Change-Id: I083e1d12a79fa67e15158ca7390353303cd0e06e
Fixes: 35274957
Test: cts-tradefed run cts-dev -m CtsSignatureTestCases
2017-03-03 14:13:28 -08:00
TreeHugger Robot
2c66f192ca Merge "Add extra indicating honored query arguments." 2017-03-03 16:35:14 +00:00
TreeHugger Robot
8fb42cc3b2 Merge "Let ResourcesManager generate CompatResources" 2017-03-02 21:28:27 +00:00
TreeHugger Robot
c8f0100248 Merge "Adding platform constants for various install reasons." 2017-03-02 19:58:07 +00:00
Dianne Hackborn
594ea5f8b0 Merge "Implement issue #34842682: Add ability to limit permissions based on features" 2017-03-02 18:31:15 +00:00
Steve McKay
415f41ba20 Add extra indicating honored query arguments.
Rename QUERY_RESULT_SIZE to EXTRA_TOTAL_SIZE.

Change-Id: I18f1e0b77362c6f898bc4d5846e21dfb205be19a
Test: Manual
Bug: 30927484
2017-03-02 10:23:23 -08:00
Jason Monk
bd60e5bf2e Let ResourcesManager generate CompatResources
This will let the ResourcesImpl be updated and handle null cases
better.

Test: Select text while composing email.
Change-Id: Ia8aed22f02b040a202db9cbb2bc02687c693cfa1
Fixes: 34761805
Fixes: 35869547
2017-03-02 12:55:00 -05:00
Sunny Goyal
80af6a27fd Adding platform constants for various install reasons.
Bug: 33415829
Test: Not a  testable change
Change-Id: Ib0803e55f71a1c6b46e12b1a324db4e028a20529
2017-03-02 08:34:22 -08:00
TreeHugger Robot
c20082bd46 Merge "Change MaskableBitmap to AdaptiveBitmap Test: $ make dist -j30 b/35399620" 2017-03-02 15:15:43 +00:00
Sunny Goyal
4ad6b57700 Adding support for passing arbitrary extras when requesting to pin a widget.
Also defining an extra constant for widget preview which can be used by
developers to provide a snapshot of the widget with the pin request

Bug: 35811129
Test: All exisiting tests passing
 for f in 1 2 3 4 5 6 7 8 9 10; do \
   adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest$f \
      -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner; \
        done;

 adb shell am instrument -e class com.android.server.appwidget.AppWidgetServiceImplTest \
   -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Id854bd28468a5bf0416ff1a1b19c44d850016f32
2017-03-01 16:58:21 -08:00
David Christie
31a1655191 Create PackageManager.isInstantApp API to query whether
a given package name is an instant app.

Test: refactor existing codepaths retained

Change-Id: I6253fe8cc398d6547566d11043bffd1c4ffaa74a
2017-03-01 16:36:48 -08:00
Hyunyoung Song
e4179e2c4e Change MaskableBitmap to AdaptiveBitmap
Test: $ make dist -j30
b/35399620

Change-Id: I96d6eaceaf7ce9dec7de21634a5fa2bd40b0deba
2017-03-01 15:14:02 -08:00
TreeHugger Robot
5a7c7b8e53 Merge "Remove FastJNI optimization on AssetManager to avoid dead lock." 2017-03-01 22:06:17 +00:00
TreeHugger Robot
fb64de06cd Merge "Use context's userId in ContentResolver class." 2017-03-01 21:49:30 +00:00
Dianne Hackborn
cd154e9535 Implement issue #34842682: Add ability to limit permissions based on features
Two new attributes for <uses-permission>: android:requiredFeature and
android:requiredNotFeature.

Also update aapt to include this information in badging:

uses-permission: name='android.content.cts.REQUIRED_NOT_FEATURE_UNDEFINED' requiredNotFeature='android.software.cts.undefined'
uses-permission: name='android.content.cts.REQUIRED_MULTI_DENY' requiredFeature='android.software.cts.undefined' requiredNotFeature='android.software.cts'

Test: new PermissionFeatureTest suite.

Change-Id: Icc1f815a4675ae9dd2cb7f61730ab28b5c11228a
2017-03-01 12:40:57 -08:00
Sudheer Shanka
b4e2ddde4f Use context's userId in ContentResolver class.
- When registering and notifying observers, we should use the user in the
context as opposed to current user.
- Relax the permission check while registering and notifying content observers
to use INTERACT_ACROSS_USERS instead of INTERACT_ACROSS_USERS_FULL permission.

Change-Id: I973936903d4a2272c5722f3b98a057a40c0402be
Fixes: 32955100
Test: Created managed profile and verified that there are not failures.
      runtest -x core/tests/coretests/src/android/content/SecondaryUserContentResolverTest.java
      runtest -x core/tests/coretests/src/android/content/ManagedUserContentResolverTest.java
2017-03-01 12:03:10 -08:00
Tim Zhang
fe25b1adaf Remove FastJNI optimization on AssetManager to avoid dead lock.
I found there was a dead lock among main, android.display and GC threads
when running monkey test.
 - Main thread got a mutex and was suspended by GC thread.
 - Android.display thread waited for mutex held by main thread.
 - GC thread waited for suspention of android.display thread.

This will lead to ANR or screen freeze.

Fixes: 32480078
Test: builds

Change-Id: I13cf1eca3cb3b7c01aa754874f2b48aab0b472e8
2017-03-01 10:05:19 -08:00
Nathan Harold
9ac082f8bb Merge "Add API Surface for creating IpSec Transforms" am: 7645fa2816 am: 0a6305d5dd
am: 3ddaf3e6b0

Change-Id: Idceae0e5a1af2f357378b03fc0d257dab605b217
2017-03-01 14:22:57 +00:00
Nathan Harold
0a6305d5dd Merge "Add API Surface for creating IpSec Transforms"
am: 7645fa2816

Change-Id: Ibe70a60c5c5808a7877145cccefcc1f11bfacc51
2017-03-01 14:12:55 +00:00
Nathan Harold
330e1089da Add API Surface for creating IpSec Transforms
This CL adds an API to set up an IPSec Security Association
and Security Policy to perform Transport-Mode and Tunnel-Mode encapuslation
of IP Packets.

Bug: 30984788
Bug: 34811752
Test: 34812052, 34811227
Change-Id: Ic9f63c7bb366302a24baa3e1b79020210910ac0a
2017-02-28 22:01:20 -08:00
TreeHugger Robot
1b4cdf909f Merge "Add boolean when instant apps are available" 2017-03-01 01:49:07 +00:00
Daniel Nishi
d7b0329ab7 Use the fast track for the AppCollector.
This replaces some of the threading shenanigans done to get this
working with the regular PackageManager call. By swapping this
out, we can get results faster, using less power, and with a
simpler implementation and testing strategy.

Bug: 35807386
Test: FrameworkServicesTest
Change-Id: Ib94fd7eba838b5e728f8f2615bcb4d9c82f21885
2017-02-28 16:50:53 -08:00
Todd Kennedy
32e075de37 Merge "fix typo" 2017-03-01 00:25:04 +00:00
Todd Kennedy
bcdaf9208c fix typo
Fixes: 35840741
Test: None; it's a javadoc fix
Change-Id: Ic59fe12351c24630d7ba18ffaafeef8035be35f5
2017-02-28 16:21:03 -08:00
Sunny Goyal
e19e5677a5 Merge "Sending explicit broadcast to the launcher when a package is installed" 2017-02-28 23:58:38 +00:00
Todd Kennedy
533c9ff58d Add boolean when instant apps are available
Bug: 34168547
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ic1072d02aa4d43947e689e4381c2c5ee43704dd0
2017-02-28 15:34:26 -08:00
TreeHugger Robot
a7aaae881c Merge "Delete ParcelableString, add StringParceledListSlice" 2017-02-28 22:09:06 +00:00