Commit Graph

8715 Commits

Author SHA1 Message Date
Treehugger Robot
54da93b981 Merge "Revert "Move zygote's seccomp setup to post-fork"" 2018-01-10 18:46:36 +00:00
Victor Hsieh
fe6a51fcb5 Revert "Move zygote's seccomp setup to post-fork"
This reverts commit 6a4a339832.

Reason for revert: caused some SELinux error

Bug: 71768585
Change-Id: I0ef270ec6fed1d5d96b4257ec1a2dd6a55a816ed
Merged-In: Ic1b81e146b52b68445ba634de39657f199107da3
2018-01-10 17:22:55 +00:00
Treehugger Robot
5d33c10a96 Merge "Move zygote's seccomp setup to post-fork" 2018-01-09 21:41:19 +00:00
Victor Hsieh
6a4a339832 Move zygote's seccomp setup to post-fork
Before this change, seccomp filter setup is as early as in zygote's main
function.  To make it possible to split app and system server's filter,
this postpone the setup to after fork.  It also starts to call app
specific and system server specific setup function.

In terms of performance since this happens at fork, the measure shows
the overhead is negligible.  Assuming 130 instruction in the BPF, on
walleye, even when running on little core with fixed low frequency, each
setup took about 60.9us on average.  When it runs on big core with
higher frequency, it took about 39.3us.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Bug: 63944145

Change-Id: I748735b478405098beac1e200d911c13ea60e380
Merged-In: I748735b478405098beac1e200d911c13ea60e380
2018-01-09 20:16:01 +00:00
gaochong
cbe2c55a69 Fix ResolverActivity don't show items
ResolverActivity sort the list resolved intent with AsyncTask.
The method sort hold CountDownLatch to wait the time-consuming
operation. In some case, the operation doesn't end and the
CountDownLatch can't be released.The default excutor of AsyncTask
is serial. There should release CountDownLatch in destroy()
to avoid this case.

Change-Id: Ie10126f735d9f511dfe086c21f3f5ffaeb831086
Signed-off-by: gaochong <gaochong@xiaomi.com>
Test: manual - repeatedly test ResolverActivity show correctly
Bug: 71730061
2018-01-09 14:02:23 +08:00
Hugo Benichi
959ee4a7b1 Extend connectivity OWNERS
Also remove 'build.master@android.com' which is deprecated, not
declared by anybody else, and makes the linter unhappy.

Bug: 70394432
Test: built
Merged-In: I9c0ba41386129379f82259fcc5e745562b014fae

(cherry pick from commit 626eed2ac8)

Change-Id: Ie802113d61f693d73f7234b44ac2a9bd462b3fbf
2017-12-14 09:56:56 +09:00
Treehugger Robot
403c8f72e3 Merge "Fixed button bar alignment issue in RTL languages" 2017-12-11 19:10:46 +00:00
Siyuan Zhou
070e318501 BootReceiver: Added an event log after the dropbox file copy is successful.
The log can be used to test if LAST KMSG or other items are copied
to dropbox successfully, especially in user builds without root
privilege.

BUG: 69685635

Test: manually verified the desired log from bugreport on user
and userdebug builds.

Change-Id: I6570d95538d678c98d261690ca3c20416d7a31c6
Merged-In: Ie6033bf04c7f79fc596761ab751aa5fcea2c1130
(cherry-picked from commit bafcd7b595)
2017-12-08 22:51:23 +00:00
susanta.patra
1b0b22ce08 Fixed button bar alignment issue in RTL languages
Buttons should be aligned opposite to English in RTL languages.

Test: 1. RTL language
      2. Create an alert dialog having positive, negative and neutral button.
      3. Check the button bar alignment
Bug: 70363698

Change-Id: I783dfdcf9cb3f85402a4ff3fa4c2d1d1caf5c3da
Signed-off-by: susanta.patra <susanta.patra@lge.com>
2017-12-08 11:55:40 +05:30
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
con
5c7de22a06 Merge "Fix StateMachine init/quit race." 2017-11-02 20:05:09 +00:00
Calvin On
f5b9f7b50e Fix StateMachine init/quit race.
The quitNow method places the SM_QUIT_CMD at the front
of the queue. This can cause StateMachine to throw exception
if it has not yet processed the SM_INIT_CMD from start().

Bug: 67370902
Test: make checkbuild
Test: StatMachineTest unittest
Change-Id: I409242845854e70b77ad9b2378b69faed076847c
Merged-In: I7cec7bb91e0447e3c565d33cb7c34ccf59566639
2017-11-02 11:40:47 -07:00
Calin Juravle
7ba73dd509 [framework] Add check that classpath is up to date to getDexOptNeeded
(cherry picked from commit 576e6c0cbb)

Bug: 62269291
Test: manual, install new apk/splits and force updates.
I used com.android.cts.classloadersplitapp as the test app.
1) install-multiple split apks with dependency: Base -> A -> B
2) push an update for A
3) adb shell cmd package compile
4) check that A & B got recompiled and that B was because a class loader
context mismatch (e.g. "ClassLoaderContext classpath element checksum
mismatch for position 1.").

Merged-In: I4092562966413dc8976c9d41b26a90bbb9e37e1e
Change-Id: I4092562966413dc8976c9d41b26a90bbb9e37e1e
2017-11-01 08:39:01 -07:00
Shubham Ajmera
3aeca17aa9 Reduce app size by downgrading inactive apps
This will trigger when the device will have low space.
Active apps here refer to the apps which were either active
in foregrond or in background and also used by other packages.
Apps which are inactive for X days downgraded to verify. X is
determined by sysprop pm.dexopt.unopt_after_inactive_days

If the system properties are not set, no effect will take place.

The above operations will take place in background dexopt service.
If user uses the app again, it will again be speed-compiled when
background dexopt service starts next time.

(cherry picked from commit 246dccf932)

Bug: 36598475
Test: manual
* Remove the check in the code that allows downgrade only when
  the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
  in dalvik_cache

Merged-In: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
Change-Id: I68f9f617d6722a7ba8b00aa2181cb38a165cfc51
2017-10-31 14:51:57 -07:00
Mathieu Chartier
c477ab141f Add property for system server compiler filter
The property is dalvik.vm.systemservercompilerfilter, this changes
if dexopt is needed.

(cherry picked from commit 5e07a0d9ca)

Bug: 62356545
Test: adb shell setprop dalvik.vm.systemservercompilerfilter quicken
Test: adb shell stop && adb shell start

Merged-In: I2ef3737f24816a4cb75e718abf274a891eb9fda1
Change-Id: I2ef3737f24816a4cb75e718abf274a891eb9fda1
2017-10-31 11:28:43 -07:00
Jeff Sharkey
1285cfd48f 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.

(cherry picked from commit c8b29ac6f0)

Bug: 36056324
Test: builds, boots
Merged-In: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8
Change-Id: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8
2017-10-31 09:50:50 -07:00
Tobias Thierer
66d1933ce0 OWNERS: Prefer Jeff Sharkey's @android.com account over @google.com
He prefers to use his @android.com account.

Test: Treehugger
Bug: 63673347
Exempt-From-Owner-Approval: Allow @android.com to approve this CL :)

Change-Id: Ie80cc7864de7b91ae44ad57f0bae9b859d034803
2017-10-30 17:53:11 +00:00
Etan Cohen
d870cd33f5 Merge "Add Runnable mechanism to WakeupMessage"
am: 5964b55654

Change-Id: Iab0414f644223d69602e8e93a636eaa46137d873
2017-10-21 02:17:30 +00:00
Etan Cohen
1861ea9df4 Add Runnable mechanism to WakeupMessage
The WakeupMessage object provides a mechanism to create an Alarm
which will wake-up the device and deliver a message to a Handler.

Add a Runnable mechanism as an alternative to the message.

Bug: 67276378
Test: unit test
Change-Id: Icf5f03b2b25a340273f9d3fcd09f182216ea6238
2017-10-20 13:32:00 -07:00
Tobias Thierer
07efe116b1 Merge "Framework: Prefer android.system.Os over libcore.io.Libcore.os"
am: 5f04db96b3

Change-Id: If85216d03022708787a7218e494434453d5548e3
2017-10-19 14:25:12 +00:00
Tobias Thierer
6217e37d30 Framework: Prefer android.system.Os over libcore.io.Libcore.os
This is a pure refactoring with no a behavior change other than
that these calls now go through android.system.Os, which immediately
delegates to Libcore.os.

This is a first step towards separating framework (via
android.system.Os) vs. libcore (via Libcore.os) clients of these
low level APIs. Separating these is a prerequisite towards moving
the API parts of android.system into framework, and moving the
rest into a different package in libcore.

Test: Treehugger
Bug: 67901714

Change-Id: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
Merged-In: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
2017-10-18 14:53:57 +01:00
Bookatz
20e22f6248 Batterystats handles nested unoptimized ble scans
When a ble scan starts, it tells batterystats whether that scan is
unoptimized. When the scan stops, batterystats is not informed of
whether the stopped scan was unoptimized. Because the ble scan call
could not be nested (couldn't call start twice without stopping first),
this was fine, but now nesting is possible, so batterystats needs to
know whether the stopped ble scan is unoptimized.

Bug: 63456783
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsTests.java
Test: no new errors when run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testUnoptimizedBleScans

Change-Id: Ia73f294cf1807ddaf20f1c0bcc28add001cac78c
Merged-In: Ia73f294cf1807ddaf20f1c0bcc28add001cac78c
(cherry picked from commit 94c5a313d7)
2017-10-16 23:18:30 +00:00
Patrik Torstensson
7528452f57 Merge "Incorporate slab reclaimable into meminfo" into oc-mr1-dev
am: 20fb01eb23

Change-Id: Ia6afee63376c98552c3a5a0ee249fa751c3d3603
2017-10-13 07:35:04 +00:00
Patrik Torstensson
20fb01eb23 Merge "Incorporate slab reclaimable into meminfo" into oc-mr1-dev 2017-10-13 01:30:40 +00:00
Robert Benea
5e099800f8 Incorporate slab reclaimable into meminfo
Instead of using the whole slab mem for kernel usage, split the
unreclaimable to kernel and reclaimable to cache (since is freed
under mem. pressure).

Test: tested on gobo
Bug:67753120
Change-Id: I0f5a310bb88603ad7bb28e5398ea57c249c04fc2
2017-10-13 00:41:47 +00:00
Andreas Gampe
245ecc9a95 Merge "LoggingPrintStream: Make visible for testing" am: 7d1789867b am: dcb8cf8732
am: 0db4c361e3

Change-Id: I10e61d65cd05c8d93d43a2fefee841023ec35889
2017-10-10 21:29:12 +00:00
Andreas Gampe
dcb8cf8732 Merge "LoggingPrintStream: Make visible for testing"
am: 7d1789867b

Change-Id: If6e464f6840b66deb6f6c61b0ca96d847444e910
2017-10-10 21:11:10 +00:00
Andreas Gampe
e2456d602f LoggingPrintStream: Make visible for testing
The class must be public to avoid test issues. If the class is
package-private, the test would have to be in the boot class-
path:

 Rejecting re-init on previously-failed class java.lang.Class<com.android.internal.os.LoggingPrintStreamTest$TestPrintStream>: java.lang.IllegalAccessError: Class com.android.internal.os.LoggingPrintStream extended by class com.android.internal.os.LoggingPrintStreamTest$TestPrintStream is inaccessible (declaration of 'com.android.internal.os.LoggingPrintStreamTest$TestPrintStream' appears in /data/app/com.android.frameworks.coretests-SD7GJmYE507ACoE9gu2mnw==/base.apk)
   at java.lang.Object java.lang.reflect.Constructor.newInstance0(java.lang.Object[]) (Constructor.java:-2)
   at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:334)
   at junit.framework.Test junit.framework.TestSuite.createTest(java.lang.Class, java.lang.String) (TestSuite.java:61)

Test: m
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/LoggingPrintStreamTest.java
Change-Id: I26cead7954cf4309c8b3e16994c35a3f4a9eb798
2017-10-10 09:09:26 -07:00
Chalard Jean
bbb7768f4f Merge "Add some useful helpers and constants." am: ed8d236319 am: 0f4421873e
am: 06d401ae73

Change-Id: Iaf611b8e39080d677c9cfe7edb124c11bbdf8a81
2017-10-06 10:11:04 +00:00
Chalard Jean
0f4421873e Merge "Add some useful helpers and constants."
am: ed8d236319

Change-Id: I3a934e19ece91bf5957e4c5fa289bbc1a6242915
2017-10-06 09:48:32 +00:00
Mike Ma
8cb8bdf657 Merge "Add AOD metrics in batterystats" into oc-mr1-dev
am: 6204a60c53

Change-Id: Ife567f987a1585cb1108725db6ad63516a8dc67a
2017-10-06 07:17:25 +00:00
Chalard Jean
e5659bd316 Add some useful helpers and constants.
Test: Pulled out of a client app ; the client app is behaving
Test: identically to how it was behaving before. Wrote unit
Test: tests in frameworks-net.

Change-Id: I397137748a95c65cee2e1e1b243a1a260e83a6f7
2017-10-06 13:38:46 +09:00
Mike Ma
1ce1d3a42c Add AOD metrics in batterystats
Fixes: 64899521
Test: manual - flash build, reset batteryStats, use device > 1 hr
with alternating pattern between screen on/off/AOD. Dump stats, check
all screen related stats look normal, esp. record matches actual time
spent in each screen state. In raw bugreport:
Search "amount discharged" for % discharge;
Search "Screen on/off/doze discharge" for mAh discharge;
Search "time on battery" for up/real time in each state.

Test: Added two unit tests for note AOD screen state

Merged-In: I7193a36751124dd380818b2b665303c0f0d8c984
Change-Id: I51cead7f92abd9e4c620f7dfde393993cdad494e
2017-10-06 00:50:03 +00:00
Tobias Thierer
fcd0e0a554 Merge "Fix documentation generation with OpenJDK 9 javadoc." am: ed6ae8f2b1 am: 8d4e36b1e8
am: 7c8e38c2cc

Change-Id: Idf7ff7b214281982a4a747c1e0af4cf54f622865
2017-10-05 23:38:06 +00:00
Tobias Thierer
8d4e36b1e8 Merge "Fix documentation generation with OpenJDK 9 javadoc."
am: ed6ae8f2b1

Change-Id: I8bd1f9b3994f480d55d7c885b2c24227a67915e9
2017-10-05 23:12:37 +00:00
Tobias Thierer
85edc2bc95 Fix documentation generation with OpenJDK 9 javadoc.
"make docs" breaks ("lint: @attr must be a field") on three @attr ref
statements in LinearLayoutManager. These are the only @attr ref
statements that reference the support library's resources from
framework (the others are within framework or within the support
library); it may be that the R class that they're referencing is
merely in the wrong package, but changing it to com.android.internal.R
or android.R didn't fix the issue.

Since LinearLayoutManager is an internal class, it's not worth the
effort of trying to make this work. This CL drops the three offending
@attr ref statements, thereby fixing the build.

Bug: 62049770
Test: Treehugger

Change-Id: Ife01201019f4fffd5552da11591661539ca40fdd
2017-10-03 12:45:57 +01:00
Adam Powell
6a6a65e89e Merge "Lower watchdog timeout for ChooserTargetService responses" into oc-mr1-dev
am: cbe8754184

Change-Id: I96573018654de3cfccdae1be6ce01ae7749c5ffe
2017-10-02 21:40:30 +00:00
TreeHugger Robot
cbe8754184 Merge "Lower watchdog timeout for ChooserTargetService responses" into oc-mr1-dev 2017-10-02 20:40:37 +00:00
Dan Sandler
fce1eb3ea3 Merge "Don't crash onServiceDisconnected..." into oc-mr1-dev
am: dab9eff899

Change-Id: Idfc6a98804928a177153492010e04ec75fa30755
2017-10-02 18:00:56 +00:00
TreeHugger Robot
dab9eff899 Merge "Don't crash onServiceDisconnected..." into oc-mr1-dev 2017-10-02 17:44:57 +00:00
Adam Powell
3f23dfc6c1 Lower watchdog timeout for ChooserTargetService responses
Services providing direct share targets were given up to 5 seconds
to respond to a query, and for UI stability we don't show any until
all services have responded. 5 seconds is a long time to wait and
leads to user complaints when there is even one app that doesn't
respond in time.

Lower the timeout to 2 seconds as a more reasonable maximum.

Bug: 67306843
Test: manual, existing CTS
Change-Id: If55f0485240bc3ccbf8a32aa0e15903ea574ec2b
2017-10-02 10:41:03 -07:00
Beverly
3836cce06d Merge "Adjusted chooser padding so 2nd line isn't cutoff." into oc-mr1-dev
am: 5802026595

Change-Id: Ic2bb95c7230ea25646824f41d219b09d3cb70709
2017-09-26 23:20:09 +00:00
TreeHugger Robot
5802026595 Merge "Adjusted chooser padding so 2nd line isn't cutoff." into oc-mr1-dev 2017-09-26 23:14:08 +00:00
Hugo Benichi
f43db3bf94 Merge changes Ia47e566b,Ib94d79a9 am: b9e2ddfc10 am: a2161c5ccb
am: b91bd88c5e

Change-Id: Ied2b31c9d1219b8aebf5fec085ab598b77bede6e
2017-09-26 13:05:41 +00:00
Hugo Benichi
a2161c5ccb Merge changes Ia47e566b,Ib94d79a9
am: b9e2ddfc10

Change-Id: I0cac456f778db78d76d2225b79ce42526a6d2d19
2017-09-26 11:46:30 +00:00
Hugo Benichi
67c5e03b54 Extract RingBuffer class from NetdEventListenerService
This patch takes out the ring buffer array added for NFLOG wakeup packet
events logging and extract it into its own class for reuse. This new
RingBuffer class has the two minimal useful functions append() and
toArray().

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net, with new unit test
Change-Id: Ib94d79a93f4e99661b7d0fac67117b91d57af980
2017-09-26 14:14:16 +09:00
Dan Sandler
fcd7fae5e6 Don't crash onServiceDisconnected...
...if destroy() hasn't already been called through some
other codepath.

Bug: 65249720
Test: runtest -x core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
Change-Id: I5f90548e437986d8585390578f4ceecd57cc3473
2017-09-25 17:43:16 -04:00
Adrian Roos
392a9b5c1d Merge "FRP: Add config flag for disabling credential FRP" into oc-mr1-dev
am: 73c93f02f7

Change-Id: I647bfc52892b305eb59f446812e142b609172bd4
2017-09-25 18:38:23 +00:00
Adrian Roos
2adc263ce9 FRP: Add config flag for disabling credential FRP
Bug: 65258606
Test: Verify FRP still works when not disabled
Change-Id: I78e308b6eaba73c794615b1eebdbfacb334ae72f
2017-09-25 13:32:48 +02:00
Beverly
3aee178c86 Adjusted chooser padding so 2nd line isn't cutoff.
Change-Id: I171eafed073b4412904e3c0dc6f88efb8370d3bf
Fixes: 65546796
Test: manual
2017-09-21 17:14:04 -04:00