Commit Graph

10294 Commits

Author SHA1 Message Date
Geoffrey Pitsch
af759c52ce Channels for Frameworks notifications
Adapts all notifications used by system services to use channels.
Channels are initialized by SystemServer after the NotificationService
has started.

Test: runtest systemui-notification
Change-Id: I25c45293b786adb57787aeab4c2613c9d7c89dab
2017-03-01 10:17:15 -05:00
TreeHugger Robot
247a3c0132 Merge "Introduce ANSWER_PHONE_CALLS permission" 2017-03-01 01:10:20 +00:00
Dianne Hackborn
59774e209c Merge "Add new job scheduler constraints for "battery not low"." 2017-02-27 21:11:29 +00:00
TreeHugger Robot
6087ea2b9d Merge "Provide some compatibility story for devs in the past" 2017-02-27 20:28:58 +00:00
Dianne Hackborn
a06ec6a943 Add new job scheduler constraints for "battery not low".
Clean up the implementation of boolean constraints so that
they are in a single flags value that gets propagated all of
the way from JobInfo.Builder in to the JobStatus.  Much simpler
and easier to add new constraints!

Also introduce some shell commands to make it easier to write
tests against the job scheduler (and other things tied to power).
One of the big things here is that there is a new sequence number
that propagates with battery updates, which we can look for in
the job scheduler to determine when a change the test has made
to battery state has actually gotten applied, to allow it to
safely and minimally wait until executing the condition being
tested.

Test: New BatteryConstraintTest suite added.

Change-Id: I11076d90b80ec25ee604c29b6a6dc2337fd867ce
2017-02-27 10:54:06 -08:00
Makoto Onuki
9687767d75 Merge "Allow querying providers with a specific metadata." 2017-02-27 18:35:20 +00:00
Jason Monk
bd9836496c Provide some compatibility story for devs in the past
They should be providing themes when resolving certain resources,
but they aren't anyway, so try to provide it free of charge, when
possible. Also, nothing is ever free.

Test: Open app that uses old/bad resource methods
Change-Id: Icd57aadf1202ddffb1dd73ab45119fae7e5d6130
Fixes: 35656110
2017-02-27 09:21:53 -05:00
Eugene Susla
cae3d3e59e Introduce ANSWER_PHONE_CALLS permission
This exposes an API to answer a ringing call, as well as a corresponding
runtime permission and appop

Test: Grant the permission and ensure the call gets answered.
Deny the permission, and ensure that the API call throws an exception.
Bug: 30932767
Change-Id: I4c33fcea6b95a30469fa6c0c37090be32b0ad52e
2017-02-24 20:28:46 -08:00
Robin Lee
1cd368b074 Merge "Thorough javadocumentation for network logging API" 2017-02-24 21:28:17 +00:00
TreeHugger Robot
96429a18aa Merge "Change time methods to durations." 2017-02-24 20:49:57 +00:00
TreeHugger Robot
ab6798951a Merge "Fix broken RestrictedLockUtils KeyGuard APIs" 2017-02-24 19:29:48 +00:00
Robin Lee
a40a2fba00 Thorough javadocumentation for network logging API
Explaining what the limitations of the underlying network logging
implementation are and what alternatives exist for the cases where
best-effort isn't an option.

Test: make docs
Change-Id: I000345ae5ba15bdc9e31dedf6de394d2538729a9
2017-02-24 00:18:37 +00:00
Julia Reynolds
5098977b20 Change time methods to durations.
Test: cts, cts verifier, runtest systemui-notification
Change-Id: Ia612f59e91f3a3e1de14cd7217fe18ecaf61033c
2017-02-23 14:52:49 -05:00
TreeHugger Robot
c302a1adc6 Merge "Add isBundled argument to LoadedApk.makePaths call" 2017-02-23 18:05:04 +00:00
Makoto Onuki
3275729203 Allow querying providers with a specific metadata.
CP2 will need it to scan GAL providers faster.

Test: Manual test with CP2 under development
Bug: 35388445
Change-Id: I1202420078b1bbe48f6eb4bb9e3f705c71df9c0c
2017-02-23 09:36:09 -08:00
TreeHugger Robot
189796dace Merge "Expose isStateSaved() in FragmentManager." 2017-02-23 16:36:02 +00:00
TreeHugger Robot
f30b879c73 Merge "Added sanitization for CompoundButton and RadioGroup." 2017-02-23 15:24:07 +00:00
Bryce Lee
32bd2ea56c Merge "Update DisplayAdjustments in Display from Resources." 2017-02-23 15:15:10 +00:00
Dimitry Ivanov
638d810099 Add isBundled argument to LoadedApk.makePaths call
There is a disconnect between the way webview created
classloader and the way makePaths decides if paths are
intended for bundled app.

This change moves decision making out of makePaths method
which allows WebViewZygote to pass correct argument and
have makePath omit java.library.path for libPaths

Bug: http://b/35426785
Test: manual
Change-Id: Iab5a18c0091d0193dafa750498eb00f378411ba0
2017-02-22 23:52:01 -08:00
Felipe Leme
62fb65fd3c Merge "Added auto-fill support for Spinner." 2017-02-23 06:45:16 +00:00
Jeff Sharkey
6f2c1ea250 Merge "Add queryStatsForPackage() API." 2017-02-23 03:21:47 +00:00
Felipe Leme
c01a873c4f Added sanitization for CompoundButton and RadioGroup.
Bug: 33269702
Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass

Change-Id: Ie2c8d2784227371588aa02973b8ef3ac1a6950aa
2017-02-22 19:15:38 -08:00
Felipe Leme
d09ccb8db6 Added auto-fill support for Spinner.
Spinner is a special kind of list-value field because its auto-fillable
values are not currently present in the assist structure: this change
adds a getAutoFillOptions() to fill that void, and implements the
auto-fill APIs on Spinner.

It also fixes RadioGroup.getAutoFillValue() - it should return the index
of the child, not its resource id.

Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass
Change-Id: I625e7dd705fade56fda490fcd3c4446c0c245ee1
2017-02-22 16:09:50 -08:00
Svetoslav Ganov
6699538fb6 Merge "Fix a memory leak in AutoFillManager" 2017-02-23 00:02:56 +00:00
Jeff Sharkey
373d01766f Add queryStatsForPackage() API.
This gives developers a way to collect package-level stats, even if
it means we have to use manual calculation for sharedUserId apps.

Also round size of storage devices to nice power-of-two values so we
do a better job of matching retail packaging.

Test: builds, boots
Bug: 35294241
Change-Id: I24946c443bb9dc4b0411a8149a0656702ac1fd24
2017-02-22 15:48:51 -07:00
Sudheer Shanka
f764962b0d Merge "Revert "Ensure network connectivity on app start."" 2017-02-22 22:47:56 +00:00
Sudheer Shanka
c9d9407e8e Revert "Ensure network connectivity on app start."
This reverts commit 27e6931583.

Change-Id: I4c41ce7c1839d3b91931bc8a8f117f32bf6cd381
2017-02-22 22:13:55 +00:00
TreeHugger Robot
f5da23114d Merge "Improved documentation and added @CallSuper on onProvideAutoFillStructure()." 2017-02-22 19:39:18 +00:00
Bryce Lee
609bf65668 Update DisplayAdjustments in Display from Resources.
Previously, a copy of DisplayAdjustments was provided during Display
construction. If the Display instance is held, the adjustments would
not update. However, the DisplayInfo would, leading to a mismatch.

This changelist adds a reference to the Resources, which can be
queried to provide the latest adjustments.

Fixes: 33430498
Test: manual from bug repro steps.
Test: make -j32 cts; cts-tradefed; run cts --module CtsAppTestCases --test android.app.cts.DisplayTest#testRotation

Change-Id: Ida2ed3990add885d06b011494af24b055343f3fa
2017-02-22 10:27:34 -08:00
George Mount
27b0dc0287 Expose isStateSaved() in FragmentManager.
Bug 35594367

Protect the FragmentManager during onBackPressed() from
changing the state after the state was saved.

Test: I15891a70699308eddda4e55fa0eb96064ffa7b17
Change-Id: I10f823801e85ca200351a64b14975c4421b9068b
2017-02-22 10:06:10 -08:00
Robin Lee
acdeac6809 Fix broken RestrictedLockUtils KeyGuard APIs
They were all broken in that they returned profile admins for parent
queries even when they clearly shouldn't.

Examples:
 - disable unredacted notifications
 - disable fingerprint

This doesn't seem to have been tested beyond the bare basics of one
user with one device admin. Added some reasonable coverage. It could
still do with more.

Test: make RunSettingsLibRoboTests
Bug: 34929375
Change-Id: I1b0e986056ffa62d47091c0010977ac810ebd690
2017-02-22 17:39:34 +00:00
Felipe Leme
bd271212a2 Improved documentation and added @CallSuper on onProvideAutoFillStructure().
onProvideAutoFillStructure() sets mandatory auto-fill information like the
auto-fill id, so we must enforce subclass to call it.

Bug: 35395043
Test: m update-api
Change-Id: I525690b38639d970f516a906ddeb3a6bd6e01d8c
2017-02-22 09:05:50 -08:00
Svet Ganov
17db9dc38c Fix a memory leak in AutoFillManager
Test: Auto-fill CTS tests pass

bug:35435080

Change-Id: I3006cd8394a04bcd64da015f392d084267646366
2017-02-21 20:00:20 -08:00
Suprabh Shukla
0b1356ff1f Fix 'Modifying dpm.setSecureSetting call for install_non_market_apps'
The previous change was reverted as it broke work profile provisioning.
Clearing binder calling identity before calling into settings provider
should fix the issue.

Test: runtest managed-provisioning
Test: runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: Manually tested that work profile is inflated with expected values
of install_non_market_apps

Bug: 33947615
Bug: 35590590

Change-Id: I3c31a73fef0c25c0e682e18f637272adad39b28d
2017-02-21 18:36:28 -08:00
TreeHugger Robot
f780d86963 Merge "Add API to mark sanitized fields and implement it on TextView." 2017-02-21 21:36:50 +00:00
Jeff Sharkey
830d4b422d Merge "Clear cache space when allocating bytes." 2017-02-21 20:56:59 +00:00
Felipe Leme
33791fd54b Add API to mark sanitized fields and implement it on TextView.
When sending a ViewNode to the auto-fill service, it's necessary to sanitize
it so it does not contain PII (Personally Identifiable Information).

A good rule of thumb is to mark as sanitized nodes whose value were statically
set from resources. Ideally, that logic should belong to View, but View does
not know how its contexts are set, so the decision must be made by the
subclasses, and this CL implements that logic on TextView (which is the main
auto-fill type - others will come soon...)

Bug: 33269702

Test: CtsAutoFillServiceTestCases pass
Test: manual verification

Change-Id: I4dcdd8419a35812bd2f15a63a5be85f8cd97bb4e
2017-02-21 11:47:33 -08:00
Jeff Sharkey
d5d5e926eb Clear cache space when allocating bytes.
Fleshes out remainder of allocation implementation, where we offer
to clear cached data to satisfy the allocation request.  To prevent
abuse, we never let apps allocate into either the minimum cache space
or low storage space.

Clean up quota APIs to require the caller to pass in the path they're
interested in, and we resolve the underlying filesystem for them.

Defines settings that can be used to tweak the minimum cache space.

Test: builds, boots
Bug: 34690590
Change-Id: I85bc07399f91ee4aa568a8a54c615646bf748ad4
2017-02-21 11:50:55 -07:00
Daniel Nishi
58229846d0 Merge "First pass at adding the cache quota suggestions." 2017-02-21 17:37:58 +00:00
Stefano Tommasini
085bb4beff Merge "Add more instrumentation to BackupManager." 2017-02-21 17:08:11 +00:00
George Mount
9659c4d646 Merge "Ensure transactions cannot be run during controller state change" 2017-02-21 15:19:03 +00:00
Stefanot
2815496b32 Add more instrumentation to BackupManager.
This CL continues work of: ag/1835775 and ag/1870141 adding a few more
logging constans described here:
https://docs.google.com/document/d/1sUboR28LjkT1wRXOwVOV3tLo0qisiCvzxIGmzCVEjbI/edit#

Test: manual

BUG: 34873525
Change-Id: I8c81d8cfea5538e89de94919062eeff6ae09dce4
2017-02-21 12:44:32 +00:00
Victor Chang
5663e05109 Revert "Modifying dpm.setSecureSetting call for install_non_market_apps"
This reverts commit 2e7d6d64b9.

Bug: 35590590
Fix: 35590106
Test: runtest managed-provisioning
Test: manual verified that work profile can be inflated
Change-Id: Ie780b94053e65bca2f96b32055937c0c9e8beae8
2017-02-20 17:00:58 +00:00
Svet Ganov
00c771dc7d Add support for remote views backed auto-fill UI
Test: CTS and manual

Change-Id: Ia09f0208d78439491052e4886a0e71c387b73370
2017-02-20 00:37:33 -08:00
TreeHugger Robot
2a80419409 Merge "Catch reentrancy while executing postponed transactions." 2017-02-17 23:06:17 +00:00
TreeHugger Robot
dd903d4f0e Merge "Modifying dpm.setSecureSetting call for install_non_market_apps" 2017-02-17 23:05:48 +00:00
George Mount
e718151625 Ensure transactions cannot be run during controller state change
Bug 35349893

When the FragmentManager is being brought up or down, the state
of fragments is changed. Any fragment using commitNow() during
the state change was being allowed through instead of throwing.

This CL locks out reentrant fragment transctions during
FragmentManager state changes.

Test: Iea6029ccfa660e8eea5ea7472f641dada1a6c269
Change-Id: I735d86a42951c6f58f048e4930be925da9c8247e
2017-02-17 13:36:50 -08:00
Suprabh Shukla
2e7d6d64b9 Modifying dpm.setSecureSetting call for install_non_market_apps
Starting from O, install_non_market_apps is deprecated and will not be
checked by the package installer. Device admin apps should be using the
user restriction instead.
Since on managed profiles, the default value blocked install from
unknown sources, the system will set the user restriction on behalf of
the profile owners (if the profile has one).
For non-managed profiles, the user had access to the settings to change
the value of install_non_market_apps. So going forward, any request to
change it's value by dpm#setSecureSetting in such users is going to be
ignored.

Test: Manually tested that:
1. For a profile with PO, when install_non_market_apps was set to 0,
user restriction is set on upgrade
2. For a profile with PO, when install_non_market_apps was set to 1,
user restriction is not set on upgrade
3. After upgrade, newly created managed profiles with PO have user
restriction set

Bug: 33947615
Change-Id: I063e9ee608b52086ffdf8ed2b24e2928574c58cd
2017-02-17 13:25:14 -08:00
TreeHugger Robot
96b9832163 Merge "API for accessing preloaded files cache" 2017-02-17 21:09:28 +00:00
TreeHugger Robot
8c9a6b0089 Merge "Revert "Revert "Per user setting for instant app""" 2017-02-17 20:46:12 +00:00