Commit Graph

13504 Commits

Author SHA1 Message Date
Jason Monk
b9e5da09b5 Merge "Don't use stable providers for slices" into pi-dev
am: de8e3c227c

Change-Id: I40b6eef84e5d44b1c185f9818953a6dba8dc9adc
2018-05-31 14:46:38 -07:00
Jason Monk
ce1beadc09 Don't use stable providers for slices
Because they aren't what we want.

Test: manual + existing tests
Bug: 80532760
Change-Id: Ib69799a2ef9440d0d67cea02e6b3c61844535755
2018-05-31 14:12:52 -04:00
Amith Yamasani
2b04227379 Merge "Fix for missing location icon" into pi-dev
am: 8c4c359b25

Change-Id: I1e108f56230915e0950712a0fa2cc363e3ffbc9e
2018-05-29 13:22:35 -07:00
Amith Yamasani
a1ce963743 Fix for missing location icon
OpEntry.duration was being used to indicate that the
operation was still running if -1 is returned. A recent
change caused a regression.

Adding a new mRunning field in OpEntry to explicitly
hold the running state, even when partial duration is
updated.

Change-Id: Ib29f4c903f990aaa202e84f964959aedfc24abdb
Fixes: 80242152
Test: atest FrameworksServicesTests:AppOpsActiveWatcherTest
Test: Launch maps and verify the location icon is visible
      in the status bar
2018-05-28 21:20:56 -07:00
Jason Monk
3f3f1ebc17 Merge "Final cleanups to permission slices" into pi-dev
am: 64a33d695d

Change-Id: I3256c8ca665ede11bab55072cddb8598c1d3b51b
2018-05-25 15:26:03 -07:00
TreeHugger Robot
64a33d695d Merge "Final cleanups to permission slices" into pi-dev 2018-05-25 22:10:20 +00:00
Selim Cinek
7712d46760 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev
am: c4e19963f4

Change-Id: I7e5feadc253816852528e06719e136a7cba51c49
2018-05-25 13:21:38 -07:00
Selim Cinek
c4e19963f4 Merge "Fixed the behavior of group conversations when targeting P" into pi-dev 2018-05-25 20:06:52 +00:00
Jason Monk
b14dde0793 Final cleanups to permission slices
- Add icons to the right and shortcut modes
 - Add color
 - Make sure dialogs are secure

Test: manual
Bug: 79960669
Change-Id: I6d251b0ea5bd3c1b3eed32b184e4aae22c52ffb5
2018-05-25 15:42:16 -04:00
Selim Cinek
ce8794fbbc Fixed the behavior of group conversations when targeting P
Fixes an issue where the group conversation heuristic was still
applied even when the app is targeting P. We're now following
the isGroupConversation completely and only do the migration
for apps targeting < P.

Change-Id: I471d58e8a8f5e6270f0dcce8691d08a2bdd1c582
Fixes: 78450835
Test: add messaging notification, observe correct display
2018-05-25 09:16:38 -07:00
Makoto Onuki
d8cf91c5f8 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
am: 621fd20f55

Change-Id: I31ae3e9e11b9defb7e6352830439484d7ec7ac01
2018-05-24 17:54:37 -07:00
Makoto Onuki
621fd20f55 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev 2018-05-24 23:22:09 +00:00
Michael Wachenschwanz
3ba689851c Merge "Revert "Revert "Write UsageEvents Parcel data as a Blob""" into pi-dev
am: 14c61286c4

Change-Id: If4e6d7fbf0d6799ce88ec33b37fb8cef7e290f1e
2018-05-24 14:26:40 -07:00
Lucas Dupin
30f0867ee0 Merge "Revert "WallpaperColors hint computation"" into pi-dev
am: cf2c35dca6

Change-Id: Ibc3760ce650c8d48f261e6486edb51582391b710
2018-05-24 14:03:24 -07:00
Michael Wachenschwanz
14c61286c4 Merge "Revert "Revert "Write UsageEvents Parcel data as a Blob""" into pi-dev 2018-05-24 20:45:34 +00:00
TreeHugger Robot
cf2c35dca6 Merge "Revert "WallpaperColors hint computation"" into pi-dev 2018-05-24 20:00:27 +00:00
Michael Wachenschwanz
2c2424a091 Merge "Revert "Write UsageEvents Parcel data as a Blob"" into pi-dev
am: d55c618340

Change-Id: I88a269fd3bcb9f6cda5c6f95ac7edb84db1239f1
2018-05-24 12:53:33 -07:00
Michael Wachenschwanz
76d03fcd7e Revert "Revert "Write UsageEvents Parcel data as a Blob""
This reverts commit 8520e56998.

Reason for revert: Bug Fixed
Bug:79860717
Bug:80215357

Change-Id: Ibaabe3c6bab72f417b24121a91ec5f953ad18ff7
2018-05-24 17:36:47 +00:00
Lucas Dupin
b5e5053ebc Revert "WallpaperColors hint computation"
This reverts commit c50f47d970.

Fixes: 79465234
Reason for revert: Google still does it using private APIs and apps were relying on this behavior, not good for the ecosystem.

Change-Id: I62e2b4cd1e6e562fcdd89c97e599bcdade83381a
2018-05-24 16:33:14 +00:00
Michael Wachenschwanz
d55c618340 Merge "Revert "Write UsageEvents Parcel data as a Blob"" into pi-dev 2018-05-24 15:54:05 +00:00
Michael Wachenschwanz
8520e56998 Revert "Write UsageEvents Parcel data as a Blob"
This reverts commit f5bae21c5e.

Reason for revert:
Bug: 79860717
Fixes: 80215357

Change-Id: I0768e5ce0a95afe7ff091c0035335437bb33c46c
2018-05-24 15:45:17 +00:00
Julia Reynolds
313c1f04cf Merge "DO NOT MERGE Allow cross user usage event queries" into pi-dev
am: 452936192f

Change-Id: Ied4b55365157a03f9bcc15166b330ceb2e62530c
2018-05-23 17:51:11 -07:00
Michael Wachenschwanz
75957f43bc Merge "Write UsageEvents Parcel data as a Blob" into pi-dev
am: 615f8039af

Change-Id: I7e7f663d3eae14630cc5f2b357ead02c4875d19a
2018-05-23 17:38:41 -07:00
Chalard Jean
04a4425729 Merge "Fix: ConnectivityManager is initialized with a wrong context" into pi-dev
am: ccf93b2792

Change-Id: Ib8815f010883cdb94fcad2cdfb237de39327b20a
2018-05-23 16:44:47 -07:00
Makoto Onuki
d5f25d2cd8 Tweak exemption for sync requests made by FG apps
Exemption given to a sync request made by a foreground app (including
PROCESS_STATE_IMPORTANT_FOREGROUND).
At the schedule time, we promote the sync adapter app for a higher bucket:
- If the device is not dozing (so the sync will start right away)
  promote to ACTIVE for 1 hour.
- If the device is dozing (so the sync *won't* start right away),
promote to WORKING_SET for 4 hours, so it'll get a higher chance to be started once the
device comes out of doze.
- When the sync actually starts, we promote the sync adapter app to ACTIVE for 10 minutes,
so it can schedule and start more syncs without getting throttled, even when the first
operation was canceled and now we're retrying.

Test: atest cts/tests/tests/syncmanager/
Test: Manual test with "requestsync -f" and "am set-standby-bucket", while checking
"dumpsys usagestats"
Test: settings put global app_idle_constants \
  exempted_sync_scheduled_nd_duration=1,exempted_sync_scheduled_d_duration=2,exempted_sync_start_duration=3
  and check "dumpsys usagestats" and make sure the constants are properly updated.
Fixes: 72443754

Change-Id: I233d8e4be85769150830bac798abc04810f4cc7b
2018-05-23 14:50:05 -07:00
TreeHugger Robot
452936192f Merge "DO NOT MERGE Allow cross user usage event queries" into pi-dev 2018-05-23 21:49:56 +00:00
TreeHugger Robot
615f8039af Merge "Write UsageEvents Parcel data as a Blob" into pi-dev 2018-05-23 21:38:48 +00:00
Selim Cinek
1faf5d2fc1 Merge "Hiding the icon of notifications that were replied to" into pi-dev
am: d018bc4346

Change-Id: Ieb2d44f76ee2b3624e1b30c5c0a381e7774e8591
2018-05-23 12:30:24 -07:00
Selim Cinek
3cae282644 Merge "Allowing the notification to be a bit bigger for the remote input history" into pi-dev
am: 9e3d7d6378

Change-Id: I0ded19e5d634ef3c81c68a58b92061b9dfda2c00
2018-05-23 12:25:58 -07:00
Chalard Jean
ccf93b2792 Merge "Fix: ConnectivityManager is initialized with a wrong context" into pi-dev 2018-05-23 17:59:59 +00:00
Julia Reynolds
20e682910d DO NOT MERGE Allow cross user usage event queries
For multipackage requests, caller must be system uid or hold
interact_across_users if not requesting fate for the same user.

For single package requests, caller must be system uid or the
same package and hold interact_across_users if not requesting data
for the current user.

In both cases the caller must have the usagestats permission.

Test: couldn't find automated tests for this file; manual
Bug: 79142791
Change-Id: I8d650f8e875e0e4578cb48c9ba42e821342852a0
2018-05-23 09:51:13 -04:00
TreeHugger Robot
d018bc4346 Merge "Hiding the icon of notifications that were replied to" into pi-dev 2018-05-23 05:51:30 +00:00
TreeHugger Robot
9e3d7d6378 Merge "Allowing the notification to be a bit bigger for the remote input history" into pi-dev 2018-05-23 05:43:16 +00:00
Selim Cinek
b0dc61b503 Hiding the icon of notifications that were replied to
Because those notifications now stay around but the user
has already seen them, were hiding the icon instead.

Change-Id: I6b8590e31295ed79218698b1ac54df33b273d38c
Fixes: 78486801
Test: add notification, reply, observe icon gone
2018-05-22 19:48:37 -07:00
Selim Cinek
bee4e074bb Allowing the notification to be a bit bigger for the remote input history
This also fixed the squishing when heads-upped by only allowing
one remote input text to be visible when heads upped.

Change-Id: I0c77931233b452420dee4dcf4772092d96d214c9
Fixes: 78877946
Test: add inbox style with 6 entries, reply a few times, observe no squishing
2018-05-22 19:00:35 -07:00
David Chen
09889edcfb Merge "Marks deprecated StatsManager APIs." into pi-dev
am: 4245b12ef9

Change-Id: I665660fa8ccf68d80c1ba315772b52d38d2bc87d
2018-05-22 10:41:51 -07:00
TreeHugger Robot
4245b12ef9 Merge "Marks deprecated StatsManager APIs." into pi-dev 2018-05-22 17:20:34 +00:00
Steven Wu
b37470ff6d Merge "Do not throw IllegalArgumentException in slice manager." into pi-dev
am: 1a31586918

Change-Id: If200a6f4ca5556c367fb427b93e580d3bb2a39a6
2018-05-22 08:27:58 -07:00
Steven Wu
a14c6b9cad Do not throw IllegalArgumentException in slice manager.
Test: manual
Bug: 80087497
Change-Id: Ic05c812f41d0153c8745b08718513d4e095ab27b
2018-05-22 09:08:22 -04:00
Richard Uhler
ce72108f43 Merge "Reduce LoadedApkAssets LRU cache size." into pi-dev
am: 31ec39297c

Change-Id: I7a8163ca451f1d930746233dfb2b6add18dc5bb3
2018-05-22 04:18:05 -07:00
TreeHugger Robot
31ec39297c Merge "Reduce LoadedApkAssets LRU cache size." into pi-dev 2018-05-22 11:09:18 +00:00
Richard Uhler
7bd7a369e4 Reduce LoadedApkAssets LRU cache size.
The cached apk assets can take up multiple megabytes of .apk mmap and
native memory for associated data structures. Reduce the cache size
for potential multi-megabyte memory savings with hopefully no
noticeable performance impacts.

In particular, rough estimates of the memory and performance impacts
of this change were evaluated by starting the launcher app,
sampling system server PSS with dumpsys meminfo and cache stats using
dumpsys activity for a few different cache sizes:

LRU Size   1: cached apks: total= 1 created=0 evicted=33 hit= 0 miss=34 max=1    TOTAL PSS=187542
LRU Size   3: cached apks: total= 3 created=0 evicted=12 hit=19 miss=15 max=3    TOTAL PSS=190606
LRU Size  15: cached apks: total=15 created=0 evicted= 0 hit=19 miss=15 max=15   TOTAL PSS=199350
LRU Size 100: cached apks: total=15 created=0 evicted= 0 hit=19 miss=15 max=100  TOTAL PSS=201416

Comparing cache stats after launching the settings app:

LRU Size   3: cached apks: total=3 created=0 evicted=5 hit=14 miss=8 max=3
LRU Size  15: cached apks: total=6 created=0 evicted=0 hit=18 miss=6 max=15

Running performance tests locally to ensure no clear regression in app
startup:

app-startup/benchmark-app-hermetic/cold-dropcache-test:
LRU                15        3        3
activityStart:    40.47    38.53    39.27
bindApplication:  24.40    24.53    24.93
draw:              4.27     4.33     4.07
layout:            0.73     1.07     0.73
onCreate:          9.40     9.00     8.53
totalLaunchTime: 183.13   183.27   187.07

app-startup/hermetic-apps/cold-dropcache-test:

LRU                   15       15          3         3
Calculator_avg:      333.9    333.1      343.3      334.6
Calculator_max:      345.0    360.0      370.0      363.0
Calculator_median:   333.5    331.5      343.5      333.5
Calculator_min:      320.0    317.0      320.0      311.0
Calculator_std_dev:    6.62    13.26      18.22      16.51
Clock_avg:           510.0    511.2      509.2      512.6
Clock_max:           529.0    528.0      530.0      529.0
Clock_median:        510.5    509.0      503.5      512.0
Clock_min:           498.0    495.0      487.0      492.0
Clock_std_dev:         7.70    11.71      15.25      11.07
Contacts_avg:        457.7    527.3      507.3      543.9
Contacts_max:        602.0    622.0      591.0      588.0
Contacts_median:     410.5    568.5      568.0      580.0
Contacts_min:        390.0    374.0      366.0      394.0
Contacts_std_dev:     85.64    96.80      88.80      72.97
Phone_avg:          6073.1    6109.7    6110.8     6115.8
Phone_max:          6196.0    6208.0    6180.0     6222.0
Phone_median:       6070.0    6117.5    6100.0     6133.5
Phone_min:          5982.0    5990.0    6061.0     5994.0
Phone_std_dev:        61.49     67.35     34.55      60.17
Settings_avg:        457.9     446.6     451.6      428.7
Settings_max:        487.0     468.0     494.0      449.0
Settings_median:     460.0     450.0     444.5      424.0
Settings_min:        423.0     421.0     431.0      420.0
Settings_std_dev:     21.21     12.02     20.46       9.71

Bug: 79115008
Test: Device boots.
Test: dumpsys activity all shows ResourcesManager max cache size of 3.

Change-Id: I7225b6978fac6197c27bec23d2b477fb1f5aee43
2018-05-22 10:52:40 +01:00
Michael Wachenschwanz
f5bae21c5e Write UsageEvents Parcel data as a Blob
If too many events are queried from UsageStats, the Parcel will be too
big for a transaction. If the data is written as a Blob, the Parcel will
store too large data in ashmem.

Test: atest android.app.usage.cts.UsageStatsTest
Test: manual (create 1MB in UsageEvents and queryEvents)
Bug: 79860717
Change-Id: Ieb4bd486c83a9cc11fdff55e8fa457a9bdca7395
2018-05-21 21:16:18 -07:00
David Chen
f94b4936b4 Marks deprecated StatsManager APIs.
Marking some API's as deprecated, so users avoid getting confused.

Test: Test that build works.
Bug: 80099023
Change-Id: I4b3d4e4fa1ee3d706e49b8180aa4d0ad0e7d6eeb
2018-05-21 17:40:56 -07:00
Svet Ganov
13a27a82a2 Merge "Allow UiAutomation being used off the main thread" into pi-dev
am: c81ed627ab

Change-Id: I7fe9c3d9eb3f291698501ef23fdd449f41d0e3d1
2018-05-21 13:20:56 -07:00
TreeHugger Robot
c81ed627ab Merge "Allow UiAutomation being used off the main thread" into pi-dev 2018-05-21 20:03:10 +00:00
Svet Ganov
452dbebd0e Allow UiAutomation being used off the main thread
Test: cts-tradefed run cts -m CtsUiAutomationTestCases
      cts-tradefed run cts -m CtsAccessibilityServiceTestCases
      cts-tradefed run cts-instant -m CtsAccessibilityServiceTestCases

bug:80024164

Change-Id: I72c565d28f4cbcf6775535fb846b268b785a6b34
2018-05-21 09:55:32 -07:00
Jorim Jaggi
7b7d830f5a Merge "Schedule trimMemory after drawing the frame" into pi-dev
am: 6b8014f5c8

Change-Id: I72c7feccb531f2a19aa2b19ea860802e0d779578
2018-05-18 11:57:44 -07:00
Jorim Jaggi
6b8014f5c8 Merge "Schedule trimMemory after drawing the frame" into pi-dev 2018-05-18 18:26:03 +00:00
Selim Cinek
8cfe436bb1 Merge "Keep notification when sending smart reply." into pi-dev
am: f75019b810

Change-Id: Idb981e0977880c6bf47267b4ecef793adad3e6d3
2018-05-18 09:32:18 -07:00