Commit Graph

10279 Commits

Author SHA1 Message Date
TreeHugger Robot
c302a1adc6 Merge "Add isBundled argument to LoadedApk.makePaths call" 2017-02-23 18:05:04 +00: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
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
TreeHugger Robot
0df4c60716 Merge "Fix trampoline activities when relaunching PiP" 2017-02-17 20:14:24 +00:00
Fyodor Kupolov
61221290f5 API for accessing preloaded files cache
Added @SystemAPI method Context.getPreloadsFileCache.

Bug: 31008665
Test: manual
Change-Id: Id61ab5e1b78d8bfbd40f61985406a8de4082b30f
2017-02-17 10:40:54 -08:00
TreeHugger Robot
a4f3891d28 Merge "Mark clearDeviceOwnerApp/clearProfileOwner as deprecated" 2017-02-17 18:38:36 +00:00
Andrii Kulian
000fd43eec Merge "Report move to display for activities that handle config changes" 2017-02-17 18:27:29 +00:00
Daniel Nishi
cf9d19e030 First pass at adding the cache quota suggestions.
This currently integrates with installd, but not with
any framework API to expose this information to apps.

The first pass, as per the design doc, adds a service
which polls for large changes in the file system free space.
If enough spaces changes, it begins a recalculation of the
cache quotas and pipes the information down to installd.
This calculation is done in the updateable ExtServices.

Further enhancements in later patches include integrating this
to listen to package install and removal events, caching the
last computed quota values into an XML file on disk to load
on boot, and exposing the information to apps.

Bug: 33965858
Test: ExtServices unit test

Change-Id: Ie39f228b73532cb6ce2f98529f7c5df0839202ae
2017-02-17 10:26:16 -08:00
Winson Chung
49affea25b Fix trampoline activities when relaunching PiP
- We should be checking the actual launched-from package since that stores
  the source package across trampoline activities

Bug: 35458117
Test: Enter PiP from a trampoline activity, launch again from Launcher
      and ensure that it is expanded

Change-Id: Ia0e586e8b21dee63b513bd61a41a24e7da4325e1
2017-02-17 10:07:30 -08:00
Bartosz Fabianowski
4f7e1fc9af Merge "Add API for checking whether the default IME was set by the DO/PO" 2017-02-17 17:53:02 +00:00
George Mount
521862de53 Catch reentrancy while executing postponed transactions.
Bug 35349893

While executing postponed transactions, it was possible for
Fragments to call commitNow() or executePendingTransactions()
and therefore causing disallowed reentrancy.

This CL now prevents reentrancy while executing postponed
transactions.

Test: I11e10f4d9868a31b8b1616a051e381fe8c7af331

Change-Id: Icb0d4386657c35b4edf34f95dc48aa694e66b298
2017-02-17 08:04:00 -08:00
Esteban Talavera
5b7f2d0858 Backup service APIs not available on parent profile instance
Bug: 35432611
Test:  cts-tradefed run cts-dev --module DevicePolicyManager --test  com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: Ia1621183dee17dcd183a668f1714b563f79e5b17
2017-02-17 09:45:24 +00:00
Andrii Kulian
b047b8bd7e Report move to display for activities that handle config changes
When activity that is moved between displays handles all configuration
changes, it won't be restarted. This CL adds a callback to the client
to notify it about display change. Usually it will be followed by
onConfigurationChanged, except when configuration didn't actually change.
When activity is recreated, it won't receive onMovedToDisplay.

Bug: 34862802
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I9a9501cab788623ada15a31efb53e4b2378639fe
2017-02-16 17:33:59 -08:00
Todd Kennedy
be0b8896d1 Revert "Revert "Per user setting for instant app""
This reverts commit be9ffa15af.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ib21321cf157a79890de487060a093840f7182047
2017-02-16 12:43:37 -08:00
Esteban Talavera
a5b0963c0c Mark clearDeviceOwnerApp/clearProfileOwner as deprecated
Bug: 33175679
Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest    frameworks-services
Change-Id: I05e10638d838ccf8dc67b7a01b3ffeb7cbea8500
2017-02-16 18:47:06 +00:00
Makoto Onuki
467d4ab03d Merge "Make the DPM account strings system-APIs." 2017-02-16 17:58:02 +00:00
Felipe Leme
387f45d78f Merge "Add URL on ViewStructure." 2017-02-16 16:04:22 +00:00
Bartosz Fabianowski
aff5e9c21c Add API for checking whether the default IME was set by the DO/PO
With this API, the system can determine whether a user's default
IME was set by the user or the user's DO/PO.

Bug: 32692748
Test: DPMS unit tests and CTS CtsDevicePolicyManagerTestCases

Change-Id: Ibd703ff5c9e4c072599ad8d6023c94a97d728109
2017-02-16 13:07:11 +01:00