Commit Graph

8185 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
176f2533a1 Merge "Adjustments to PIP position while flinging" into oc-dr1-dev 2017-06-28 23:45:37 +00:00
Sujith Ramakrishnan
0390fff82c Prevent unwanted keypress actions during TV Setup.
- Prevent Search or long-press Home actions
      while TV setup is being completed based
      on flag TV_USER_SETUP_COMPLETE.

Test: Manual - Reset device, ran Setup, tried keys.
Test: Manual - Rebooted device after Setup, tried keys.

Bug: 62419382
Change-Id: Ic8fb0f10943ab7c39a7d9857f62e6ab292231b40
2017-06-28 14:38:30 -07:00
Kang Li
6afa4f2901 Dedupes ranked apps in sharing windows, and reuses computed scores
in sorting for ResolverActivity.

bug: 63109049

Test: tested on a Pixel XL and a 6P to verify that it worked as expected.

Change-Id: I04ff45c3e15cbffb015568772b9b804e08f11aa4
2017-06-28 21:11:14 +00:00
Mady Mellor
15b29c7bba Adjustments to PIP position while flinging
Rather than using a scroller, find the actual edge intercept
based on the trajectory of the fling.

This is done by finding the two points it could intersect with
and checking which point is 'closer' (i.e. would be hit first
by the PIP).

Bias towards using the intersection with the top / bottom edge
if the PIP is being flung along the side it's currently on.

Also increases the maximum time for the fling.

Bug: 35358634
Test: manual - fling PIP around screen while in landscape
      and portrait
Change-Id: I26e943a5ddbc726ab86bc11e4271d4db034f3d47
2017-06-28 20:12:32 +00:00
Sudheer Shanka
7ea1738c1e Merge "Don't callback if all the delta values are zero." 2017-06-27 21:25:11 +00:00
Jeff Sharkey
5ab0243330 Only require that system UIDs tag their sockets.
Apps with a normal UID are typically isolated enough to not require
socket tagging; we're mostly interested in tracking down internal
UIDs that have lots of code sharing the same UID.

Also fix up everyone doing manual string checks of Build.TYPE, since
we now have first-class fields for those.

Bug: 38126076
Test: builds, boots
Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd
2017-06-27 11:11:06 -06:00
TreeHugger Robot
8ad1d78023 Merge "Implement key/value quota-overrun detection in LocalTransport" 2017-06-26 22:26:17 +00:00
Christopher Tate
c8a9d421a5 Implement key/value quota-overrun detection in LocalTransport
We now preflight the effect of a k/v backup delta set against the
current contents of the datastore, so we can detect and report a
quota overrun nondestructively.

Test: bit CtsBackupTestCases:.KeyValueQuotaTest
Change-Id: If69687b891271d7bbb46c3a66728b716dc51fc39
2017-06-26 13:31:57 -07:00
Selim Cinek
f5583930f6 Merge "Fixed an issue in the contrast calculation" into oc-dev am: 9bf5c0c3e1 am: 12a2a7d0f1
am: ec85913a74

Change-Id: I41d8577da4a6ca93252027bd85ee632decaae56f
2017-06-24 01:16:06 +00:00
Selim Cinek
ec85913a74 Merge "Fixed an issue in the contrast calculation" into oc-dev am: 9bf5c0c3e1
am: 12a2a7d0f1

Change-Id: Ice72e01f1ce2a38739c4306b9df4ab33bc16b2c9
2017-06-24 01:05:22 +00:00
Selim Cinek
12a2a7d0f1 Merge "Fixed an issue in the contrast calculation" into oc-dev
am: 9bf5c0c3e1

Change-Id: Ic93f722459de8da30b9b2f8971dfd0b650e37f10
2017-06-24 00:55:48 +00:00