Commit Graph

9496 Commits

Author SHA1 Message Date
Andreas Gampe
bae0bb191e Merge "Frameworks: In the kill handler, ensure the logging handler was run" am: c0ac9e916f
am: c9740fb393

Change-Id: Ie65982c54312c3eb854a4e663fe7bd0ff22c92c5
2018-04-03 13:41:25 -07:00
Andreas Gampe
c9740fb393 Merge "Frameworks: In the kill handler, ensure the logging handler was run"
am: c0ac9e916f

Change-Id: Ica29cdf9a4b17b6cec957093c35b735d64568029
2018-04-03 13:29:06 -07:00
Andreas Gampe
50fa122cff Frameworks: In the kill handler, ensure the logging handler was run
In the KillApplicationHandler for uncaught exceptions ensure that the
LoggingHandler has been run. This ensures logging when code directly
calls getUncaughtExceptionHandler().uncaughtException().

Bug: 29624607
Bug: 73380984
Test: m
Test: manual
Change-Id: I9c9216714b4cf029d7ed21e29313c0e802345337
2018-04-03 08:33:28 -07:00
Sanry Huang
7a8aac8c6e Merge "android:ui crash on longpress of empty tile" into pi-dev 2018-04-03 02:22:48 +00:00
Remi NGUYEN VAN
75525b39f4 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
2018-04-02 13:30:02 +00:00
Remi NGUYEN VAN
6f5a8db2e9 Merge "Add method to NetworkStatsService for UID stats." into pi-dev 2018-04-02 05:40:04 +00:00
sanryhuang
296ca9e933 android:ui crash on longpress of empty tile
null pointer check because of resolveInfoForPosition is nullable

Test: manual
Bug: 62441400
Change-Id: I0a720f30f9e76d9bedf6175a6ba951bcf1707c47
2018-03-31 11:34:34 +08:00
TreeHugger Robot
a6d6a5aa79 Merge "Adding LauncherApps apis for suspended packages" into pi-dev 2018-03-31 00:39:52 +00:00
Suprabh Shukla
19b41f34a5 Adding LauncherApps apis for suspended packages
The suspending app can provide a Bundle of information to be used by the
launcher for handling suspended packages. Added APIs:
 - getSuspendedPackageLauncherExtras(String, UserHandle): To retrieve
 the launcher extras for the given package and user.
 - Callback#onPackagesSuspended(String[], UserHandle, Bundle): A
 callback that will be invoked with the package names and the launcher
 extras whenever sent packages are suspended.

Test: atest com.android.server.pm.SuspendPackagesTest

Bug: 76119578
Change-Id: I505d134809639a57c3314f994af34d576d905e74
2018-03-30 21:21:41 +00:00
Vishwath Mohan
18dcd47796 Don't clear mPattern when clearing visual pattern.
This CL ensures that when clearing the lockscreen pattern in
onHandleUp(), we retain mPattern. This fixes a bug that prevents
changing from Pattern to other modalities.

Bug: 77257848
Test: Change from pattern to pin/password

Change-Id: Ied74eafd17939214c62bdd617ecef7a9974f755d
2018-03-30 10:58:59 -07:00
Remi NGUYEN VAN
b6a920124f Add method to NetworkStatsService for UID stats.
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Bug: b/72107146
Merged-In: I31c5b9b4a7c6e72910152415894a137f000a5858
Merged-In: I2527d95000c7500c824ede70f87ecb38e21ed323
(cherry picked from aosp 088ff6824f)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1
2018-03-30 18:58:18 +09:00
Dmitry Dementyev
86f5bb1a8c Remove deprecated generateAndStoreKey method implementation
Bug: 77156834
Test: GTS, apct.
Change-Id: I23791fced21308467afc60cc16efc4aee7074134
2018-03-30 05:58:11 +00:00
Vishwath Mohan
b03dd4f4a3 Revert "Clear pattern on completion (if fade is enabled)."
This reverts commit b8e9782f70.

Bug: 77257848
Test: Can change from pattern to pin/password

Change-Id: I17f9625e506c8e0839fffa95a62c904890cac603
2018-03-29 12:53:56 -07:00
Anton Philippov
d903074ea8 Add FLAG_INCREMENTAL support to LocalTransport.
Implement performBackup() with flags argument:

1. If FLAG_INCREMENTAL is passed and transport has no data for this
package or supports only non-incremental backups, request a non-incremental retry.
2. If FLAG_NON_INCREMENTAL is passed, but transport has data, discard
that data and continue.

Bug: 72212840
Test: GTS test in the same topic
Change-Id: I4c4a1dbfa1a807e4d4c523f42bb6a404a39731e9
2018-03-29 16:56:10 +01:00
Remi NGUYEN VAN
aa20932ff1 Merge "Fix network usage stats on 464xlat tethered."
am: 83088dcd8e

Change-Id: I0e13c2a6b9f6b5d0701a073ddc835781d5d2aace
2018-03-29 07:36:21 +00:00
Mathew Inwood
fe930f2023 Merge "Configurable hidden API exemptions." into pi-dev 2018-03-29 06:49:27 +00:00
TreeHugger Robot
9cfdcfaf92 Merge "Clear pattern on completion (if fade is enabled)." into pi-dev 2018-03-29 01:06:06 +00:00
Adam Bookatz
f50e78d8f7 Merge "Fix statsd ble scan logging" into pi-dev 2018-03-28 21:49:29 +00:00
Vishwath Mohan
86ed912f5a Merge "Refactor FingerprintDialog to BiometricDialog" into pi-dev 2018-03-28 18:46:34 +00:00
TreeHugger Robot
744e6f1738 Merge "Also allow avoiding gfx acceleration at runtime" into pi-dev 2018-03-28 14:58:10 +00:00
Mathew Inwood
8faeab8735 Configurable hidden API exemptions.
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509

(cherry picked from commit 2c6f97d4c9)

Merged-In: Ib1245b69da4dac50c6968f1be62f1a74591dc433
Change-Id: I7b590f272fdcfcda5f18e216788ac34bc58beaed
2018-03-28 11:54:17 +01:00
Remi NGUYEN VAN
9fb55e4f03 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage

Change-Id: I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda
2018-03-28 12:14:14 +09:00
Vishwath Mohan
b8e9782f70 Clear pattern on completion (if fade is enabled).
This CL clears the pattern immediately once it's completed. This
ensures that a half-drawn pattern doesn't remain as an artifact on the
lock-screen while we display an error message.

This behavior is gated on pattern fading, so if that's disabled, then
we retain the previous behavior (of showing the incorrect pattern
along with the error message).

Test: Draw an incorrect pattern.
Bug: 74531517
Change-Id: I41569e3fe10f91b787ef22600beb66d44f98cd90
2018-03-27 19:30:52 -07:00
Bookatz
e5ec0b4433 Fix statsd ble scan logging
Ble scan logging in statsd has a few problems:

1. We want finer-grained detailed than just 'unoptimized'. What defines
unoptimized should be done at the config level, not be hard-coded.

2. The current mechanism is actually incorrect. When reset is called,
each ble scan is only told *once* that it stopped, but if the nesting
level is higher than that, statsd will think it is still nonetheless
running.

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testBleUnoptimizedScan
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testBleScan
Fixes: 71607284
Fixes: 69478888

Change-Id: Ied44f79aa569daab2acc85e90627a9736d0689a3
2018-03-27 15:14:23 -07:00
Mathew Inwood
625aa8d33a Merge "Configurable hidden API exemptions."
am: 4b8285b907

Change-Id: Ia61896bdedff170d75715094ce87b97dc96994ed
2018-03-27 22:05:14 +00:00
TreeHugger Robot
781e50a49b Merge "Migrate from config.xml to SystemConfig for disabled carrier apps" into pi-dev 2018-03-27 21:48:06 +00:00
TreeHugger Robot
dda147e179 Merge "Fix statsd logging in BatteryStats (nesting prob.)" into pi-dev 2018-03-27 21:45:46 +00:00
Vishwath Mohan
cf87df1531 Refactor FingerprintDialog to BiometricDialog
This CL changes FingerprintDialog into the more generic
BiometricDialog, which OEMs will be able to extend as necessary to
provide support for alternate biometric modalities.

Bug: 74831038
Test: m -j50 FingerprintDialog (from the associated CL on this topic)
      The app works and authenticates successfully.
Test: make update-api -j56

Change-Id: Ic398ef0a0b448be68dbe3330b30779f93f567243
2018-03-27 13:15:01 -07:00
Mike Ma
926a97cd3f Track USB data link in batterystats
Record USB data link state in addition to plug & charging state, since
modern USB controller can keep USB data link connected with minimum
current. Device is not acutally charging at those times.
Test: manual
Fixes: 76209292

Change-Id: I0710d547399a631d594488a524682ccc32a25ce6
2018-03-27 12:05:48 -07:00
Bookatz
235343daec Fix statsd logging in BatteryStats (nesting prob.)
Several statsd atoms are not logged correctly from batterystats, due to
possible nesting issues (batterystats only reports a single stop at the
end, whereas statsd expects each stop, resulting in statsd thinking that
the event is still continuing). This cl fixes those.

Bug: 69478888
Test: current ones still pass
Change-Id: I3ae8d7cc3d2eec7d4ab2721c83d208384adbf690
2018-03-27 09:32:18 -07:00
TreeHugger Robot
c6d9f7ce1d Merge "More flexible API enforcement policy." into pi-dev 2018-03-27 10:34:38 +00:00
Mathew Inwood
2c6f97d4c9 Configurable hidden API exemptions.
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509
Change-Id: Ib1245b69da4dac50c6968f1be62f1a74591dc433
2018-03-27 10:51:10 +01:00
Mathew Inwood
e3299533b5 More flexible API enforcement policy.
This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.

PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.

(cherry-picked from commit e52130ae4c)

Test: m
Test: Boot device

BUG: 73337509
Change-Id: Ieb4bd9cc439c6a5b8fb9424d8902d8b46aec309f
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
2018-03-27 09:28:33 +01:00
TreeHugger Robot
9a6bc76ee8 Merge "API council requested tweaks to TrafficStats." into pi-dev 2018-03-27 02:56:24 +00:00
Jerry Zhang
df101a4596 Merge "Write descriptors for Mtp in UsbService" into pi-dev 2018-03-27 02:49:02 +00:00
Jeff Sharkey
121d565b65 API council requested tweaks to TrafficStats.
Test: atest android.appsecurity.cts.AppSecurityTests#testAppFailAccessPrivateData
Bug: 71584606
Change-Id: I4be8a47d54a04f17cbaac735d543ff7d6370376d
2018-03-26 13:12:39 -06:00
Dmitry Dementyev
4da14e00fc Remove unimplemented RecoverableKeystoreManager APIs.
Add some Nullable annotations.

Bug: 75952916,74859770
Test: apct
Change-Id: I25710263a1ba806d49ec11638dab00f3513631a8
2018-03-23 16:30:51 -07:00
Luis Hector Chavez
5e11e5e6cc Also allow avoiding gfx acceleration at runtime
This change adds a way to make ActivityManager#isHighEndGfx() return
false at runtime by inspecting the value of ro.config.avoid_gfx_accel.
This is useful for running Android on Chrome OS devices, since a single
image can be made to run in both physical hardware and an emulator.

Bug: 65602168
Test: Added `ro.config.avoid_gfx_accel`, isHighEndGfx() returned false.
Change-Id: I1599ad9b385f9ef43f923886e6d5358ae07632e0
2018-03-23 14:43:54 -07:00
Mathew Inwood
daef557352 Merge "More flexible API enforcement policy."
am: 69e1cbc3fe

Change-Id: I8b54dcbca3991b2b076e0648e3948c80d74351d3
2018-03-23 15:02:12 +00:00
Mathew Inwood
69e1cbc3fe Merge "More flexible API enforcement policy." 2018-03-23 13:29:03 +00:00
David Srbecky
6ae5d863de Merge "Fix mini-debug-info generation for apps with wrap.sh script." into pi-dev 2018-03-23 13:27:21 +00:00
David Srbecky
5a0a33a8fb Merge "Fix mini-debug-info generation for apps with wrap.sh script."
am: 5c3521d54f

Change-Id: I22f7893925d2d774cc3e3f10287fb54ae1acf0e1
2018-03-23 12:10:41 +00:00
Mathew Inwood
16073b8a7c More flexible API enforcement policy.
This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.

PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.

(cherry-picked from commit e52130ae4c)

Test: m
Test: Boot device

BUG: 73337509
Change-Id: Ic0d5b8fa631c2bd583b6fc52b2ee3708c8113f59
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
2018-03-23 11:44:42 +00:00
David Srbecky
b7df58c81f Fix mini-debug-info generation for apps with wrap.sh script.
Debuggable apps enable mini-debug-info after fork, however, this does not
work with apps with wrap.sh script since they follow different code path.

Enable mini-debug-info generation for those as well.

Bug: 74070426
Test: check that app with wrap.sh generates debug info for JIT now

(cherry picked from commit 28a89370f0)

Merged-In: I489ac3c82bcced8fc0448ed5666f67009cbb043d
Change-Id: I22db2e889e918eb4b64c722289f7c046bb499d1d
2018-03-23 10:53:24 +00:00
David Srbecky
5c3521d54f Merge "Fix mini-debug-info generation for apps with wrap.sh script." 2018-03-23 10:50:32 +00:00
Aseem Kumar
933dfc1cd6 Delete unimplemented APIs from RecoveryController.
Bug: 74859770
Test: make update-api builds
Change-Id: Ic547e0ee2ef13995389a71369ffa736a7d83b78a
2018-03-23 05:16:42 +00:00
Remi NGUYEN VAN
af2fafe743 Merge "Add method to NetworkStatsService for UID stats."
am: db89ca3c12

Change-Id: I2c6cba3ebbc8c23ade754cfd411ac54a561b020a
2018-03-23 03:54:13 +00:00
TreeHugger Robot
51856fde2b Merge "Updated the styling for notifications" into pi-dev 2018-03-23 00:02:35 +00:00
TreeHugger Robot
827a06d4b4 Merge "Record Bluetooth Cumulative Stats Properly" into pi-dev 2018-03-22 21:39:03 +00:00
Jerry Zhang
6d319b8aaa Write descriptors for Mtp in UsbService
The current model for setting up a functionfs
function is:

UsbDeviceManager#setCurrentFunctions() ->
intent is sent to MtpReceiver to write the descriptors ->
init/hal waits for descriptors to write, then pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer

The main downside of this is a lack of reliability because
the Mtp process could be killed at any point. Normally, a
gadget is unbound if its control endpoint is closed. no_disconnect
works around this, but is still a little janky. In addition, the
extra intent delays the startup of the gadget.

With the new model, UsbDeviceManager writes the descriptors
on initialization. Since it is a system service, it won't be killed.

UsbDeviceManager#setCurrentFunctions() ->
init/hal pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
MtpServer calls UsbManager#getControlFd to get a dup of the control
endpoint.

Also modify permissions so system server can access mtp files.

Bug: 72877174
Test: Change usb configurations to ptp/mtp
Change-Id: Id17d2b5930f4e1f37ec1b4f00add9d594174ad49
2018-03-22 11:35:19 -07:00