Commit Graph

10749 Commits

Author SHA1 Message Date
Evan Rosky
0d654cb29c Implement UX for IME with freeform windows
UX desires for this are: when IME appears for a freeform window,
1. Temporarily push the freeform window up to make room for IME
1a. However, do not push the top of the window off the screen
2. Any part of the window left under the IME becomes inset and
   thus handled by adjustPan or adjustResize.
3. Return the window to its original position when IME closes.
3a. Unless the window is moved while IME is up.
4. If the window is moved around while IME is up, do not change
   the content (ie. don't adjust insets).

This CL includes some fixes to related bugs as well:
- During adjustPan, the caption is now "unscrolled" so that
  it remains at the top of the window. Previously, the caption
  would be scrolled out of the window along with the content.
  This is done via setTranslation so it won't trigger relayout.
- The starting bounds of task-drag uses the task bounds instead
  of dim bounds. Dim bounds was based on the visible frame
  which excludes the IME inset; so, it was causing the window
  to be resized if the user tried to drag the window while IME
  was open. Going through the history, this was done to resolve
  some issue with resizing dialog activities. I've verified
  that behavior in this case is the same before and after this
  CL.

Bug: 119375946
Test: Manual since UX: open desktop display, open apps that
      use IME (both adjustPan and adjustResize).
      Also, atest WindowFrameTests
Change-Id: Id81d0b0a5f82be28fabed3ad22e713fc4fa7536d
2019-03-01 16:03:04 -08:00
TreeHugger Robot
ae912825bc Merge "Add a whitelist to control packages that can use Bugreporting API" 2019-03-01 19:36:23 +00:00
Nikita Ioffe
07964b49ac Add a whitelist to control packages that can use Bugreporting API
Test: checked SecurityException is thrown for my custom app
Test: whiltelisted my custom app, checked no SecurityException is thrown
Bug: 126541701
Change-Id: Id0b61ccc1adf40bcb455d3b59b640f4b160bdd84
2019-03-01 16:26:03 +00:00
TreeHugger Robot
47c4d9d688 Merge "Add thread atom that contains sum of filtered thread CPU usage" 2019-03-01 13:33:53 +00:00
Andrei-Valentin Onea
b9fadbfc94 Merge "Add statslog logging for hidden api usage" 2019-03-01 11:47:15 +00:00
Jeff Sharkey
cb4dd2791a Merge "Translate selection arguments that are paths." 2019-03-01 06:28:24 +00:00
Jeff Sharkey
bffd25082c Translate selection arguments that are paths.
Also migrate MediaProvider logging to more general-purpose location
on the ContentProvider.Transport, where we can log exact input/output
values to aid debugging.

Bug: 124347872
Test: manual
Change-Id: I6aba60879ded4e0892d2d1cdd717c23cebaaabd8
2019-02-28 16:39:30 -07:00
Beth Thibodeau
eab4ddeb15 Add flag to control compact seekbar visibility.
Test: `adb shell device_config put systemui compact_media_notification_seekbar_enabled true`
and observed that seekbar appeared on the next layout, or disappeared if set
back to false.
Bug: 123698590

Change-Id: I0f2469aa17e66fb0d5bedce93582fc45812a0c30
2019-02-28 15:08:11 -05:00
Andrei-Valentin Onea
5ac2de02f6 Merge "Add @UnsupportedAppUsage annotations" 2019-02-28 16:44:23 +00:00
Misha Wagner
e51e5204a8 Add thread atom that contains sum of filtered thread CPU usage
This will help us to calculate the total CPU usage of a process, even
with aggressive filtering of threads with low CPU usage..

Test: atest KernelCpuThreadReaderTest#testReader_otherThreads
Bug: 126511586
Change-Id: I9100a9ecda97f53b819ab57da710e10cccef4311
2019-02-28 14:35:31 +00:00
Gustav Sennton
5a9da78042 Merge "Move SSIN sys ui flags from Settings.Global to DeviceConfig." 2019-02-27 22:12:35 +00:00
Gustav Sennton
c81eb67413 Merge "Move NotificationAssistant flags into SystemUi namespace." 2019-02-27 19:09:33 +00:00
Gustav Sennton
8fa7e952a0 Move SSIN sys ui flags from Settings.Global to DeviceConfig.
Migrate SmartReplyConstants flags to use the new DeviceConfig setup in
Android Q.

Bug: 123630933
Test: atest SystemUITests
Test: 'adb shell device_config put systemui ssin_max_num_actions X' for
different values of X, and ensure the corresponding max # actions are
shown in notifications.
Change-Id: I386fec12effa0153c03a328c138a0dac38bcc317
2019-02-27 18:57:41 +00:00
Gustav Sennton
ddd78b2d4f Move NotificationAssistant flags into SystemUi namespace.
Create SystemUi DeviceConfig namespace and add a class to store all its
flags in. These flags will be shared between the SystemUi package and
other Notification packages - like ExtServices and
NotificationManagerService.

Performing experiments across different packages is much more involved
than performed single-package experiments. Therefore, we put flags
related to Notifications into the System UI experiment flag package.

Bug: 120792826
Test: atest AssistantSettingsTest
Change-Id: I83992291e660ab092bed8d22d1abaaa2bd9d6f9a
2019-02-27 16:51:47 +00:00
Andrei Onea
fa152f9517 Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.app
  com.android.internal.appwidget
  com.android.internal.location
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony
  com.android.internal.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I6eba34467b2492047e5264684312adfa029eb317
2019-02-27 16:42:54 +00:00
Andrei Onea
e8e150dbff Add statslog logging for hidden api usage
Statslog logging is done alongside the old logging, with different
sampling rates.

Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t \
        android.cts.statsd.atom.UidAtomTests#testHiddenApiUsed
Bug: 119217680
Change-Id: If7c38eaee3a3c08434c2e4f2dac45c659ea9cb12
2019-02-27 16:16:44 +00:00
Issei Suzuki
f2d13673f4 Merge "Move AmbientDisplayConfiguration class out of internal package." 2019-02-27 14:28:36 +00:00
Olivier Gaillard
510945d8cb Merge "Use statsd name in comments." 2019-02-27 13:07:36 +00:00
Olivier Gaillard
865269000b Use statsd name in comments.
Test: atest statsd_test
Change-Id: Id71ee00c02860f5ee8db383b7d9d5bbf879f0dba
2019-02-27 10:39:22 +00:00
Issei Suzuki
ca19e6e3ef Move AmbientDisplayConfiguration class out of internal package.
Test: m droid (run full build), atest SystemUITests
Bug: 126327497
Change-Id: Ife8303924bd02e9639008293bf9028f4871a9b16
2019-02-27 10:34:17 +01:00
Rich Cannings
383223ab18 Merge "Refactor passwords/pins/patterns to byte[]" 2019-02-27 03:21:57 +00:00
Christian Wailes
bda1b8f60f Merge changes Ib8f3b5b0,I66b01930,I560cdf9c
* changes:
  Teaches the System Server to enable the Zygote's blastula pool.
  Added pool management code around zygote state changes.
  Improved file descriptor cleanup in Zygote.
2019-02-26 18:21:49 +00:00
Sudheer Shanka
47d759f2c4 Merge "Look for visible vols for a user under /mnt/user/<userId>/package/." 2019-02-26 16:18:15 +00:00
Lucas Dupin
be1fd400a8 Merge "Ignore wake-up sensor right after sleeping" 2019-02-26 06:31:32 +00:00
Lucas Dupin
8a13aa7b7b Ignore wake-up sensor right after sleeping
Otherwise the phone might not turn off if the sensor false-triggers

Test: manual
Test: atest DozeSensorsTest
Change-Id: If1be8158c5b342e9d892dd55f1a7db156bbf1a17
2019-02-25 19:38:57 -08:00
Kiyoung Kim
92011a08e4 Merge "Schematize Crypto state system property" 2019-02-26 01:44:28 +00:00
TreeHugger Robot
5daa6d5c67 Merge "Added a DeviceConfig property for Content Capture idle timeout to unbind from system server." 2019-02-25 21:10:50 +00:00
TreeHugger Robot
3d61f89275 Merge "Address API council feedback" 2019-02-25 19:21:52 +00:00
Felipe Leme
e764fa2892 Added a DeviceConfig property for Content Capture idle timeout to unbind from system server.
Test: manual verification
Bug: 111276913

Change-Id: I3c8f0ffc5fbadfc033ef6574cab7e0ec1419b38e
2019-02-25 09:42:14 -08:00
Sudheer Shanka
e51005da04 Look for visible vols for a user under /mnt/user/<userId>/package/.
Currently, we pass down visisble volumes for a user to zygote so that
it can set up appropriate bind mounts after forking. This method has
atleast a couple of race conditions, so instead make zygote just
look under /mnt/user/<userId>/package for volumes that need to be
handled for a particular user.

Bug: 126069494
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Iab47eb34d38a25dfda4a686db9b7203ad4885a93
2019-02-24 10:24:09 -08:00
TreeHugger Robot
05675bc0cf Merge "Made AbstractRemoteService.getRemoteRequestMillis() optional." 2019-02-23 03:25:46 +00:00
Chris Wailes
db132a3e1f Teaches the System Server to enable the Zygote's blastula pool.
This patch adds the code necessary to communicate changes to the
blastula_pool_enabled system property from the  System Server to the
zygote process.  Checking this property asynchronously from both the
system server and the zygote can lead to a deadlock, so instead the
system server checks the property and notifies the zygote.

By default the blastula pool is disabled.

Test: adb shell device_config put runtime_native blastula_pool_enabled true
Test: adb shell device_config put runtime_native blastula_pool_enabled false
Change-Id: Ib8f3b5b0eb78349255b9b316d683a69747616ef7
2019-02-22 18:54:28 -08:00
Chris Wailes
01060e66f6 Added pool management code around zygote state changes.
The hidden api access log sample rate and api blacklist exemption
commands change the state of the zygote and processes spawned from the
zygote.  This means that blastulas spawned before the changes won't have
the proper state.  To fix this we now empty the process pool, apply the
changes, and then refill the pool.

Test: Build and boot
Test: Treehugger
Change-Id: I66b01930a160c1305fbeb8b6243deff7917aa598
2019-02-22 18:50:56 -08:00
Chris Wailes
ae93714d05 Improved file descriptor cleanup in Zygote.
Enabling the blastula pool exercised a previously unused codepath that
wrote to the log.  This caused a socket to be opened when it wasn't
expected to be.  This patch re-closes the logging socket before applying
the SELinux policy for the new application.

This patch also adds code to clean up blastula table entries in
processes spawned from the Zygote and disables the blastula pool code
for child zygotes.

Bug: 123409530
Test: make & flash & boot & check logs for SELinux denials
Change-Id: I560cdf9c42502574d25ab25a0f8afa3eb6de307f
2019-02-22 18:50:56 -08:00
John Reck
e57475e6c9 Address API council feedback
Bug: 125027187
Bug: 125026102
Bug: 125026678
Bug: 125026234
Bug: 125027586
Bug: 125026476
Bug: 125026103
Bug: 125026237
Bug: 125027248
Bug: 125026475
Bug: 125027487
Test: RenderNodeTests
Change-Id: Ic63ea7a3cfe359a7dff0c1b46e534e499f7e928b
2019-02-22 14:24:28 -08:00
Susi Kharraz-Post
b5de2782de Merge "Add logging for profile switching for sharesheet" 2019-02-22 18:00:34 +00:00
Susi Kharraz-Post
0446fab756 Add logging for profile switching for sharesheet
We want to know which profile people share from and if users are
switching from work to personal profile when sharing and vice versa.
This adds the current profile to the sharesheet and also logs when the
profile is switched.

Bug: 124503277
Test: Added new unit tests for ChooserActivity and IntentForwardActivity
Change-Id: Ideb83682bf3395258ff457988f4a3e9f519a844c
2019-02-22 08:47:16 -05:00
Kiyoung Kim
0de21d7e81 Schematize Crypto state system property
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: Id36208fac5d4de062a51d541b64145560242f8fc
2019-02-22 13:54:45 +09:00
Felipe Leme
81299d0d96 Made AbstractRemoteService.getRemoteRequestMillis() optional.
Also split some logic from PendingRequest into BasePendingRequest, so they're
not leaked into the async requests.

Test: atest CtsContentCaptureServiceTestCases CtsAutoFillServiceTestCases
Bug: 117779333
Change-Id: Ife9a3ab3a817944408caf9eae69dd75f48ab90c6
2019-02-21 16:11:26 -08:00
Rich Cannings
f64ec63a02 Refactor passwords/pins/patterns to byte[]
Relating to frameworks/base

Bug: 120484642
Test: manual - test setting and unlocking passwords/pins/patterns.
      automated - about 20 failing due to an issue in the test code.

Change-Id: I57aa530ca2db1a026c56b66f5b4c91172f2667f6
2019-02-21 14:39:05 -08:00
Olivier Gaillard
51f669e8bf Increase binder/looper sampling.
It will reduce the resource usage of binder/looper instrumentation.

Test: atest BinderCallsStatsTest LooperStatsTest
Change-Id: Ide843ae3e4d30a58f547df1cd338ffb5531e9426
2019-02-21 16:06:39 +00:00
TreeHugger Robot
3ffadce8b9 Merge "Optimized Content Capture workflow by caching some state at the application level." 2019-02-21 05:34:34 +00:00
Jeff Sharkey
f862750207 Merge "Flesh out CR.getTypeDrawable() with more details." 2019-02-21 04:39:53 +00:00
Felipe Leme
326f15a392 Optimized Content Capture workflow by caching some state at the application level.
Content Capture for an activity and/or package is only available when the Content Capture service
explicitly whitelists it. As the whitelist is kept at system-server level, it's better to fetch that
info when the application is started and cache it locally, so we can optimize the
ContentCaptureManager APIs to return quickly when it's disabled.

This CL also caches other values such as the buffer parameters.

Test: atest CtsContentCaptureServiceTestCases

Bug: 120494182
Bug: 121202151

Change-Id: I9d5211bca496ffa85ba9efc2a7bb32411834b787
2019-02-20 18:44:05 -08:00
Christian Wailes
a2f67c96cc Merge "Updated Zygote IPC related comments." am: f8881b6821 am: c850654edc
am: 49574608ae

Change-Id: Ie14f3a5377599f3542dedc0a42a87ca3a41ca9ba
2019-02-20 16:56:15 -08:00
Christian Wailes
49574608ae Merge "Updated Zygote IPC related comments." am: f8881b6821
am: c850654edc

Change-Id: I15a33cdf792727f58b3d89d86ccf454536737868
2019-02-20 16:12:40 -08:00
Makoto Onuki
3d44f6379c Merge "Fix boost charging, also expose test API" 2019-02-20 22:06:05 +00:00
Lucas Dupin
b53be1d28c Merge "Improve the performance when loading image wallpaper colors" into pi-dev
am: 98684aa82a

Change-Id: I4ff2e38dc3f40ccf6289ffbee69eed23c96fa4dc
2019-02-20 12:43:52 -08:00
Chris Wailes
b13bfc5682 Updated Zygote IPC related comments.
Bug: 124637285
Test: None; comment only changes
Change-Id: Ie567715a1ee08cdf65e3135aa75e3bd95ef5ab0d
2019-02-20 11:19:54 -08:00
Jeff Sharkey
806bece3be Flesh out CR.getTypeDrawable() with more details.
Providing icons for MIME types is generally useful, but we also
need to provide a label and content description.  This interface
can be extended internally to surface details about special MIME
types, such as "image/vnd.google.panorama360+jpg".

Bug: 122887179, 120791890
Test: atest android.content.cts.ContentResolverTest
Change-Id: Ibe655896315b9a9662dfdace3ee8ffacf1302eb8
2019-02-20 18:26:16 +00:00