313337 Commits

Author SHA1 Message Date
Chad Brubaker
055b51af28 Merge "Expose more settings to Instant Apps" into oc-dev 2017-04-12 23:51:42 +00:00
Evan Rosky
a0ce440d60 Merge "Fix focus ordering with duplicate ids" into oc-dev 2017-04-12 23:50:04 +00:00
Jeremy Joslin
1e2595d792 Always call unbind.
Per a recent discussion unbind should always be called, even if
bind() returns false.

Restructured the NetworkScoreService code to allow for easier and
more robust testing of the inner ServiceConnection class.

Bug: 36999204
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Change-Id: I08870b7109cb7f51cdab8b632b7d1d0898c3c015
2017-04-12 16:47:00 -07:00
Roozbeh Pournader
d39388219f Merge "Revert "Make selection end handle stick to selection at line end."" into oc-dev 2017-04-12 23:22:40 +00:00
Dianne Hackborn
d5a8b43f8e Debugging issue #37272284: ActivityManager: SELinux tag not defined
Add a little more info to the exception message.

Test: manual
Change-Id: I7ccbd5720d0e6c22a6caa9bfcb24cf40effde804
2017-04-12 16:14:42 -07:00
Chris Wren
5357e642bc don't interpret milliseconds as nanoseconds
The bug fix is in the readEvents() wrapper, but also make sure that
both the Event and LogReader interfaces only expose milliseconds.

No test changes, because the Java-layer didn't change, the bug was
in the JNI wrapper, below the level that's easily testable.

Bug: 37205954
Test: runtest --path frameworks/base/core/tests/coretests/src/android/metrics
Change-Id: I0c4ad9233a81bcf585ab525b3a5cc63fbb645093
2017-04-12 19:14:30 -04:00
Christopher Tate
ee3b42af3f Introduce PACKAGE_FIRST_ADDED broadcast
When an app first appears on a device, this new broadcast is issued
including to manifest receivers.  The more general PACKAGE_ADDED
broadcast continues to be issued for both first install and updates,
but is not delivered to manifest receivers of apps that target O+.

Bug 37219124
Test: manual

Change-Id: I59b0a0b0dce96a909076b41280771f63e59584be
2017-04-12 16:14:17 -07:00
Hyunyoung Song
92e3da2354 Update API, add more documentation on AdaptiveIconDrawable
and fix multiple miscellaneous bugs.

Bug: 37079814
Bug: 37100106
Bug: 34829216

Test: $ runtest --path=frameworks/base/core/tests/coretests/src/android/graphics/drawable/IconTest.java
Test: $ runtest --path=frameworks/base/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
Test: $ runtest --path=frameworks/base/core/tests/coretests/src/android/grpahics/drawable/AdaptiveIconDrawableTest.java

Change-Id: I0f5b2232853031bf3860ebea2736e894d17e4d2e
2017-04-12 16:06:45 -07:00
Todd Kennedy
c06c030671 Filter instant app content providers
Only expose the correct content providers depending upon which
component defines/exposes them.

Change-Id: I283c787165e33d9515068487f83de6d28616b427
Fixes: 35871462
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
2017-04-12 16:03:22 -07:00
Yu Liu
0e342e1fdb Fix some issues came up from the reviews of the newly added APIs
Test: Existing unit tests still pass.
BUG: 36554361
Change-Id: I6c2dab2e0df7f8578f92c70907f45aa69909892c
2017-04-12 23:02:35 +00:00
Rob Carr
7040f573f3 Merge "Fix auto-pip visibility issues." into oc-dev 2017-04-12 22:46:26 +00:00
TreeHugger Robot
18d993bb72 Merge changes from topics 'KeyboardFocusHighlight-oc-dev', 'KeyboardFocusHighlight_ mDefaultFocusHighlightEnabled-oc-dev', 'KeyboardFocusHighlight_ hasFocusStateSpecified-oc-dev' into oc-dev
* changes:
  Fix broken CTS tests.
  Draw a default focus highlight if needed.
  Add a public API defaultFocusHighlightEnabled.
  Detect unhandled keyboard focused state.
2017-04-12 22:40:15 +00:00
Jocelyn Dang
f2c38c130f Add set-mode command to turn battery saver mode on and off.
Affected test will be modified in ag/2101279

Test: adb shell cmd battery unplug && adb shell cmd power set-mode 0
Bug: 31944272
Change-Id: Ia88e7e164aa9b8b4d0ab51f607a64b35e2159273
2017-04-12 15:39:03 -07:00
Shuo Qian
cfe9e61ce4 ECBM SystemProperty cleanup
- Add getEmergencyCallbackMode() method in the TelephonyManager.java
to get the boolean value for ECBM callback mode from the phone through
ITelephony.aidl/java interface

- Use the added TelephonyManager Api to replace the 'get' of
PROPERTY_INECM_MODE system property in the framework/base

Change-Id: I83fbdeef5c0b43a8fc16ece044c9e191e9922bce
Test: manual
Bug: 30361624
2017-04-12 22:36:00 +00:00
Jack He
76cd53a953 Add developer setting and system API for inband ringing support
* Add 1 system API to check inband ringing flag in config.xml
	static isInbandRingingSupported(Context)
* Add developer menu options to enable this feature

Bug: 19171297
Test: mm -j 40, HFP regression testing, testplans/82144
Change-Id: Iaf56ea41911f546bbc7ae1f82e399d0f8d48f75f
(cherry picked from commit e86bdcaed1372aa05bdfba175007b05613aecd9b)
2017-04-12 22:24:37 +00:00
TreeHugger Robot
c240c9b134 Merge "clear calling identity before calling settings provider" into oc-dev 2017-04-12 22:09:24 +00:00
Amit Mahajan
682ce66309 Merge "Add p2 option in openLogicalChannel." into oc-dev 2017-04-12 22:02:39 +00:00
Adam Lesinski
5ec8875d20 Update docs for obtainStyledAttribute
Include the requirement that the input attribute ID array
must be sorted.

Bug: 34802757
Change-Id: I3244178c52df77078afae656652c3a44447fa645
Test: none
2017-04-12 14:45:14 -07:00
Andrew Solovay
2b03511377 doc: Add note to Context.bindService()
Per email from Dianne H, even if bindService() returns false, the
client should still call unbindService() to release the connection.

Doc is staged to:

http://go/dac-stage/reference/android/content/Context.html#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int)

Bug: 37092557
Test: make ds-docs
Change-Id: I5849aaccec933ee7660b31241e4d8eff9ee1ef72
2017-04-12 14:43:57 -07:00
Dianne Hackborn
81bfe1f62e Merge "Allow appops command to modify uid ops." into oc-dev 2017-04-12 21:37:52 +00:00
Sudheer Shanka
3af0294c36 Update NPMS internal state when app idle parole state is changed.
Fixes: 37250313
Test: 1. cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
      2. runtest -c com.android.server.NetworkPolicyManagerServiceTest frameworks-services
Change-Id: I5fcac397116a07fe9015b7dabf5bca57b0b23176
2017-04-12 14:35:16 -07:00
Svet Ganov
84ec9cbace Merge "[DO NOT MERGE] Allow multiple toasts for the focused app" into cw-f-dev am: 39c3d2cf16
am: 91ed4d7553  -s ours

Change-Id: Ia744f56107b83b6a5d5e236d24641bd7db71ab02
2017-04-12 21:21:56 +00:00
Julius D'souza
3a967f92f2 DO NOT MERGE: Remove the development privelege level from SET_DISPLAY_OFFSET. am: 0a8ecc6886
am: f72dd4142b  -s ours

Change-Id: Ia99beb815b720219daecfdc9446c5ff2c4d1b16f
2017-04-12 21:20:47 +00:00
Roozbeh Pournader
e740fd8d7b Switch i18n listeners to use IME hint locales
Previously, the i18n listeners were keyed off the text locales of the
TextView. This could create some unanticipated backward
compatibility headaches. The IME hint locales seems to be a better
match, since they are supposed to be used for input.

Fixes: 37249649
Fixes: 37133729
Fixes: 37222714
Bug: https://code.google.com/p/android/issues/detail?id=2626
Bug: 8319249
Bug: 33276673
Bug: 34394455
Bug: 37160895
Test: Updated and added CTS tests pass
Change-Id: If8a115f3e30ff1601dee426a504984e2ce24a776
2017-04-12 14:19:02 -07:00
TreeHugger Robot
a402d6dd2f Merge "Add autofill feature API" into oc-dev 2017-04-12 21:17:33 +00:00
Svet Ganov
91ed4d7553 Merge "[DO NOT MERGE] Allow multiple toasts for the focused app" into cw-f-dev
am: 39c3d2cf16

Change-Id: I3ddf7e0ceadd7c179f3c7de198658af190985f1b
2017-04-12 21:11:57 +00:00
Dianne Hackborn
ad6ab44e15 Merge "Add API to get a uid's current importance." into oc-dev 2017-04-12 21:11:46 +00:00
Julius D'souza
f72dd4142b DO NOT MERGE: Remove the development privelege level from SET_DISPLAY_OFFSET.
am: 0a8ecc6886

Change-Id: I262e7497e9256f708847ba7c767f202c91aa1739
2017-04-12 21:10:49 +00:00
Makoto Onuki
b4c2e6f468 Merge ""bmgr restore" really should wait until operation finishes." into oc-dev 2017-04-12 21:10:37 +00:00
Dianne Hackborn
f74210c3a3 Merge "Fix issue #37220301: Allow broadcasts with permissions to not be restricted" into oc-dev 2017-04-12 21:10:03 +00:00
Selim Gurun
c68b1a8aef Merge "Deprecate findAddress() method" into oc-dev 2017-04-12 21:05:07 +00:00
TreeHugger Robot
39c3d2cf16 Merge "[DO NOT MERGE] Allow multiple toasts for the focused app" into cw-f-dev 2017-04-12 21:00:25 +00:00
Seigo Nonaka
69754bf66d Introduce FontsContract.fetchFonts and expose URI for watching.
FontsContract.fetchFonts provides a low level font access with fonts
provider.
This CL also includes:
- Introduce new class FontFamilyResult/Font as the inner static class
of FontsContract which are used to for result value of fetchFont..
- Introduce a functionality to FontsContract to be able to create
Typeface from an array of FontResult.
- Expose URI of each file entries to be able to register ContentObserver

Bug: 36494487
Bug: 36085028
Test: android.provider.FontsContract passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.fonts.cts.FontResultTest passes

Change-Id: Id6f85039d0e86be063ef099d7ec6bfd97e4424c5
2017-04-12 13:52:37 -07:00
Adam Lesinski
d11c5510b1 OMS: Fix bug where overlay settings wouldn't persist
The dead user check was using a List.removeAll() call to find
the subset of users that have been removed and need deleting
from the overlay settings. The target class, UserInfo, does not
implement equals(), therefore no UserInfos would be removed from
the set and all user IDs would be candidates for deleting.

This change avoids the UserInfo class entirely and manipulates userIds.

Bug: 36099320
Test: Pick a theme and reboot.
Test: Theme should still be applied on next boot.
Change-Id: I1ee57839515460bf578664dfe1bd67df7d10d041
2017-04-12 13:49:13 -07:00
TreeHugger Robot
755138bb1c Merge "Make QS light" into oc-dev 2017-04-12 20:43:16 +00:00
Wale Ogunwale
9c64cb6a72 Dump controller for AppWindowToken
To help with debugging.

Bug: 36097078
Test: N/A
Change-Id: I72108b918d839b67efe8b8eed65a33775bd94dbc
2017-04-12 13:39:59 -07:00
Bill Yi
88ab6c1304 Merge "Import translations. DO NOT MERGE" into oc-dev 2017-04-12 20:19:39 +00:00
TreeHugger Robot
e7b806e9d2 Merge "Allow instant app resolution for any user" into oc-dev 2017-04-12 19:45:55 +00:00
Seigo Nonaka
1e924df63e Merge "Update Typeface.Builder API to reflect API feedback." into oc-dev 2017-04-12 19:39:50 +00:00
TreeHugger Robot
684b5381e9 Merge "Rename WEB_ACTION_ENABLED to INSTANT_APPS_ENABLED" into oc-dev 2017-04-12 19:39:16 +00:00
TreeHugger Robot
e7ce1d40e1 Merge "Add documentation for 'am start-foreground-service'" into oc-dev 2017-04-12 19:37:26 +00:00
Adam Lesinski
d4abd1eeb0 BatteryStats: Remove reading of cpu power
The cpu power reported by the uid_cputime kernel is inaccurate
and has only ever been recorded for dumping to batterystats.
The values have never been used in power blame calculations.

This change removes these power values which just cause noisy
data.

Bug: 36002715
Change-Id: I61bea9992aabb84d099689360fd9377b44b36e2f
Test: run `adb shell dumpsys batterystats`
Test: should not show `p=` for `Total cpu time:` line
2017-04-12 12:25:21 -07:00
Julia Reynolds
43dd3ba3c4 Merge "Clear calling identity before verifying listeners" into oc-dev 2017-04-12 19:13:05 +00:00
Robert Carr
414ebc6ac8 ViewRoot: More surgically fix child-life time.
A more targeted version of "ViewRootImpl: Fix child lifetime".
In this version we avoid hijacking the window visibility callback
and introduce a new path.
Our contract has been that at any time after returning from
onStop, the WindowManager may destroy the clients Surface. We
see in setWindowStopped, we set the stopped state on the hardware
renderer in order to prevent further use of the Surface. However
there is nothing synchronously dispatching this change to child views
and so SurfaceView is not necessarily informed to release it's Surface
in time. Typically SurfaceView will be informed through the
onWindowVisibilityChanged callback. The signal producing this
is emitted from SystemServer prior to onStop but has to pass
through the clients handler thread. It seems this has always been
broken, and we have always had intermittent reports of EGL_BAD_ALLOC
scenarios. I speculate that elevation of WindowManager scheduling during
app close scenarios is perhaps making this more severe, as it seems to
ensure the WindowManger will win the race to destroy the Surface before
the client handler thread process onWindowVisibilityChanged (unless
the FIFO timeout is surpassed).

Test: Put Chrome in PiP. Turn screen off. No Crash!
Bug: 36561071
Change-Id: I9233ba8151c7f577b1d1044afc0c2ac3a65be4b4
2017-04-12 12:08:01 -07:00
Julius D'souza
0a8ecc6886 DO NOT MERGE: Remove the development privelege level from SET_DISPLAY_OFFSET.
Bug: 36515029
Test: the build still works.
Change-Id: I39ae2c55b6b2b0d6547f75f4ef06e62e3e5f0b84
(cherry picked from commit 8e9ea907448c49f573dd045707e37dd14efdf152)
2017-04-12 12:06:50 -07:00
Casey Burkhardt
9aa64e6cfa Merge "Improved multiuser support for A11y button/Magnification" into oc-dev 2017-04-12 19:04:18 +00:00
TreeHugger Robot
c9a83326c2 Merge "Fill UI polish" into oc-dev 2017-04-12 18:54:32 +00:00
Salvador Martinez
ab932147aa Added strings for thermal shutdown warning
Strings for thermal shutdown warning were missing
so this CL adds them and a proto message value.

Test: SysUI tests still pass
Bug: 30994946
Change-Id: Ifd0b26248c2ebae5bcf32ecbea2566c14be7dc32
2017-04-12 18:41:35 +00:00
TreeHugger Robot
1f477fb270 Merge "Updates reportChooserSelection to be synchronized with queryUsageStats in UsageStatsService, to fix a flaky test." into oc-dev 2017-04-12 18:33:23 +00:00
Mady Mellor
8f395a16fb Merge "Don't offer snooze for foreground service notifications" into oc-dev 2017-04-12 18:27:29 +00:00