Commit Graph

93488 Commits

Author SHA1 Message Date
TreeHugger Robot
40c5864445 Merge "[DO NOT MERGE] Guard against launching permission backup/restore twice per request" into qt-dev 2019-06-29 02:56:35 +00:00
Eugene Susla
8c2fb0ea1e [DO NOT MERGE] Guard against launching permission backup/restore twice per request
It looks like there is some case where AbstractRemoteService would #run the
same PendingRequest the second time which violates AsyncTask assumption.

Fixes: 135986503
Test: atest android.permission.cts.PermissionControllerTest
Change-Id: I2d072714ee0fad3c365ff7eb191d690056c0931a
2019-06-29 00:20:09 +00:00
TreeHugger Robot
6da414a8f6 Merge "Camera: Clarify manual capture behavior for logical camera" into qt-dev 2019-06-28 23:54:09 +00:00
TreeHugger Robot
f4535c8d51 Merge "Restore some greylist entries." into qt-dev 2019-06-28 20:01:13 +00:00
Andrew Sapperstein
9dd0c5628b Merge "Allow granting URI permissions to com.android.settings.module_licenses." into qt-dev 2019-06-28 16:56:04 +00:00
Jorim Jaggi
ea3216d462 Merge "GestureNav: Limit exclusion rects" into qt-dev 2019-06-28 13:48:37 +00:00
TreeHugger Robot
f76bdce6e0 Merge "Restore some greylist entries." into qt-dev 2019-06-28 12:02:43 +00:00
Adrian Roos
506267d5f4 GestureNav: Limit exclusion rects
Add limits for system gesture exclusion on the left and right edges.
This prevents non-immersive-sticky apps from totally disabling the
back gesture.

Bug: 135522625
Test: atest SystemGestureExclusionRectsTest

Merged-In: Ib26161663a6aababe803d3c70044f4017bdbe675
Change-Id: Ib26161663a6aababe803d3c70044f4017bdbe675
2019-06-28 17:59:06 +08:00
Mathew Inwood
a5531fa161 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: Ie3dd15c8e17d530d853473a013717e6175383080
2019-06-28 09:23:06 +00:00
Mathew Inwood
3a75f264a8 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
2019-06-28 10:15:37 +01:00
David Nelloms
22a5e4e5d9 Merge "Notify on task display change." into qt-dev 2019-06-28 00:12:49 +00:00
TreeHugger Robot
bde371beb6 Merge "Add link to AndroidX Role library in RoleManager documentation." into qt-dev 2019-06-27 23:28:54 +00:00
davidln
a06b4b2fa5 Notify on task display change.
This is a targeted fix for not receiving a task stack change callback
when a task with a resumed Activity is reparented to another display.

Bug: 128932906

Test: manual - launch activity from virtual display onto default display
  in a new task, verify callback notified. atest WmTests
Change-Id: Idabad8379cded664bcf302d5c6fb69564d158eb7
Merged-In: Idabad8379cded664bcf302d5c6fb69564d158eb7
2019-06-27 18:54:00 +00:00
Shuzhen Wang
da189bddc2 Camera: Clarify manual capture behavior for logical camera
Test: Build and read docs
Bug: 136098496
Change-Id: I4a2e9ac66ef79379b9c50932ddc845f56d7d01b4
2019-06-27 10:29:38 -07:00
Tim Joines
6c3bbf9e93 Merge "Disable USAP by default on devices" into qt-dev 2019-06-27 16:01:43 +00:00
Hai Zhang
bae001170b Add link to AndroidX Role library in RoleManager documentation.
Fixes: 136119951
Test: presubmit
Change-Id: Iab4c8617983555b04d7c49b7f9583cf2132d57c8
2019-06-27 00:14:44 +00:00
TreeHugger Robot
65f73d6bb8 Merge "Fix Layout.primaryIsTrailingPreviousAllLineOffsets" into qt-dev 2019-06-26 11:40:03 +00:00
Mihai Popa
7ad499d007 Fix Layout.primaryIsTrailingPreviousAllLineOffsets
The CL fixes a crash in Layout.primaryIsTrailingPreviousAllLineOffsets.
The crash was happening when the method was called for a line beginning
with an empty bidi run. This could happen, for example, for empty text -
I was unable to find any other case. The CL improves the existing test
for the method with this case, which was previously crashing.

The CL also fixes a potential crash in getLineHorizontals. However, this
bug could never happen as in the current code path clamped is always
false (and kept as parameter for parity with getHorizontal).

Bug: 135444178
Test: atest FrameworksCoreTests:android.text.LayoutTest\#testPrimaryIsTrailingPrevious
Change-Id: I47157abe1d74675884734e3810628a566e40c1b4
2019-06-25 23:09:02 +00:00
Winson Chung
cff24b878d Merge "Catch all exceptions in onFrameDraw" into qt-dev 2019-06-25 22:07:44 +00:00
Yin-Chia Yeh
0e1eecd080 Merge "Camera: block session init callback until ctor returns" into qt-dev 2019-06-25 16:26:54 +00:00
Tim Joines
341817e169 Disable USAP by default on devices
Test: manual, usap process missing on boot
Bug: 136003445
Change-Id: I991b24d2a386c0969bc27f9aecd6b8748b80085a
2019-06-25 09:21:45 -07:00
Jorim Jaggi
b0bb2f778f Catch all exceptions in onFrameDraw
... as throwing an exception in there somehow will mess up the
hwui task queue.

Test: Have a crashy app, swipe up while the app is crashing
Fixes: 134583193
Change-Id: Ie3ba5f991759f807b154f55f9fc816e7efe2fdfe
2019-06-25 15:37:53 +02:00
Andrew Sapperstein
93f5ed6c18 Allow granting URI permissions to com.android.settings.module_licenses.
Exempts this new ContentProvider for providing mainline module licenses.

Also sets ApplicationInfo.publicSourceDir for APEXes.

Bug: 135183006
Test: open module licenses, click app, verify file opens
Change-Id: Iec4f1de198525f7cd176a52d8448a2c71b6aabc0
2019-06-24 18:24:52 -07:00
TreeHugger Robot
2618371aa5 Merge "Make RescueParty call vold directly" into qt-dev 2019-06-24 21:39:40 +00:00
Daniel Rosenberg
d078d8b15c Make RescueParty call vold directly
This changes RescueParty to call vold over binder directly for
Checkpointing related calls. It turns out that if the system is in a bad
enough state, the other method would not work, as some of the services
required would not be running.

Bug: 135558798
Test: setprop persist.sys.enable_rescue 1
      setprop debug.crash_system 1 or setprop debug.crash_sysui 1
      vdc checkpoint startCheckpoint 3
      stop
      start
      Device should go through the rescueparty flow, and reboot.
      Repeat without checkpoint. Device should prompt reboot.

Change-Id: I8b11d68075cc291e9557d524bc87b54d17b370e4
2019-06-24 13:23:27 -07:00
Yin-Chia Yeh
8b9b9f065c Camera: block session init callback until ctor returns
To fix race condition where session init callback is executed
before the ctor finished (and mSessionImpl is initialized)

Test: manuall testing GCA
Bug: 134218348
Change-Id: I6985b489a8cb459d9b1dce4d56a9c3e97ceb366c
2019-06-24 11:32:34 -07:00
Ioannis Ilkos
9af8d15783 Merge "Add anon RSS + swap metric" into qt-dev 2019-06-24 08:46:40 +00:00
TreeHugger Robot
6397ab05f9 Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev 2019-06-22 00:04:19 +00:00
Antoan Angelov
ab34f61c3b Merge "Update docs for EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS." into qt-dev 2019-06-21 18:07:22 +00:00
Ioannis Ilkos
466ad6c3e0 Add anon RSS + swap metric
We are planning to use this metric to detect leaks.

This CL also decouples the actual memory sampling from AM. This means:
- Less time locking the pid list (we used to lock and then read proc)
- Less serialization / deserialization for the parcel
- Simpler to evolve (e.g. removed the HWM-specific method in AM)

Change-Id: I87a7243156dd8c88cfa85038e7e6cf4963e271e1
Test: manual, MemoryStatUtilTest, UidAtomTests
Bug: b/135418017
2019-06-21 11:10:19 +01:00
arangelov
bb2a802a23 Update docs for EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS.
Bug: Fixes: 134391678
Test: manual
Change-Id: I993af4f4a741283294b1754dfc0adc7c6f6f849e
2019-06-20 16:31:10 +01:00
Junyu Lai
544e00d382 Merge "Move the test of minimum supported keepalive slots to CTS" into qt-dev 2019-06-20 05:35:07 +00:00
Junyu Lai
fbe58171d6 Merge "Correct value of supported keepalive count for cellular" into qt-dev 2019-06-20 05:35:07 +00:00
TreeHugger Robot
41d0b1abc8 Merge "Expose BIND_NOT_PERCEPTIBLE service flag" into qt-dev 2019-06-20 05:34:34 +00:00
Junyu Lai
a248130fc9 Correct value of supported keepalive count for cellular
Cellular only supports 1 keepalive connection so correct the default
supported value to 1.

Bug: 134037217
Bug: 134352656
Test: - atest FrameworksNetTests
      - atest android.net.cts.ConnectivityManagerTest \
        #testSocketKeepaliveLimitTelephony

Merged-In: Ia3761f2e78d54866bb2e156d58004396bbc8adc3
Change-Id: If833b813ba00eeff913160598f1ea9c74e6e35d8
(cherry picked from commit 680abbb591)
2019-06-20 04:02:38 +00:00
Junyu Lai
70c06b5e52 Move the test of minimum supported keepalive slots to CTS
This change also enables log when keepalive is started.

Bug: 134352656
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
      2. atest FrameworksNetTests
Merged-In: I408750fa0bceb0c1c26afb5fead4e44fb824fbc1
Change-Id: Ib9b06d3458782a648a2f5b8fd5a9ca1d34bd11f9
(cherry picked from commit aed835f086)
2019-06-20 02:26:58 +00:00
Makoto Onuki
71acb72cbd Merge "Optionally trigger CG in onTrimMemory()" into qt-dev 2019-06-19 23:24:04 +00:00
Amith Yamasani
5016a7891a Expose BIND_NOT_PERCEPTIBLE service flag
Using this flag when binding to a service will
allow the bound process to be held at a low
oom_adj of 250, so that it can be expunged to
reclaim memory if a more user-visible app needs
it.

Use for bindings such as job services and other
connections that the caller can easily recover
from and restart if necessary.

Adjust the lmk thresholds to use this oom_adj
as one of the levels, so they're killed before
perceptible apps (such as foreground services).

Bug: 135219821
Test: CtsAppTestCases
      Manually check notification listener oom_adj
      and dumpsys activity services output

Change-Id: I9f6d0891d842e4d12f7995b9b1a8f57b0903a16d
2019-06-19 14:40:57 -07:00
Makoto Onuki
0a9ee1af2c Optionally trigger CG in onTrimMemory()
Set a trim-level threshold to debug.am.run_gc_trim_level to activate it.

Bug: 135148702
Test: Manual test with "setprop debug.am.run_gc_trim_level 0", run a lot of
heavy apps and take pictures, and check logcat for the "force_gc" event log.
Test: Manual test with "setprop debug.am.run_mallopt_trim_level 0", run a lot of
heavy apps and take pictures, and check logcat for a debug log.

Change-Id: I73b4dc7374e85e9a22c98ab17da53aa6cb25a188
2019-06-19 10:01:55 -07:00
Robert Carr
437c0e4c15 ViewRootImpl: Ensure layout when configuration changes.
When the configuration changes between landscape and reverse
landscape, the app will not receive onConfigurationChanged as
orientation is not part of the public portion of the configuration.
However, when the ViewRootImpl receives such a configuration back from
relayout, it will force a layout of the client views
(see updatedConfiguration in performTraversals), this is because
Configuration#equals compares the non public part of the configuration
as well. This CL changes MSG_REPORT_RESIZED to handle the configuration
changing the same way performTraversals does, so that the app consistently
receives a configuration change.

Bug: 134643273
Test: Manual
Change-Id: If016bcd9a5b8d2a7efc5e1ab3c82a88a608caf8b
2019-06-18 16:12:29 -07:00
TreeHugger Robot
029190c1bc Merge "Log usage of addPerson() and setStyle() in notifications." into qt-dev 2019-06-18 17:04:01 +00:00
TreeHugger Robot
b7abebde5b Merge "Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable." into qt-dev 2019-06-18 12:27:15 +00:00
Mihai Popa
9550c185f9 Merge "[Magnifier-87] Fix deadlock causing ANR" into qt-dev 2019-06-18 09:10:17 +00:00
TreeHugger Robot
2ae76cdbe8 Merge "Remove the <= P restriction for WIFI_P2P" into qt-dev 2019-06-18 06:16:30 +00:00
Chalard Jean
449b9c378c Remove the <= P restriction for WIFI_P2P
This is still sent in an intent.

Bug: 131764329
Fixes: 131764329
Merged-In: I56c86b0c1912064d5a642991df32d2cefb6a8d5b
Change-Id: I64b9d632be97dc51e6085162371bb8c19f410258
(cherry picked from commit e546cb0bd16b7359feeb3c46ba52e64cf91ae4d3)
2019-06-18 06:15:58 +00:00
Julia Reynolds
b1f5aafc91 Use connected boolean as NLS does vs IBinder
To determine if the CPS can get/send messages. Apparently
the IBinder can be cached in ActivityManager and onBind() is not
always called when a service is connected the second time.

Test: manual; ensure a service recieves an onsubscribe for an
active rule post requestUnbind/requestRebind
Fixes: 62584038

Change-Id: Iffe37242509f3bf26e609e6b423f3928c00156ad
(cherry picked from commit 265d093cd9)
2019-06-17 17:51:18 +00:00
Mihai Popa
e42215ea70 [Magnifier-87] Fix deadlock causing ANR
Before this CL, the magnifier could deadlock when the following
happened:
1. the renderer is asked to draw (and a frame callback is provided)
2. a #dismiss() happens on the UI thread. This acquires mDestroyLock
(previously line 309)
3. InternalPopupWindow#destroy() is called, and this calls
mRenderer.destroy(). This attempts to destroy the renderer on the UI
thread, however the UI thread will wait until the pending frame callback
corresponding to step 1 is executed on the render thread.
4. The frame callback starts executing on the render thread, and tries
to acquire mDestroyLock (previously line 1093). However, this is held by
the UI thread, so a deadlock happens.

This CL completely removes mDestroyLock, relying on the existing
synchronization between the UI and render threads described in step 3.

Bug: 134584742
Test: manual testing
Change-Id: Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d
2019-06-17 11:59:20 +00:00
lumark
ca442d5d9f Make InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED testable.
Annotates InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED as @TestApi
to let cts can verify if multi-client IME enabled.

Bug: 135217809
Test: build and passes
Change-Id: Id7b4dceb2dbfaf3d7ed1084957dd14b04cad0cdf
2019-06-17 16:09:42 +08:00
TreeHugger Robot
5f3df7f5e0 Merge "DO NOT MERGE: Add DENSITY_450" into qt-dev 2019-06-15 00:26:09 +00:00
TreeHugger Robot
73e04f292a Merge "Mark getProfileOwnerAsUser(int) as UnsupportedAppUsage again" into qt-dev 2019-06-15 00:21:45 +00:00