Commit Graph

8857 Commits

Author SHA1 Message Date
Treehugger Robot
4265991701 Merge "Fix a bunch of repeated reads of a ro.* property" 2017-01-27 22:49:04 +00:00
John Reck
ed065024a5 Fix a bunch of repeated reads of a ro.* property
SystemProperties.get() is not particularly fast,
especially if a string is returned. Since ro.* values
are unable to be changed, there's no need to
continously re-query them. Cache the value at
static init time to trivially fix this.

Test: refactoring CL.
Change-Id: Iccb021d3cb2ba3a4a1d0048ddec6811bb7409eec
(cherry picked from commit aa67f684ff)
2017-01-27 11:04:39 -08:00
Shukang Zhou
6ec0b7e21d [Frameworks] Add an 'am' cmd option to enable streaming in profiling.
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
2017-01-25 16:53:41 -08:00
Jeff Sharkey
5eb3eb58ac Offer to measure disk stats using quotas.
Now we're getting somewhere!  This CL starts measuring disk usage
using quotactl(), which is almost instant and has much lower impact
on flash memory lifetime.

We now grant the per-app cache GID to every launched app, and the
ContextImpl logic that creates cache directories matches the logic
down in installd.

Test: builds, boots, quota stats match manual stats
Bug: 27948817
Change-Id: Ie269a2958ce0e1c17cb74dbfecc791a5c12922cf
2017-01-03 10:22:39 -07:00
Calin Juravle
9abb501075 Report non-primary dex files loads to PM
Scaffold for the reporting of non-primary dex files loads to the package
manager.

This will enable:
1) monitoring and compilation of secondary dex file
2) better way to track foreign dex file usage (used to determined the
compilation filter of apks).

Test: device boots
Bug: 32871170

(cherry picked from commit 8d2a51f1b8)

Change-Id: I61e65aee471798fbc7a18938647051274c3a058a
2016-12-19 17:28:46 +00:00
Stephen Chen
963e8ddf6d DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
Dependent on ag/1550196 where API is defined.

Bug: 31015360
Bug: 26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.

(cherry picked from commit 2514787897)

Change-Id: I46da93ba4afa968facf98f7c3d844fd0c469095a
2016-12-09 13:59:33 +09:00
Stephen Chen
dadf6caf9f DO NOT MERGE: Define API for metering network stats buckets.
This is a continuation of b/26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.

Bug: 31015360
Bug: 26545374
Test: N/A

(cherry picked from commit 9ac251d116)

Change-Id: I6a2fcc8577d62daa8823dff9e0128a5cf39ede7b
2016-12-09 13:59:17 +09:00
Torne (Richard Coles)
1feb782f01 Merge "Precreate the classloader for the WebView."
am: 566b1c80e4

Change-Id: Ic79079748dae515cb8d89ef99148755ac65f1d47
2016-11-21 17:04:22 +00:00
Treehugger Robot
566b1c80e4 Merge "Precreate the classloader for the WebView." 2016-11-21 16:54:53 +00:00
Torne (Richard Coles)
3b6ca99b10 Precreate the classloader for the WebView.
We want to create the classloader for the WebView in advance in the
zygote so that it can preload Java and native code for its children, but
the zygote can't talk to the package manager (so doesn't have a
PackageInfo for the APK) and also doesn't have an ActivityThread, so
constructing a LoadedApk is difficult.

Instead, we use the fact that ApplicationLoaders contains a
process-global cache of classloaders for APKs, and prepopulate a cache
entry without constructing a LoadedApk. This requires making
ApplicationLoaders public. To calculate the correct library paths from
the information the zygote has, we reuse the logic in LoadedApk (which
is already public, and just needs a small change to allow a null
ActivityThread when checking for instrumentation).

The other parameters for classloader creation (target SDK, bundled app,
etc) are hardcoded to usable values for the WebView's case. WebView
never needs to use any system libraries that aren't public so claiming
it's not bundled is fine even when that isn't actually true, and WebView
will always target the current platform API level.

Once the classloader is created, look up the factory class and call
preloadInZygote on it to give it a chance to preload the native library
and do other shared initialisation.

Bug: 21643067
Test: enable multiprocess WebView, examine librank output to see sharing
Change-Id: I696ead637e3f7382bcc58cfaf61eac5921862015
2016-11-21 15:04:13 +00:00
Neil Fuller
98f03f4980 Merge "Correctly handle when the user has no explicit time_12_24 setting"
am: 8631e19d38

Change-Id: I70533c5ff4ac8cdeef1b42337bb47b09c8bbf927
2016-11-15 16:50:29 +00:00
Neil Fuller
8631e19d38 Merge "Correctly handle when the user has no explicit time_12_24 setting" 2016-11-15 16:39:42 +00:00
Neil Fuller
c66ec40d38 Correctly handle when the user has no explicit time_12_24 setting
The code would previously interpret "null" (meaning the user
hasn't touched the setting in the Settings app) as meaning
"use 12 hour format". The actual meaning of "null" is
generally accepted in the platform as
"use the locale default". For example, the Settings app does
this, as does the code in libcore.icu.LocaleData. For
locales where the default is "use 12 hour format" anyway
this wasn't obvious. However, locales like Germany should
default to  24 hour, and then the setting is displayed
incorrectly in the Settings app.

Also, German devices boot for the first time with 12 hour SHORT
and MEDIUM time formats too. After the user had explicitly set
the format the setting would be correct.

There appear to be no tests for this behavior, presumably
because of the difficulty in forcing the setting to "unset"
which would have to have to happen before the app was launched,
and the fact that CTS tests run in the US locale.

Bug: 32868036
Test: Manual testing with a device set to German
Change-Id: Ifd2e8d345f6afee467d7525d6793fc8fda37c900
2016-11-14 16:06:42 +00:00
liangweikang
45562df8bb Merge "fixed applyConfigurationToResourcesLocked WeakReference is null"
am: 264d1f12a3

Change-Id: Icfaf039b078d7ce43b23bed09cd0102427c6f047
2016-11-11 03:25:41 +00:00
liangweikang
a9c9bf5106 fixed applyConfigurationToResourcesLocked WeakReference is null
https://code.google.com/p/android/issues/detail?id=226956

Test: compile anr monkey test

Signed-off-by: liangweikang <liangweikang900911@gmail.com>
2016-11-09 01:40:33 +00:00
Etan Cohen
6571007101 Merge "[NAN-AWARE] Rename NAN to Aware"
am: 74b1131cc8

Change-Id: I2e788e19a11f2709f2e542dbdc4b58433a3574bf
2016-11-06 03:13:31 +00:00
Etan Cohen
0849ded008 [NAN-AWARE] Rename NAN to Aware
~Rename only (and any reformatting needed to pass lint) - no
functional changes!

Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.

(cherry-pick of commit a61b9fb569)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
Change-Id: I4206d2fd722dc7dec9df4aee5c818101d7f9dccc
2016-11-05 09:41:38 -07:00
Leonard Mosescu
1ab879be90 Adding "attach-agent" to ActivityManagerShellCommand
This new command is used to attach runtime agents to a running application:

attach-agent <PROCESS> <FILE>
   Attach an agent to the specified <PROCESS>,
   which may be either a process name or a PID.

Test: m test-art-host, manual testing:
    . invalid syntax, missing arguments
    . invalid syntax, extra arguments
    . invalid numeric PID
    . invalid process name
    . valid process, not debuggable
    . valid process, missing agent
    . valid process, valid agent

Bug: 31682382

Change-Id: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6

Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
2016-10-27 17:03:57 +00:00
Michal Karpinski
fd0d22750f Don't expose default strong auth timeout as constant am: 6dbf67fc48
am: bc755da55c

Change-Id: Idb118df5cf1a763645f4187bcddfa4bb9b8b42ee
2016-10-13 23:00:24 +00:00
Michal Karpinski
bc755da55c Don't expose default strong auth timeout as constant
am: 6dbf67fc48

Change-Id: Iacbe9a2de7024e29e9c2c98594ebca828b855a43
2016-10-13 22:52:38 +00:00
Christopher Tate
86208efdc9 Only full-data back up regular files + directories am: da2018efeb
am: 0d816b8f69

Change-Id: I3b28c373c58ebebf27b1297e770d2023767e6396
2016-10-13 21:17:09 +00:00
Christopher Tate
da2018efeb Only full-data back up regular files + directories
Ignore every filesystem entity that is not a regular file or directory.
In particular, we now ignore not only symlinks but also sockets, pipes,
et cetera.

Bug 32143362

Change-Id: If51b54df1f7a643af145eb15bf12d389d19f8780
2016-10-13 12:19:45 -07:00
Adrian Roos
7bc84b803d Fix Notification.Action.Builder copy constructor am: 7af5362571
am: 342bc437bf

Change-Id: I0387ab66ec3d44e34a884fb2f92f32af35e2883c
2016-10-12 23:25:20 +00:00
Adrian Roos
7af5362571 Fix Notification.Action.Builder copy constructor
The copy constructor of Notification.Action.Builder did not copy
the mAllowGeneratedReplies field.

Change-Id: I40fbe8950ee2232e2589ab3930a32bfbebe9fc89
Fixes: 31766718
Test: runtest --path $T/cts/tests/app/src/android/app/cts/NotificationTest.java
2016-10-12 15:19:55 -07:00
Michal Karpinski
6dbf67fc48 Don't expose default strong auth timeout as constant
The admin can instead use the value of 0 to reset to default.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Bug: 31430135
Change-Id: I0d6b29ca4eca65d7ca72a8975a0c28c9050a946c
(cherry picked from commit 943aabd11c)
2016-10-12 09:34:12 +00:00
Alex Hills
21863add46 Updates documentation for MessagingStyle constructor am: fd590441c1
am: d86df31497

Change-Id: I6bdc90b7fde47569823b49c556f3bca9b50b0e48
2016-10-07 20:50:26 +00:00
Alex Hills
d86df31497 Updates documentation for MessagingStyle constructor
am: fd590441c1

Change-Id: I341c9a18c5a64e8cb63ad277611b9e55f61047c1
2016-10-07 20:43:57 +00:00
TreeHugger Robot
67c70a263c Merge "Updates documentation for MessagingStyle constructor" into nyc-mr1-dev 2016-10-07 20:34:50 +00:00
Robert Carr
3d2783c82b When adding dialog window but not creating update the configuration. am: d7dbec7e4c
am: 7696b0d06b

Change-Id: I536f02e97cb0969859454fd6250703056bca0b93
2016-10-07 19:29:56 +00:00
Robert Carr
7696b0d06b When adding dialog window but not creating update the configuration.
am: d7dbec7e4c

Change-Id: I137783f64cec9f9134e1c66b123993d65397deb5
2016-10-07 19:21:51 +00:00
Rob Carr
93becf5148 Merge "When adding dialog window but not creating update the configuration." into nyc-mr1-dev 2016-10-07 19:16:02 +00:00
Alex Hills
fd590441c1 Updates documentation for MessagingStyle constructor
MessagingStyle expects the field userReplyName to be non-null, but the
documentation doesn't describe it as such. This updates the documentation
to say the field is required, and adds a NonNull annotation.

This has no behavior changes.

BUG:31747744
Change-Id: If832d059c276e856fba366dabfa8a5821bb63054
2016-10-07 15:44:23 +00:00
Christopher Tate
79a3ee5a98 Explicitly close FD binder parameters in backup/restore API calls am: 91bb0e5cca
am: 3fa99a6d11

Change-Id: I4789534da734abbce9ec52fcbe9a754bd7bd9fa0
2016-10-06 20:36:26 +00:00
Christopher Tate
3fa99a6d11 Explicitly close FD binder parameters in backup/restore API calls
am: 91bb0e5cca

Change-Id: Ibdba35d9c4e17180a7593966b4d54d6fb9c03f02
2016-10-06 20:10:56 +00:00
Robert Carr
d7dbec7e4c When adding dialog window but not creating update the configuration.
When we dismiss the dialog as opposed to hide it, it is removed
from the local WindowManagerGlobal's list of ViewRoots. Thus it stops
receiving configuration changes. When first adding a ViewRoot it will
pull the configuration from the context, but in this case
we are reusing one which has already been added and removed
and no such action will occur.

Bug: 31004614
Change-Id: Ie247bcf1a14caf4a42413c6813e337aa4c88e3e4
2016-10-05 13:44:36 -07:00
Chris Tate
ee28c8c22c Merge "Explicitly close FD binder parameters in backup/restore API calls" into nyc-mr1-dev 2016-10-03 21:06:22 +00:00
Hemal Patel
63b5e3ddd1 Docs: Fixed the Service link am: 1918214589
am: eb21088b67

Change-Id: Ia687d1ba27eee87abe412e8a8dd11e49e5f02100
2016-10-01 01:54:45 +00:00
Hemal Patel
417e4e4609 Docs: Fixed the Service link am: 1918214589
am: e361f735d4

Change-Id: If7fc70c876f999c8a1d6635a3d39bbcc85708dc9
2016-10-01 01:53:53 +00:00
Hemal Patel
e361f735d4 Docs: Fixed the Service link
am: 1918214589

Change-Id: I52410cb0cccf0c1c99b13504672acdb0eadb9bc5
2016-10-01 01:46:01 +00:00
Hemal Patel
eb21088b67 Docs: Fixed the Service link
am: 1918214589

Change-Id: Icfd4e033b7ef9bd915f106abc789f11fb4ede301
2016-10-01 01:45:58 +00:00
Christopher Tate
91bb0e5cca Explicitly close FD binder parameters in backup/restore API calls
CloseGuard is grateful.

Bug 30893100

Change-Id: Ia6bd4d88204839add59d9d245aad673d67b11bea
2016-09-30 17:52:19 -07:00
Hemal Patel
1918214589 Docs: Fixed the Service link
Bug: 29086415
Change-Id: Id9505ade39c19eb817f556d72f689568148e1782
2016-09-30 14:59:23 -07:00
Richard Uhler
780ba35aa9 Add count of WebView instances to meminfo am: 2c0361986b
am: 8f61c5fe59

Change-Id: I797b6e09c1cff5a92a135c9ad0dc06fec97e3e36
2016-09-26 14:43:10 +00:00
Richard Uhler
8f61c5fe59 Add count of WebView instances to meminfo
am: 2c0361986b

Change-Id: I6b33039e70a20e7aaf0613081e8e64ee7e56873a
2016-09-26 14:38:38 +00:00
TreeHugger Robot
b0216412a2 Merge "Add count of WebView instances to meminfo" into nyc-mr1-dev 2016-09-26 14:33:31 +00:00
Treehugger Robot
fe9357f6e7 Merge changes from topic 'aosp-generics-api'
* changes:
  DO NOT MERGE Track generics in API definition.
  DO NOT MERGE Fix issue #29871385: Need JobScheduler.scheduleAsPackage to be system API
2016-09-26 14:04:57 +00:00
Alan Viverette
6e37f8a077 Allow developer to override Material-style modes in picker dialogs am: 8817aa9339
am: 010ab618af

Change-Id: I0d68842adb7097f4d32977f31d80a10bc166c045
2016-09-23 19:43:39 +00:00
Alan Viverette
010ab618af Allow developer to override Material-style modes in picker dialogs
am: 8817aa9339

Change-Id: I4733798d4785459ea36a75cddfeb7358912fe9d6
2016-09-23 19:36:42 +00:00
Alan Viverette
2525b0dab3 Merge "Allow developer to override Material-style modes in picker dialogs" into nyc-mr1-dev 2016-09-23 19:29:54 +00:00
Shuo Gao
304c720d4a Enable shader cache for applications that shared UID with multiple packages too
am: 1e6d77e836

Change-Id: I1d90470f85a632417845e961ef75b8c5a2703b50
2016-09-23 17:36:09 +00:00