Commit Graph

7201 Commits

Author SHA1 Message Date
Alison Cichowlas
0f961084ce Merge "Log wrapper for multi-metrics in tron." 2017-01-09 16:39:04 +00:00
Adam Lesinski
6224a32197 Merge changes from topic 'learned_capacity'
* changes:
  BatteryStats: Report learned battery capacity as event
  Parcel/unparcel charge_full state from BatteryProperties
2017-01-07 01:51:07 +00:00
Alison Cichowlas
803054dccb Log wrapper for multi-metrics in tron.
Test: Added new LogBuilderTest; runtest --path frameworks/base/core/tests/coretests/src/com/android/internal/logging/LogBuilderTest.java

new file:   core/java/com/android/internal/logging/LogWrapper.java

Change-Id: I8c64a07b95ab9a70f39663d4ec54f9ec1bf49063
2017-01-06 20:24:16 -05:00
Alain Vongsouvanh
88a2a61f09 widget: Adding support for custom LockPatternView.
OEMs can overlay the default 9 dots by providing two drawables that represent
those dots:
  * lockscreen_notselected: asset to display when a cell has not been selected.
  * lockscreen_selected: asset to display when a cell has been selected.

BUG: 33755663
Change-Id: Ic595b01f5e1321696b7a3feb0ff73c1acccfb942
2017-01-06 10:22:45 -08:00
TreeHugger Robot
54217e5c25 Merge "Added SystemServerInitThreadPool" 2017-01-05 22:37:44 +00:00
Fyodor Kupolov
e29a5a1152 Added SystemServerInitThreadPool
System services can use it during the boot to submit tasks that can be run in
parallel with the main thread.

Switched PersistentDataBlockService and FingerprintService from FgThread to
the new thread pool.

UiModeManagerService: update initial configurations on init thread. They run
while holding the mLock so no extra synchronization barriers are needed at a
later stage.

Test: manual - device boots without errors
Test: ParallelPackageParserTest passes
Change-Id: I548f34b0a18f61924e09a39afb12e085cde35442
2017-01-05 13:12:37 -08:00
Kang Li
f1941775b6 Merge "Fix crash when updating ranking model in ChooserActivity." 2017-01-05 21:11:56 +00:00
TreeHugger Robot
192d719abb Merge "Add content description and tooltip to menu item" 2017-01-05 19:46:28 +00:00
Kang Li
0cef910d5e Fix crash when updating ranking model in ChooserActivity.
Bug: 34095835

Test: manual tests (automated tests will be added later): 1. take a
picture and share it to Photos; 2. take a bug report and share it to
Gmail; 3. launch Chrome app, share a webpage to Drive; and 4. launch Contacts
and share a contact to Messenger.

Change-Id: Ie50c8305f90b6df69aa1e47c01d0b2212da0a37a
2017-01-05 11:43:15 -08:00
Vladislav Kaznacheev
7039cbc6f3 Add content description and tooltip to menu item
Bug: 34076597
Test: manual
Change-Id: Ide32463252457721286c929ab2f8f7bae241835d
2017-01-05 09:57:40 -08:00
Torne (Richard Coles)
bb65893a24 Abstract ZygoteInit.maybePreload call for webview.
Make ZygoteConnection call ZygoteInit.maybePreload via an overridable
method on itself, so that the WebView zygote's subclass of
ZygoteConnection can override it to do nothing; the WebView zygote
doesn't want to do this preloading and can't due to permissions.

Test: enable multiprocess webview, test webview apps work
Bug: 32735001
Change-Id: Ia6ac7d35172ba69ff861fe5a44b09ac52b0afbf0
2017-01-05 16:11:06 +00:00
Amith Yamasani
c9facc0a1f Merge "Track background sensor usage" 2017-01-05 00:32:10 +00:00
Amith Yamasani
ab9ad195d1 Track background sensor usage
Keep an additional counter for background access
of sensors. Increment the count when sensor is
accessed while process is in the background state.

Bug: 33553631
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsSensorTest.java
Change-Id: I87d7dbdaf4c34aa9dd9c7e13134d8f5f759f4e2b
2017-01-04 12:34:57 -08:00
Sunny Goyal
a532c3ff8c Merge "AppWidgetManager: direct add widget support." 2017-01-04 18:21:38 +00:00
Kang Li
a5e50e2612 Merge "Log metrics for Smart-Sharing in ChooserActivity." 2017-01-04 16:09:05 +00:00
Kang Li
97a8d70386 Merge "Rank apps by Logistic Regression for Smart-Sharing." 2017-01-04 16:08:25 +00:00
Sunny Goyal
87a563e070 AppWidgetManager: direct add widget support.
Test: Manual test and all the unit tests:
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test9
adb shell am instrument -e class com.android.server.appwidget.AppWidgetServiceImplTest -w com.android.frameworks.servicestests

Bug 32404406
Change-Id: Icd6d4cbd25d9cdf4508da725d95d6401cc3a46a7
2017-01-03 13:28:56 -08:00
Hakan Seyalioglu
e1276bfe08 Do the sorting for the ShareSheet asynchronously.
This lets the screen fade out and share sheet start being displayed
before all results are sorted. Based heavily on ag/1126533. There are
two other follow ups that I'd like to do after this that aren't a part
of this change:

1) Investigating images being loaded multiple times (from original
   change)
2) Put placeholder space while the sorted images are coming in - at the
   moment there's some jank when the list of applications becomes
   visible.

Test: Unit tests for ChooserActivityTest (still would like to add tests
for ResolveInfoController and UsbResolverActivity).

Change-Id: I4c4a65fff1b0f17fc52b9bd01c3d5c59d649d119
2017-01-03 13:21:41 -08:00
Kang Li
a2c7774d21 Rank apps by Logistic Regression for Smart-Sharing.
Bug: 30982298
Test: manual - tested by sharing images in Photos and sharing texts in
Chrome.

Change-Id: I9808abdefbc898d3452e684f3462efafdfd53c23
2017-01-03 09:24:28 -08:00
Donghyun Cho
3680b73cbc Merge "Use AlertDialog for MediaRouteControllerDialog" 2017-01-02 04:52:37 +00:00
Donghyun Cho
86165e354c Use AlertDialog for MediaRouteControllerDialog
Rather than using custom layout for MediaRouteControllerDialog, use
AlertDialog to lay out inner views and buttons properly. Also, obtain
the media route icon from the current theme and animate it if necessary.

Bug: 33253732
Test: Launched the dialog and verified.
Change-Id: I4bec689ce808285e084fc9a90820b429e63e765a
2017-01-02 11:21:08 +09:00
Kang Li
9082f5b697 Log metrics for Smart-Sharing in ChooserActivity.
Bug: 33051310, 30982298
Test: manually shared several images in Camera.

Change-Id: I6b147ec89729815931e2b626b7533e1e5b95c819
2016-12-28 10:31:59 -08:00
Narayan Kamath
5a3d0c6e11 Allow lazy preloading of zygote resources.
Add a flag that controls resource preloading. If set, the zygote waits
until the first fork request to preload resources.

When applied to the secondary zygote, this approach appears to save
between 500-800ms of boot time once the webview RELRO step that uses
the 32 bit zygote is deferred.

Test: Manual
Bug: 32735001

Change-Id: Id387b7132d052fa51b9c25f0142fcd546b99662d
2016-12-28 15:20:11 +00:00
Vladislav Kaznacheev
20a12da3ce Adjust tooltip layout
Position a mouse hover tooltip closer to the target.
Limit tooltip width and make it multiline (maxLines=3).
Show a long press tooltip above the target, not below.

Bug: 33352391
Bug: 33353823
Bug: 33354000

Test: manual
Change-Id: Ie00353d715d73d432b5d892a0a7c04508a003a78
2016-12-22 13:17:20 -08:00
Michael Kwan
cd6be5bdab Fix OnCancelListener for Dialogs on swipe to dismiss. am: 67639a5f67 am: 5a0c0ffd03
am: 95ccfb0dcc

Change-Id: I25f9462c60a59582d26a68c2cc7a2ca5a1c11857
2016-12-19 19:34:41 +00:00
Michael Kwan
95ccfb0dcc Fix OnCancelListener for Dialogs on swipe to dismiss. am: 67639a5f67
am: 5a0c0ffd03

Change-Id: Id8faa62cb551424036aae9f542f2d0776cfea522
2016-12-19 19:17:48 +00:00
Michael Kwan
5a0c0ffd03 Fix OnCancelListener for Dialogs on swipe to dismiss.
am: 67639a5f67

Change-Id: I92bc472b3519020eeadf61b1e8047aee9e8bd96c
2016-12-19 19:11:48 +00:00
Adam Lesinski
497516d04b Reset BatteryStats when too large for clients to handle am: 45489787d7
am: 66c7e9c20e

Change-Id: I20e9da9f7580b6f483332649459a32d7562ca2cf
2016-12-19 18:12:00 +00:00
Andrew Scull
7cd4536e80 Merge "Don't save the password metrics to disk." 2016-12-19 14:48:37 +00:00
Hugo Benichi
e55546a127 DO NOT MERGE IP Connectivity metrics: add connect() statistics
am: 2299a1c401

Change-Id: I7ad93b1b3a3446ffd6dce7c0799ddb9a2b43955f
2016-12-19 08:40:37 +00:00
Adam Lesinski
66c7e9c20e Reset BatteryStats when too large for clients to handle
am: 45489787d7

Change-Id: Ie90ad79b71198d0fe0ead12048aec9bf6658a35a
2016-12-17 02:10:57 +00:00
Kweku Adams
c9430110da Fixing issue in current and max duration calculations.
am: c6bd4243a4

Change-Id: I109e0599a631de20d28723bb9ad714c0aedb2fac
2016-12-16 23:51:17 +00:00
Michael Kwan
67639a5f67 Fix OnCancelListener for Dialogs on swipe to dismiss.
Swipe to dismiss on dialogs did not dispatch onCancel events
to OnCancelListeners. Resolve by adding listener to monitor
swipe to dismiss events and dispatch onCancel events when
that occurs.

Bug: 33663411
Change-Id: I64ff29e008d485a4559eb3d1ff7f0e74dccff404
2016-12-16 13:43:16 -08:00
Robert Sesek
061ee3088a Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist.
This refactors the whitelist to be a class, rather than just a static C array.
The whitelist can then be augmented dynamically when the package path is known
in the webview_zygote.

Test: m
Test: sailfish boots
Test: Enable Multi-process WebView in developer options, perform a search in GSA.

Bug: 21643067
Change-Id: Ia1f2535c7275b42b309631b4fe7859c30cbf7309
2016-12-16 16:42:41 -05:00
Tamas Berghammer
f4b0962cac Enable logwrapper functionality on user builds am: 0ca16fa584 am: db05d4b4ed am: ed8757a761
am: f00963c71f

Change-Id: I10b9a367a1c2477683dbb404ebb8bfdd41d92263
2016-12-16 20:03:36 +00:00
Tamas Berghammer
f00963c71f Enable logwrapper functionality on user builds am: 0ca16fa584 am: db05d4b4ed
am: ed8757a761

Change-Id: I0f27f6aeb58690addb1c5f7978047ccb8d73ab84
2016-12-16 19:54:58 +00:00
Tamas Berghammer
ed8757a761 Enable logwrapper functionality on user builds am: 0ca16fa584
am: db05d4b4ed

Change-Id: Ic6c3395f9965657a7f9abe580867eeb81b59ed88
2016-12-16 19:46:55 +00:00
Tamas Berghammer
db05d4b4ed Enable logwrapper functionality on user builds
am: 0ca16fa584

Change-Id: Ic18991f9a59f05356fcbcc65acc79be43fc68542
2016-12-16 19:38:38 +00:00
Adam Lesinski
45489787d7 Reset BatteryStats when too large for clients to handle
When BatteryStats history is too large, the Settings app crashes.
Reset the battery stats by marking an *OVERFLOW* event at the
beginning of the newly reset history.

This seems to happen in Retail mode when the devices are on charger
for an extended period of time and accumulate a sufficiently large
history. Resetting makes sense because the phone is most likely
charged and will reset anyways when unplugged.
Bug: 32540341
Test: Manual

Change-Id: I8c2892458b5d9ce64b1c44aa2e2a000340e71e63
2016-12-16 19:27:53 +00:00
TreeHugger Robot
6a435500d4 Merge "Add a flag for whether non-system apps can be installed on internal." 2016-12-16 18:59:05 +00:00
Joe Onorato
10e237e5c8 Merge changes from topic 'incident_1'
* changes:
  First checkin of incident reporting.
  Add a native class to interact with DropBoxManager.
2016-12-16 18:19:50 +00:00
Tamas Berghammer
0ca16fa584 Enable logwrapper functionality on user builds
When an app is debuggable, check whether a script called "wrap.sh" exists
in the app's native library directory. If so, start the app using the
invoke-with functionality over the script. Weaken the invoke-with check
on the zygote side to allow the functionality for debuggable apps.

The goal of the functionality is to make malloc debug, strace and other
similar tools available for NDK based application developers.

Bug: 33668201
Test: manual - debug malloc can be enabled using the new feature
Change-Id: Ia4bec0854cf4dc08446f1671494200f54ef366ee
2016-12-16 09:03:06 -08:00
Andrew Scull
5daf273b7e Don't save the password metrics to disk.
Only store the metrics in RAM, computing them at first log in.

Test: com.android.cts.devicepolicy.DeviceAdminHostSideTestApi24
Bug: 32793550
Change-Id: Iaf9516c193f054331e3e2c68cb3f627bd543b408
2016-12-16 15:30:14 +00:00
Tamas Berghammer
2688cfcc4a Merge "Install all files from the lib directory for debuggable apps" am: c0cc7c646c am: 736852e2c4 am: db274f7859
am: 362775ee20

Change-Id: I9194b856610e7b102bc46705fb2cb6937def7023
2016-12-16 03:50:40 +00:00
Tamas Berghammer
362775ee20 Merge "Install all files from the lib directory for debuggable apps" am: c0cc7c646c am: 736852e2c4
am: db274f7859

Change-Id: I4bd6e3da9c41fcfb9a5d8f39c63da446515fc9ff
2016-12-16 01:46:39 +00:00
Tamas Berghammer
db274f7859 Merge "Install all files from the lib directory for debuggable apps" am: c0cc7c646c
am: 736852e2c4

Change-Id: I0faa3ab541ca8d1400719653171b4bcafceada81
2016-12-16 01:21:31 +00:00
Tamas Berghammer
736852e2c4 Merge "Install all files from the lib directory for debuggable apps"
am: c0cc7c646c

Change-Id: Idc3b17fa4044ab0dd50fa141f1ec5ec8a47810b0
2016-12-16 00:48:21 +00:00
Treehugger Robot
c0cc7c646c Merge "Install all files from the lib directory for debuggable apps" 2016-12-16 00:35:55 +00:00
Michael Kwan
8592fdafdd Fix swipe-to-dismiss to properly react to swipe gestures. am: 8a9b27773b am: 4308eaa477
am: f6876c1169

Change-Id: I342c832da0a91f536d9b935037d13ba23d9912a9
2016-12-15 21:30:48 +00:00
Michael Kwan
f6876c1169 Fix swipe-to-dismiss to properly react to swipe gestures. am: 8a9b27773b
am: 4308eaa477

Change-Id: Id5fa0c8bd66ca7970c971884c1067aca4ac24124
2016-12-15 21:23:44 +00:00