Commit Graph

10293 Commits

Author SHA1 Message Date
Ahan Wu
de396fa85d Apply cache and preload mechanism to inline image notifications.
Inline image will consume 3x memory due to no cache implementation.
This patch apply cache mechanism to each ExpandableNotificationRow and
preloads images before inflation task.

Bug: 77956056
Test: runtest systemui, observe memory usage by AndroidProfiler
Change-Id: I2c488b1d98ddf2d4670904ed4b3e8028c0d0172e
2018-12-04 11:29:31 +08:00
Adam He
103e62a19f Merge "Added 8th and 9th argument to pooled lambdas" 2018-11-29 19:32:54 +00:00
Jorim Jaggi
9a94afc6ca Merge "A brave new world for window insets (1/n)" 2018-11-29 17:14:15 +00:00
TreeHugger Robot
8ce7d1d992 Merge "Add onActionClicked in NotificationAssistantService" 2018-11-29 15:43:29 +00:00
Jorim Jaggi
f96c90ac6c A brave new world for window insets (1/n)
This CL starts a journey to discover a brave new inset world. The
path to get us there may be rocky, but it's going to be rocky.

One of the main pledges of the new API is that an app can retrieve
what is causing a certain inset easily. For that, we need to
dispatch metadata who is causing what inset, such that we can query
it from the client side.

Furthermore, the client will be able to manipulate insets directly,
but also listen to animation changes. We don't want to go through
window manager for that, thus, there needs to be a local codepath
from (global window state -> WindowInsets).

Because we have these two requirements, we dispatch the relevant
global window state for insets, represented by InsetsState, and
dispatch it to the client. On the client side we take the frame
and the InsetsState and generate WindowInsets out of it.

Bug: 118118435
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest,
InsetsStateControllerTest
Change-Id: I2bfe9dda376512916261823fc2ee35cbedeb6731
2018-11-29 13:37:43 +01:00
Tony Mak
7d4b3a5f19 Add onActionClicked in NotificationAssistantService
This is added to report clicks on actions buttons to NAS.

BUG: 119010281
Test: atest SystemUITests
Test: atest RemoteViewsTest
Test: atest NotificationManagerServiceTest
Test: Manual. Tapped on the action (both normal and contextual) and
      observed the log.

Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
2018-11-29 11:43:53 +00:00
TreeHugger Robot
296f530755 Merge "Add a maxHeight LayoutParams for ResolverDrawerLayout." 2018-11-29 00:06:37 +00:00
Adam He
f1fcd494d2 Added 8th and 9th argument to pooled lambdas
Needed for Autofill Field Classification implementation

Bug: 118681526
Test: atest CtsAutoFillServiceTestCases
Change-Id: I0ecebc391a93928618f349a1fd1af6304ee44006
2018-11-28 14:26:37 -08:00
Jeff Sharkey
c583071b97 Merge changes from topic "exifz"
* changes:
  Track attribute ranges, parse additional times.
  Sane undefined behaviors for XmlUtils.
2018-11-28 16:03:04 +00:00
Misha Wagner
ed3d6070c1 Merge "Change the UID filter in KernelCpuThreadReader to only select UID 1000" 2018-11-28 10:37:04 +00:00
TreeHugger Robot
dbbcf07ec5 Merge "Removes ASEC-related logic from the framework" 2018-11-27 22:32:35 +00:00
Patrick Baumann
fc2851e4d5 Removes ASEC-related logic from the framework
This change removes remaining ASEC-related logic from the framework in
preparation for install refactoring.

Bug: 109941548
Test: install still works
Change-Id: Ic7322038e45c026bcc59800a5a9fafdbb461021f
2018-11-27 12:56:14 -08:00
Jeff Sharkey
9bc99f8e50 Sane undefined behaviors for XmlUtils.
They should treat empty strings as undefined, just like null values.

Bug: 111892141
Test: manual
Change-Id: Ia3eadb1cd1562e73cfa786bfa7fec29994e60a7c
2018-11-27 13:38:58 -07:00
TreeHugger Robot
20dbbf22b8 Merge "Add onSuggestedReplySent in NotificationAssistantService" 2018-11-27 19:51:55 +00:00
TreeHugger Robot
fa2b85579e Merge "New Kernel Per-UID CPU Time Readers" 2018-11-27 19:28:24 +00:00
Tony Mak
2999670406 Add onSuggestedReplySent in NotificationAssistantService
This is added to report clicks on smart reply buttons to NAS.

Also refactored the code a bit by having SmartReplyView to use
SmartReplies and SmartActions object, rather than passing a long list
of arguments.

Test: atest SystemUITests
Test: Manual. Tapped on the reply and observed the log.
BUG: 111437455

Change-Id: I897fb46a304f4f7b80b2a6bc4db0ac39f6dc6e8f
2018-11-27 18:18:21 +00:00
Misha Wagner
e211934104 Change the UID filter in KernelCpuThreadReader to only select UID 1000
This will significantly reduce the amount of data we currently collect
with CpuTimePerThreadFreq

Test: build
Change-Id: I3558536a1bda9fb75d652320612cd7ec9ce3bdd0
2018-11-27 10:37:48 +00:00
Jeff Sharkey
9787a9459d Iterate on storage permissions model.
This change updates the permissions design to use app-ops for
controlling write access, which is only extended to the default app
for a particular collection type.

Bug: 119713234
Test: atest android.appsecurity.cts.PermissionsHostTest
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I40811ff175b3b8410b58ed901948a23a56f8a8c2
2018-11-26 12:00:35 -07:00
Misha Wagner
474e7bece0 Filter threads that have low total CPU usage for CpuTimePerThreadFreq
Test: KernelCpuThreadReader::testReader_filtersLowTotalCpuUsage
Bug: 120016054
Change-Id: If09c8c01e6efffd0d7315613dc7425138528d39c
2018-11-26 16:25:59 +00:00
Marcin Oczeretko
8e90ada67e Merge "LooperStats - add debug entries to output for data validation" 2018-11-23 14:11:40 +00:00
Nicolas Geoffray
850f109ec8 Merge "Start using shared libraries class loader." 2018-11-22 10:24:38 +00:00
Nicolas Geoffray
8d144eb8bd Start using shared libraries class loader.
Change 1/2. Change 2/2 will setup the class loader namespace for
shared libraries.

This change sets up shared libraries class loaders for applications
and for dexopt.

bug: 111174995
Test: DexoptUtilsTest, device boots

Change-Id: Ie9a2b4eaa85cda59951703433f7a2d03bc12095d
2018-11-22 10:06:41 +00:00
Marcin Oczeretko
d32a513541 LooperStats - add debug entries to output for data validation
Test: UT and manually verified that debug entries are included in
adb shell dumpsys looper_stats

Change-Id: Ie2166974cffd18a719aaa06f6e3525eb0337d2a1
2018-11-21 11:51:16 +00:00
Misha Wagner
b96bd1a7d7 Add Pixel 3 time_in_state format parsing to KernelTimeInStateReader
Bug: 119090941
Test: Unit tests in ProcTimeInStateReaderTest

Change-Id: I598672809ccd44e6035ff7baf9f372a6d6cf211a
2018-11-21 10:37:37 +00:00
Misha Wagner
dc797543b8 Add retrieval of thread CPU data for processes owned by specified UIDs
By default, the UIDs collected are all system users, i.e. UIDs in the range
[1000, 2000).

Bug: 119089294
Test: KernelCpuThreadReaderTest#testReader_byUids

Change-Id: I162916f2238aad975b657c9299cb9035718768bb
2018-11-21 10:37:37 +00:00
Ben Lin
058ab3eb1e Add a maxHeight LayoutParams for ResolverDrawerLayout.
This way when laying out the child views, each view can specify that
they don't want to grow past a certain height.

Bug: 73819520
Test: atest com.android.internal.app.ResolverActivityTest#setMaxHeight

Change-Id: Ibff3609746b4b6ec7b4debd8433487c7fc9ce0fa
2018-11-20 10:03:32 -08:00
Eugene Susla
9734fa5330 Merge "Remove exclusive OWNERS for BitUtils" am: 26aff41aa5 am: 60e62c4e20
am: 6b833a4df8

Change-Id: I118be8a8b35a860192aeaebbd7364cd1a3cbf28f
2018-11-19 17:54:04 -08:00
Eugene Susla
6b833a4df8 Merge "Remove exclusive OWNERS for BitUtils" am: 26aff41aa5
am: 60e62c4e20

Change-Id: I5ff9051230f1f24277f8c864ab99a400accd4c3d
2018-11-19 17:44:39 -08:00
Treehugger Robot
26aff41aa5 Merge "Remove exclusive OWNERS for BitUtils" 2018-11-20 01:20:44 +00:00
Eugene Susla
a931f9eec0 Remove exclusive OWNERS for BitUtils
BitUtils is a fairly generic place where all framework engineers should
be able to contribute reusable code.

Test: test after merge in gerrit UI
Change-Id: Ibd00f0618e3e85aab466cedc43605115994cca4f
2018-11-19 14:38:12 -08:00
Misha Wagner
4f8bb6665c Merge "Add frequency bucketing to per-thread CPU usage reading" 2018-11-19 14:45:18 +00:00
Olivier Gaillard
e7ce49d152 Merge "Rename WorkSource methods on Binder and IPCThreadState." 2018-11-19 11:01:23 +00:00
Misha Wagner
0c5edc3647 Add frequency bucketing to per-thread CPU usage reading
This means that instead of returning all frequencies, we return
KernelCpuReader#NUM_BUCKETS frequencies.

Test: Unit tests for bucket creation and usage in KernelCpuThreadReaderTest

Change-Id: Iea0996f642deecae8ce66e5122045a0694fac03b
2018-11-19 10:24:38 +00:00
Peter Collingbourne
31b9aa5d54 Merge "Preserve x18 while preloading SP-HALs in the zygote." am: 23fd045842 am: e03a81cce8
am: ceebc76cb2

Change-Id: Ib2472f7f1d6068f1b232a459a748c441b47e7637
2018-11-15 16:25:47 -08:00
Peter Collingbourne
ceebc76cb2 Merge "Preserve x18 while preloading SP-HALs in the zygote." am: 23fd045842
am: e03a81cce8

Change-Id: I577e0964abbf758234af6f80dcc69a55ee57d736
2018-11-15 16:10:08 -08:00
Peter Collingbourne
23fd045842 Merge "Preserve x18 while preloading SP-HALs in the zygote." 2018-11-15 23:38:36 +00:00
Adam Bookatz
0dee99a7c7 Merge "Statsd atom: Power Use" 2018-11-15 20:20:08 +00:00
Ivan Chiang
9d2ae77ce7 Merge "Extend DocumentsContract search to accept mime types" 2018-11-15 11:07:38 +00:00
Olivier Gaillard
d542b1c3c6 Rename WorkSource methods on Binder and IPCThreadState.
This change only renames methods, there is no behavior changes except
using the new restore methods instead of clear.

Test: unit tests
Change-Id: I35ae966461657e2e2a67e916d752b9ee53381c83
2018-11-15 09:56:37 +00:00
Bookatz
75ee604244 Statsd atom: Power Use
BatteryStats calculates power usage of the device and various components
(such as apps). This information is used, e.g., in the battery panel of
Settings. We now log it to statsd. It can be used for validating how
good the information displayed in Settings is. In the long-term, it is
likely not ideal for off-device calculations, since that can be
hopefully estimated using statsd's raw data.

Three atoms: one for the total power use, one for the power use of each
uid, and one for each non-uid component. Since they will all likely be
pulled together, StatsCompanionService will provide stale data for
BatteryStats pulls called within a second of a previous BatteryStats
pull.

Also in this cl:
Remove StatsLogEventWrapper.writeDouble. Statsd doesn't support actually
writing doubles into its proto reports, so having this function is
misleading (the data will get to statsd and then be completely ignored).
It's less confusing if we don't pretend it does something.

Change-Id: If80bab8ea938afa4632535bb88ff59879fbe8099
Fixes: 119111972
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerUse
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testDeviceCalculatedPowerBlameUid
Test: BatteryStatsHelperTest#testDrainTypesSyncedWithProto
2018-11-14 18:13:58 -08:00
TreeHugger Robot
8b46029dbb Merge "Show IME correctly when top-most display focus changed." 2018-11-15 01:20:45 +00:00
Haoyu Zhang
1e7ef6453a Merge "Set SubtitleView.mAlignment default value to be Alignment.ALIGN_CENTER" 2018-11-15 00:50:16 +00:00
TreeHugger Robot
c1d607e90d Merge "Add ColorDisplayManager" 2018-11-15 00:40:26 +00:00
Haoyu Zhang
8896df9d31 Set SubtitleView.mAlignment default value to be Alignment.ALIGN_CENTER
SubtitleView.mAlignment is null by default. This can cause undefined
behavior if mAlignment is passed to StaticLayout.Builder.setAlignment().
As the previous behavior of StaticLayout with alignment equals to null is
same as ALIGN_CENTER, this change uses ALIGN_CENTER as default value.

Bug: 119221721
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.SwitchTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Iefd069db449a7fe3d68f6f3e5ebcfcbf1e588962
2018-11-14 21:21:47 +00:00
Mike Ma
e45b9b1699 New Kernel Per-UID CPU Time Readers
Kernel per-UID CPU system & user / concurrent active / concurrent
policy / per-frequency time readers that reads the string version
of the per-UID CPU time proc files via the new
KernelCpuProcStringReader.

They are all subclasses of and nested under KernelCpuUidTimeReader,
for a cleaner directory organization.

Bug: 111216804
Test: 4 Unit Tests
Change-Id: I00836c02fff639245c4285b5edaf7b4c94611405
2018-11-14 11:22:33 -08:00
Ivan Chiang
a972d0449a Extend DocumentsContract search to accept mime types
1. Add the key of query arguments and match method
   in DocumentsContract.
2. Implement new querySearchDocuments method in
   DocumentsProvider, ExternalStoragProvider and
   FileSystemProvider.

Bug: 111786939
Test: Manual Test
Change-Id: I04e9f2be971f10ac1e9584a3486c948aaddea0a4
2018-11-14 15:06:35 +08:00
Alison Cichowlas
277ff273a4 Merge "Flag off new Chooser behavior." 2018-11-13 23:53:38 +00:00
Alison Cichowlas
4691ed41a0 Flag off new Chooser behavior.
Bug: 119480958
Test: Manual
Change-Id: Ide635d08c128c48d8ec488f6d2d5b915e21e82f4
2018-11-13 21:34:12 +00:00
lumark
6f13d20b8e Show IME correctly when top-most display focus changed.
In previous design, the IME focus is changed when receiving
window focus change from ViewRootImpl.

For Multi-Display concept, it should be needed to aware the top
display focus changed in different displays but both are already
had the focused window without change case.

Sending REPORT_FOCUS_CHANGE when top display focus changed for
ViewRootImpl, let IMM can re-focus IME window on right display.

Bug: 117491872
Test: atest ActivityManagerMultiDisplayTests
Test: atest FrameworksServicesTests:DisplayContentTests

Change-Id: Ia46738a5da6dbc334bf937b0f6656a57523c28a7
2018-11-13 17:26:55 +08:00
Kevin Chyn
1b9f8dfb36 Add work background/color to BiometricPrompt for managed profiles
Bug: 117347671

Test: Followed steps in b/119296586#comment1
Test: Background/color changes properly when launching BP from
      managed / unmanaged profiles

Change-Id: Ia0368041540b65b41957d2adbcaa75c0739f62f1
2018-11-12 22:39:29 -08:00