Commit Graph

7375 Commits

Author SHA1 Message Date
TreeHugger Robot
3b6bcfb65d Merge "Require InputContentInfo.requestPermission()" 2017-01-11 06:30:22 +00:00
Andreas Gampe
e19589fbe8 Merge "Zygote: Add fdsToIgnore" am: 5b22a826d5 am: 140b9b65a1 am: e4cff36099
am: 3b51506c5c

Change-Id: I24e391d2cd7b9bff0808fc9355059b1b71bcba3e
2017-01-11 04:53:19 +00:00
Andreas Gampe
3b51506c5c Merge "Zygote: Add fdsToIgnore" am: 5b22a826d5 am: 140b9b65a1
am: e4cff36099

Change-Id: I89cd109839b4af2510a5b1789a146f7efea4cb80
2017-01-11 03:01:40 +00:00
Andreas Gampe
e4cff36099 Merge "Zygote: Add fdsToIgnore" am: 5b22a826d5
am: 140b9b65a1

Change-Id: Ib4c46887ed5d87ef143bd866320d77b75d8711a3
2017-01-11 02:46:57 +00:00
Andreas Gampe
140b9b65a1 Merge "Zygote: Add fdsToIgnore"
am: 5b22a826d5

Change-Id: I458e354acf620cb434de41790ce94b814ff0a4ea
2017-01-11 02:33:05 +00:00
Andreas Gampe
8dfa178efb Zygote: Add fdsToIgnore
Add file descriptors that should be ignored in the file descriptor
table check.

Use this to ignore the pipe file descriptors when starting an app
with invoke-with (wrapper).

Bug: 32607405
Test: m
Test: Device boots
Test: Apps start
Test: adb root && adb shell setprop wrap.com.android.calculator2 logwrapper && adb shell am start -S -n com.android.calculator2/.Calculator
Change-Id: I4a30dfc9382d3172cc815bd41b17a123799354f6
2017-01-10 16:55:34 -08:00
Robert Sesek
15fe73846c Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist. am: 54e387ddbe am: 839a185b2e
am: df781cc514

Change-Id: I869aaa330de7fb0de2d608a6cbf7a8974e9757ba
2017-01-10 23:52:13 +00:00
Robert Sesek
df781cc514 Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist. am: 54e387ddbe
am: 839a185b2e

Change-Id: I1e761ea737447b347f2542419d18d1f42b1b50db
2017-01-10 23:40:15 +00:00
Robert Sesek
839a185b2e Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist.
am: 54e387ddbe

Change-Id: I7b4e809767e4cdd64da4094decc929504e1e93d8
2017-01-10 22:33:00 +00:00
Yohei Yukawa
6b422e287c Require InputContentInfo.requestPermission()
This CL logically reverts my previous CL [1], which allowed the system
automatically grant a temporary URI permission to the target
application when the IME calls InputConnection#commitContent() with
InputConnection#INPUT_CONTENT_GRANT_READ_URI_PERMISSION.

Based on conversations with application developers who have supported
Commit Content APIs, I concluded that my assumption that automatically
granting the permission without an explicit call of
InputContentInfo.requestPermission() would help application developers
was wrong.  They anyway need to take care of the situation where the
app fails to read the data from the given content URI.  Thus just
receiving SecurityException() because of not calling it is still one
of such cases that application developers cannot forget about.

Therefore with this CL InputContentInfo.requestPermission() becomes
mandatory when InputConnection#INPUT_CONTENT_GRANT_READ_URI_PERMISSION
is specified.

 [1]: Id955435dd2e72549ee7134f46b3c6951581694ad
      f3806f57a5

Bug: 32315394
Test: By github.com/googlesamples/android-CommitContentSampleApp
Change-Id: I8a3cb79ae6d6c4113914734799b21bfc96e3ca3e
2017-01-10 14:32:46 -08:00
TreeHugger Robot
5df7f1ab61 Merge "Provide non-blocking SurfaceView draw notification path." 2017-01-10 22:16:19 +00:00
Robert Sesek
54e387ddbe 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
(cherry picked from commit 061ee3088a)
2017-01-10 11:44:56 -08:00
Michael Kwan
7cf986aba3 resolve merge conflicts of c252b661e6 to master
Change-Id: Ia3fbedc5b0f90988ef319720a9e668ccc9e297f4
2017-01-09 16:12:53 -08:00
Michael Kwan
c252b661e6 Check if the activity translucency was converted before converted back. am: 39dd370d8e
am: 898385ed59

Change-Id: I5bee496498ebcff712184f417adfdf8ee5436e7d
2017-01-09 23:15:23 +00:00
Michael Kwan
898385ed59 Check if the activity translucency was converted before converted back.
am: 39dd370d8e

Change-Id: Ib0705da70acd8abceedd5c1deeacae5023032543
2017-01-09 23:06:21 +00:00
Michael Kwan
39dd370d8e Check if the activity translucency was converted before converted back.
Bug: 34084490
Change-Id: Ib04c76549a31c7e523649f9d284637d44d7477ae
2017-01-09 13:43:52 -08:00
TreeHugger Robot
29c0a2c93d Merge "Do not report uptime to tron after runtime restart" 2017-01-09 19:56:16 +00:00
Mark Renouf
d9d871ff58 Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN am: 9b32a35aa7 am: 7ef0b07465
am: d5a1123109

Change-Id: Ie02c9f74fc93133a68940204420c48f92d4b352f
2017-01-09 19:47:22 +00:00
TreeHugger Robot
e7e4998784 Merge "Updating PIP to match UX" 2017-01-09 19:33:09 +00:00
Mark Renouf
d5a1123109 Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN am: 9b32a35aa7
am: 7ef0b07465

Change-Id: I8e6ed26b1109dd3cb293d3a0a2307877fa5e4304
2017-01-09 19:30:38 +00:00
Mark Renouf
7ef0b07465 Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN
am: 9b32a35aa7

Change-Id: I99d041ae3a1771e17c94a168cf672f8b73ce572d
2017-01-09 19:13:55 +00:00
Mark Renouf
5df216f209 Merge "Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN" into cw-f-dev 2017-01-09 19:00:05 +00:00
Robert Carr
25cfa13483 Provide non-blocking SurfaceView draw notification path.
SurfaceView needs to notify the window manager that
drawing has been completed, so that animations and such
can begin. Currently this is implemented through
having the SurfaceView user block in surfaceRedrawNeeded
(called from  UI thread) until a frame has been completed.
This blocking can be unnecessary serialization during startup, and
also clumsy to implement for some users.

Test: GLSurfaceView and takeSurface API Demos, android.server.cts.SurfaceViewTests
Bug: 31850030
Change-Id: Idda02098a635f25cf392f2d59a3abbe54a1d64d4
2017-01-09 10:44:58 -08:00
Fyodor Kupolov
6733e6c6b6 Do not report uptime to tron after runtime restart
Runtime restart doesn't reset the uptime counter. We shouldn't report
boot timings in that case.

Bug: 32807863
Test: manual
Change-Id: If9510c0d5c633acefe70f241e0823da8f6c248a2
2017-01-09 10:29:42 -08:00
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
Winson Chung
a5acf18dfe Updating PIP to match UX
- Updating menu actions to match design, fixing issue where
  the actions background would still be visible if there were
  no actions
- Enabling tap-to-show-menu, minimizing, snap-to-edge by default,
  and removing swipe to dismiss option.
- Making the visible size a fixed value instead of a fraction of
  the PIP size

Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: Ib767df497ca7bc901c553d35168080f3b737033a
Signed-off-by: Winson Chung <winsonc@google.com>
2017-01-06 16:20:52 -08: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
Alain Vongsouvanh
c89202e177 resolve merge conflicts of cb29c97907 to nyc-mr2-dev-plus-aosp
Change-Id: I22ff2e61c0d46310e62fa45f98e11a5bba3d5f1a
2017-01-05 16:11:25 -08:00
Alain Vongsouvanh
5549258eea resolve merge conflicts of 2fda2ce159 to nyc-mr1-dev-plus-aosp
Change-Id: Ia35164bd4ea262fa72afb7b78a47b0e4f0ef96ba
2017-01-05 15:27:37 -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
Alain Vongsouvanh
cb29c97907 widget: Adding support for custom LockPatternView.
am: 2fda2ce159

Change-Id: Ib0d53bd7258f784dc3cb0661757b7c6d4979007f
2017-01-05 19:45:02 +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
Mark Renouf
9b32a35aa7 Omit NavigationGuard if the input method uses FLAG_LAYOUT_IN_OVERSCAN
In some cases (e.g. Android Wear) SystemWindowInsets can be non-zero
due to overscan layout hints even when no SystemUI is present.

This change resepects the overscan flag on input method windows
allowing an IME to opt-out of the navigation bar guard and receive
full-height content view.

BUG: 32700226
Change-Id: Ic38f204a892bf34e8dae65990d5aa8c95af555d8
2017-01-05 13:52:59 -05: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
Alain Vongsouvanh
2fda2ce159 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-05 16:16:49 +00: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