Commit Graph

8196 Commits

Author SHA1 Message Date
TreeHugger Robot
35b8fd694b Merge "Add buffer-size parameter to FastXmlSerializer ctor" 2017-07-08 02:10:13 +00:00
Christopher Tate
13e11e83f6 Add buffer-size parameter to FastXmlSerializer ctor
Also increase the default internal buffer size from 8kb to 32kb.  We
have evidence that we're incurring a fair bit of "extra" disk write load
in various common circumstances like SharedPreferences, and this should
help eliminate that.

Bug 63432101
Test: bit CtsContentTestCases:.SharedPreferencesTest

Change-Id: Iba4768262142555a279284b2ae70741424ee2184
2017-07-07 17:02:58 -07:00
TreeHugger Robot
e5ffbb0382 Merge "Moving color extraction classes" 2017-07-07 22:06:54 +00:00
Amith Yamasani
494a6cf5ca Merge "Add logging for unusually long read times" into oc-dr1-dev am: 2a8a58ea98
am: 6a4ab438b9

Change-Id: I4d4ba6681ebda8ba7bfe0ca9117243377b53478a
2017-07-07 21:54:31 +00:00
Amith Yamasani
6a4ab438b9 Merge "Add logging for unusually long read times" into oc-dr1-dev
am: 2a8a58ea98

Change-Id: Ic043ad8fd15aac4583be3944190b52f3e914c6d7
2017-07-07 21:50:29 +00:00
TreeHugger Robot
2a8a58ea98 Merge "Add logging for unusually long read times" into oc-dr1-dev 2017-07-07 21:43:46 +00:00
Lucas Dupin
7224c1eca2 Moving color extraction classes
Fixes: 62220212
Test: make
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/types/TonalTest.java
Test: runtest systemui
Change-Id: I7c4cf5c40a88555e81fbad9bec2b32c55c927468
2017-07-07 11:26:45 -07:00
Narayan Kamath
4daa6d4fa2 Merge "WebViewZygoteInit: minor cleanup to handlePreloadPackage." 2017-07-07 09:59:27 +00:00
Andrew Solovay
fafafb8b61 Merge "docs: Removing com.android.internal.* packages from Javadoc build" into oc-dev am: 040b774928 am: ee10807328
am: c2c0997b40

Change-Id: I34bf16c3d56fbb0424fbbb18435855785bb58d24
2017-07-06 20:36:37 +00:00
Andrew Solovay
c2c0997b40 Merge "docs: Removing com.android.internal.* packages from Javadoc build" into oc-dev am: 040b774928
am: ee10807328

Change-Id: I6ba7c1255c103075fce541db27226996366968a3
2017-07-06 20:21:44 +00:00
TreeHugger Robot
26ae3157eb Merge "Change storage migration to use quota APIs." 2017-07-06 19:33:59 +00:00
Andrew Solovay
ee10807328 Merge "docs: Removing com.android.internal.* packages from Javadoc build" into oc-dev
am: 040b774928

Change-Id: I5fb70c606842dd5af7fdb5506d7a0d14e83aeab9
2017-07-06 18:58:22 +00:00
Andrew Solovay
5f00dfa5b8 Merge "docs: Removing com.android.internal.* packages from Javadoc build" into oc-dev
am: 040b774928

Change-Id: Ief0f1ce03e137ae4a16067cf7430cf7bc333a96d
2017-07-06 18:58:17 +00:00
Jeff Sharkey
c8b29ac6f0 Change storage migration to use quota APIs.
New quota APIs are much faster than trying to measure manually, and
removing this last user of calculateDirectorySize() means we can
remove it once and for all.

Bug: 36056324
Test: builds, boots
Change-Id: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8
2017-07-06 11:29:10 -06:00
Amith Yamasani
3d5d9aefc1 Add logging for unusually long read times
Tracking occasional lock contention in ActivityManagerService
that might be due to battery stats locking while reading proc files.

Bug: 63287747
Test: manual
Change-Id: Idfde8c960507930df4dc7e1337a89535d2ca932e
2017-07-06 08:49:41 -07:00
Narayan Kamath
6f6e8945f7 WebViewZygoteInit: minor cleanup to handlePreloadPackage.
Make sure that the preload method returns a boolean to avoid the
possibility of a NullPointerException or a ClassCastException during
the boxing / casting of its return value.

Test: manual
Change-Id: I483edc8f8726de4359fc37304ca7019024eaf577
2017-07-06 16:45:57 +01:00
Jason Monk
ea5d3b8a70 Merge "Layout updates to share sheet" into oc-dr1-dev am: 2a050dae1a
am: 28e83de5ae

Change-Id: I1b2b1c459e321407475a1c68fd098d6256337371
2017-07-06 15:23:57 +00:00
Jason Monk
28e83de5ae Merge "Layout updates to share sheet" into oc-dr1-dev
am: 2a050dae1a

Change-Id: I1243c4def83a7b116373af01dda2cb883a036e09
2017-07-06 15:18:25 +00:00
Jason Monk
027dcfa4a5 Layout updates to share sheet
The biggest change is that padding will only appear above/below
service section, and at the start of the non-service section. For
this a bunch of changes to how padding is needed.

Also some other dimen changes for specs.

Test: visual
Change-Id: I39747701597e620425bdcb4113d1a3585f6de137
Fixes: 37913738
2017-07-06 09:09:21 -04:00
Narayan Kamath
bf99d06003 Zygote: Improve logging and error handling during connections.
Before this change, we were throwing a checked exception on success
and returning on failure. This made it hard to figure out where / when
something was going wrong. This change switches things around to throw
a RuntimeException when something goes wrong and to return a Runnable
on success. This lets us make stronger assertions in both the parent
and the child process about their state and expected return values.

This change also upgrades the severity of several errors that we would
earlier just ignore. We will now reject the command and terminate the
connection to the client when we encounter these errors such as:

- Malformed arguments
- Any ZygoteSecurityException, such as thown thrown by
  applyUidSecurityPolicy and applyInvokeWithSecurityPolicy.
- Any error in setting up pipes etc. to facilitate communication
  with child processes.

Bug: 13618569
Test: Manual
Change-Id: Id931d44135ae2e4ede1bbac6a4b187f6c139e1fd
2017-07-06 12:49:22 +01:00
Narayan Kamath
ac27936be5 Merge "Zygote: Fix race condition on package preloads." into oc-dr1-dev
am: 84e0f453d1

Change-Id: I34dc28cd87e5111fccff05893ddf5c1155ad8746
2017-07-06 11:36:41 +00:00
TreeHugger Robot
84e0f453d1 Merge "Zygote: Fix race condition on package preloads." into oc-dr1-dev 2017-07-06 11:30:03 +00:00
TreeHugger Robot
c276c79e83 Merge "Zygote: Fix race condition on package preloads." 2017-07-06 09:50:10 +00:00
TreeHugger Robot
969d492531 Merge changes from topic 'hackbod_completion'
* changes:
  Fix issue #63095854: adb shell cmd jobscheduler timeout reports...
  Add reporting of how jobs complete.
2017-07-06 02:02:21 +00:00
jackqdyulei
ec16169922 Merge "Update the smearing methods in framework." into oc-dr1-dev am: 386d8133c4
am: 8f386f6e24

Change-Id: Iaee832c78d18de4b592af672bb9da28b34b1fd5e
2017-07-06 01:11:45 +00:00
jackqdyulei
8f386f6e24 Merge "Update the smearing methods in framework." into oc-dr1-dev
am: 386d8133c4

Change-Id: I383384c1cd30e5ab4f88a5e95a9b0068e573fe2d
2017-07-06 01:00:59 +00:00
TreeHugger Robot
386d8133c4 Merge "Update the smearing methods in framework." into oc-dr1-dev 2017-07-06 00:49:56 +00:00
TreeHugger Robot
b3f68233d9 Merge "Stop tracking user specific uid cpu time on user stop" 2017-07-06 00:42:09 +00:00
Garfield Tan
cd144b4754 Merge "Merge "Clear calling id before updating MediaStore." into oc-dr1-dev am: 28042d09d1" into oc-dr1-dev-plus-aosp
am: 083a491f4d

Change-Id: I293ca3e7765629a1f04e14aad2841bcb7d1f763a
2017-07-05 22:59:37 +00:00
Garfield Tan
8ea8db199d Merge "Clear calling id before updating MediaStore." into oc-dr1-dev
am: 28042d09d1

Change-Id: I29b452dbb955d65806cd472cf20d4595ac4844dc
2017-07-05 22:46:14 +00:00
Suprabh Shukla
e6e723d588 Stop tracking user specific uid cpu time on user stop
Telling kernel module uid_cputime to stop accounting time for uids
belonging to a stopped user. Upon user remove, removing uid states for
those uids.

Test: adb shell am instrument -e class \
com.android.internal.os.BatteryStatsUserLifecycleTests -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

adb shell am instrument -e class android.util.SparseLongArrayTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 62390461
Change-Id: Ibe07778465e3d2c13679e4d88d32f7b92fa959d9
2017-07-05 15:39:42 -07:00
TreeHugger Robot
28042d09d1 Merge "Clear calling id before updating MediaStore." into oc-dr1-dev 2017-07-05 22:39:37 +00:00
jackqdyulei
ce0fd25e2c Update the smearing methods in framework.
1. Fix the bug about foregroundActivityTime. It should take microseconds
as parameter and return microseconds
2. Use the min time of foregroundActivity time and Top time as "screen
time"
3. Hide bluetooth, wifi, idle but don't smear it

Bug: 63176214
Test: runtest -x BatteryStatsHelperTest
Change-Id: I5798577da17d60fb3e3b18351deb31ae77939154
2017-07-05 13:14:08 -07:00
Narayan Kamath
bae484ad8e Zygote: Fix race condition on package preloads.
Before this change, ZygoteProcess.preloadPackageForAbi returned
as soon as the command was written to the zygote socket and not
after the preload completed. This meant that there was a small
window of time before the server side of the socket polled its FDs
where a second command could be written to the zygote socket. This
would lead to only one of the commands being processed and the
other being dropped. The client side of that socket would then wait
forever for a response and bring down the system once the watchdog
timeout was hit.

Example failure case :
--------------
system_server:send command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(preloadPackage)  // the fork command is dropped.

Example of normal operation :
------------------
system_server:send command(preloadPackage)
zygote:poll & process command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(fork)

This change makes preloadPackageForAbi synchronous, which ensures
that each POLLIN event corresponds to precisely one command.

Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com

(cherry-picked from commit 24a3306c32)

Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
2017-07-05 17:53:20 +00:00
Narayan Kamath
24a3306c32 Zygote: Fix race condition on package preloads.
Before this change, ZygoteProcess.preloadPackageForAbi returned
as soon as the command was written to the zygote socket and not
after the preload completed. This meant that there was a small
window of time before the server side of the socket polled its FDs
where a second command could be written to the zygote socket. This
would lead to only one of the commands being processed and the
other being dropped. The client side of that socket would then wait
forever for a response and bring down the system once the watchdog
timeout was hit.

Example failure case :
--------------
system_server:send command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(preloadPackage)  // the fork command is dropped.

Example of normal operation :
------------------
system_server:send command(preloadPackage)
zygote:poll & process command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(fork)

This change makes preloadPackageForAbi synchronous, which ensures
that each POLLIN event corresponds to precisely one command.

Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com

Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
2017-07-05 18:28:54 +01:00
Andrew Solovay
7bd357143e docs: Removing com.android.internal.* packages from Javadoc build
Several com.android.internal packages were being included in the
Javadoc build, even though they have no public APIs. Added a
package.html with the @hide tag to each of those packages, to
exclude them from the doc build.

Updated doc is staged to: http://go/dac-stage/reference/ ; verified
that the packages are now *not* in
http://go/dac-stage/reference/packages.html , and that package
summary files are not being generated for those packages.

Test: make ds-docs
Bug: 63166900
Change-Id: I7f96abb3e57d005c290cce6eda58f9368159a34e
2017-06-30 17:11:52 -07:00
Garfield Tan
fac8aea2e8 Clear calling id before updating MediaStore.
Test: Manual tests.
Bug: 63064166
Change-Id: I87ab9656f699072a6e23249e531805ad7c392764
2017-06-30 12:52:50 -07:00
Kang Li
45b7084ea7 Merge "Dedupes ranked apps in sharing windows, and reuses computed scores in sorting for ResolverActivity." into oc-dr1-dev am: d967ee3492
am: 8853465754

Change-Id: Idd79132833e43bebf75f48b405715657d03cf90d
2017-06-30 19:49:17 +00:00
Kang Li
8853465754 Merge "Dedupes ranked apps in sharing windows, and reuses computed scores in sorting for ResolverActivity." into oc-dr1-dev
am: d967ee3492

Change-Id: I9573bc8878123fbad308d27adb2977811814ffcd
2017-06-30 19:41:14 +00:00
TreeHugger Robot
d967ee3492 Merge "Dedupes ranked apps in sharing windows, and reuses computed scores in sorting for ResolverActivity." into oc-dr1-dev 2017-06-30 19:28:31 +00:00
TreeHugger Robot
08a18210fb Merge "Remove the internal APIs of TSM to change spell checker settings" 2017-06-30 17:37:27 +00:00
Guliz Tuncay
46a54e8be6 Remove the internal APIs of TSM to change spell checker settings
Previously, TextServicesManager was exposing APIs to system services to
modify spell checker settings. However, Settings application is the only
client of these APIs and there is no need to expose it to all the other
services. Settings app already has the WRITE_SECURE_SETTINGS permission
and can directly update the spell checker settings. Hence, we can remove
these APIs from TSM.

Fixes: 62950392
Test: Manually as follows.
      1. Build and flash an OS image.
      2. Complete the setup wizard (if any).
      3. Make sure AOSP Keyboard (com.android.inputmethod.latin) is installed
      4. Install SampleSpellCheckerService
       4.1 tapas SampleSpellCheckerService
       4.2. make -j
       4.3. adb install -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
      5. Set the current spell checker service to be AOSP SCS by
       adb shell settings put secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
      6. Run a test program that has TextView and tap on one of the
       TextViews and type some text.
      7. Observe that there is a connection to AOSP SCS by
       adb shell dumpsys textservices
      8. Set the current spell checker service to be
      SampleSpellCheckerService SCS by
adb shell settings put secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
      9. Observe that there is a connection to SampleSpellCheckerService
      SCS by
       adb shell dumpsys textservices
Change-Id: I4513ca661788f00785f684c21d7244c233b6e33e
2017-06-29 20:56:52 +00:00
Sujith Ramakrishnan
23635b9f38 Merge "Prevent unwanted keypress actions during TV Setup." into oc-dev am: 564d0bf1be am: a1157b3aa1
am: 708857daac

Change-Id: I1432893fffc95498d4bcb085b04856b1293f51a2
2017-06-29 19:15:40 +00:00
Sujith Ramakrishnan
708857daac Merge "Prevent unwanted keypress actions during TV Setup." into oc-dev am: 564d0bf1be
am: a1157b3aa1

Change-Id: I80fac516afe2c7b75fe775d80444a501585bd3b7
2017-06-29 19:06:33 +00:00
Sujith Ramakrishnan
98b181b25f Merge "Prevent unwanted keypress actions during TV Setup." into oc-dev
am: 564d0bf1be

Change-Id: I23deb9056dbd9967bfe07d3db30256794b30a778
2017-06-29 18:59:11 +00:00
Sujith Ramakrishnan
a1157b3aa1 Merge "Prevent unwanted keypress actions during TV Setup." into oc-dev
am: 564d0bf1be

Change-Id: I1cd59a2966f692a4857343e21bf1586719939490
2017-06-29 18:59:07 +00:00
TreeHugger Robot
564d0bf1be Merge "Prevent unwanted keypress actions during TV Setup." into oc-dev 2017-06-29 18:50:08 +00:00
Dianne Hackborn
94326cb56a Add reporting of how jobs complete.
In both battery stats and job scheduler statistics, keep track of
the reason jobs are ending.  This can help to identify apps that
are having bad behavior with jobs (in particular, regularly timing
out their job instead of finishing it when done).

Test: manual
Change-Id: Icc12d5e0dc0df1906716e7d995c56d50a9fa148a
2017-06-28 17:44:00 -07:00
Mady Mellor
9df9fbdd0d Merge "Adjustments to PIP position while flinging" into oc-dr1-dev am: 176f2533a1
am: 3e7a97f6fa

Change-Id: Ie79d0d1112c8cf840dbd1378d9f1959c6dd633df
2017-06-29 00:00:59 +00:00
Mady Mellor
3e7a97f6fa Merge "Adjustments to PIP position while flinging" into oc-dr1-dev
am: 176f2533a1

Change-Id: Ic5d38c862c155ac025884e53d688826b57829529
2017-06-28 23:53:23 +00:00