Commit Graph

11387 Commits

Author SHA1 Message Date
Makoto Onuki
3c36699987 Merge "Avoid creating multiple death recipients for same observer" into qt-dev
am: a478c5f9aa

Change-Id: Id856368d4da90c4efb660ee4598b7d2ae4a75dc7
2019-06-05 09:08:36 -07:00
Makoto Onuki
a478c5f9aa Merge "Avoid creating multiple death recipients for same observer" into qt-dev 2019-06-05 15:54:05 +00:00
Lucas Dupin
7bfbb7e0a7 Merge "Fix flaky test" into qt-r1-dev 2019-06-05 15:37:29 +00:00
Matt Pietal
5e0e38c7f4 Merge "Sharesheet - Adjust button bar insets" into qt-dev
am: 83375a391c

Change-Id: I1ecd70053caef327025d628bc1e4df5725ec83f2
2019-06-05 06:18:50 -07:00
Matt Pietal
78fdbd492f Sharesheet - Adjust button bar insets
Button bar insets were set before the inset callback. Add a call to
layout the button bar during the inset callback.

Bug: 134472146
Test: Steps from defect
Change-Id: I0246f06315cd05343002071dd6d217d41e0059ca
2019-06-05 07:09:17 -04:00
Lucas Dupin
5febf7eb6b Fix flaky test
Test was registering a listener, and events could come from wallpaper
manager making it unstable.

Fixes: 134485306
Test: atest SysuiColorExtractorTests
Change-Id: Ie838cbee0887f3503ce328d5c5b5603c413d5458
2019-06-04 20:47:29 -07:00
Hui Yu
c1dceabb36 Merge "Only set mStartClockTime when device is fully charged." into qt-dev
am: 28d28a4ee5

Change-Id: I902918ae0523e9a1c57bf4d867cd4d17847b4867
2019-06-04 18:20:04 -07:00
Makoto Onuki
ad1291e749 Avoid creating multiple death recipients for same observer
Also do a WTF when the same process registers 1000 observers with the
same observer instance.

Fix: 133388082
Test: manual test: Launch leaky app and make sure WTF is raised
Test: manual test: Open contacts app, close, and make sure the
"Total number of unique observers" goes back
Test: manual test: Open contacts app, kill it, and make sure the
"Total number of unique observers" goes back
Test: manual test: Open contacts app while contacts are syncing,
and make sure the activity refreshes itself.
Test: atest cts/tests/tests/content/src/android/content/cts/ContentResolverTest.java
Test: atest FrameworksCoreTests:BinderDeathDispatcherTest
Test: atest FrameworksServicesTests:com.android.server.content.ObserverNodeTest

Change-Id: Id738ca66023c029b92db3d108d99a9fc240fe77c
2019-06-04 17:06:39 -07:00
Hui Yu
28d28a4ee5 Merge "Only set mStartClockTime when device is fully charged." into qt-dev 2019-06-04 21:59:52 +00:00
Kevin Yao
0d2970d912 Merge "User education support on disambiguation dialog" into qt-dev
am: 327751f18f

Change-Id: I0ab37bd7b5cf4b00df4dc70d35a1387e3f348680
2019-06-03 18:40:43 -07:00
Kevin Yao
327751f18f Merge "User education support on disambiguation dialog" into qt-dev 2019-06-04 01:29:21 +00:00
Hui Yu
5104da00aa Only set mStartClockTime when device is fully charged.
The mStartClockTime represents the time device is fully charged.
Currently mStartClockTime is set again whenever the device clock
changes. Since the device clock could change many times, we lost
original mStartClockTime value, unreasonable mStartClockTime values
for example 26 days could be returned (because the device clock changes)
when getStartClockTime() is called.

A better solution is to only set mStartClockTime when device is fully
charged, the value is persisted across device reboot. When getStartClockTime()
is called, we return adjusted value according to current time.

Change-Id: I49ded1519bc31daf1a51a572325cbbe67f1abd09
Fix: 132914064
Test: Manual test, checking Settings--Battery--Last full Charge
2019-06-03 14:18:32 -07:00
Matt Pietal
02b0c0e363 Sharesheet - Fix layouts for multi-window mode
am: 3e4b56f76c

Change-Id: Iaea89d07090efc03a831955753411432142d5890
2019-06-03 10:07:07 -07:00
Kevin Yao
9176f033d9 User education support on disambiguation dialog
Support Accessibility education according to
1. Gesture Navigation is on or off
2. Screen reader feature (such as TalkBack) is enabled or not
Manual test screenshot: https://drive.google.com/open?id=1afTDRYPMcZphM5cL0krPDA_Vh9pRX-8x

Bug: 133811747
Test: Manual
Change-Id: I04ca36c9e88ff14e29103db41cfab2a9b53985d5
2019-06-03 13:59:38 +00:00
Matt Pietal
3e4b56f76c Sharesheet - Fix layouts for multi-window mode
When using multi-mode and holding the phone in portrait, android will
report it's orientation as LANDSCAPE. Take multi-window mode into
account when determining fixed widths as well as number of items per
row.

Bug: 132828939
Test: Use multi-window mode
Change-Id: I97b722ea58c9f79aea2a3ab594c3ad7d78f8607c
2019-06-03 07:08:22 -04:00
Hui Yu
7ac56b7229 Merge "Do not create EMPTY batterystats history file." into qt-dev
am: 04c3eeeaa0

Change-Id: Ia9927f3f094767ea136a06b0a840e89f280d26c2
2019-05-31 20:22:45 -07:00
TreeHugger Robot
04c3eeeaa0 Merge "Do not create EMPTY batterystats history file." into qt-dev 2019-06-01 02:30:20 +00:00
Hui Yu
e40781ee84 Do not create EMPTY batterystats history file.
Previously when batterystats history buffer exceeds MAX_HISTORY_BUFFER
size, we create a new history file which is empty until batterystats
history buffer is written to the file. But the buffer is written to the
file every 30 minutes by default. When the file is empty, if the
system server process crashed or abrupt powered off, the file will remain
empty.

During the device bootup, batterystats reads history buffer from
the empty file and failed. The important mHistoryBaseTime variable is zero,
which causes all timestamps in subsequent history events are wrong, this
causes volta go/powerbug displays wrong, also Battery Usage in Settings
are wrong.

The fix is to not create new empty history file on disk until we actually
write history buffer to the file.

This problem can be manually reproduced by creating new empty file under
battery-history directory, then power off the device by long press power
button.

Bug: 133525277
Test: frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsHistoryTest.java

Change-Id: I0c22881df6897e8832b472cc5e82fbf2727eb252
2019-05-31 23:48:47 +00:00
Fabian Kozynski
ec3e0ecaca DO NOT MERGE Remove Privacy Indicators
am: 9a560e068d

Change-Id: Ied3a51b9c47255a21e2fd29becfe4ed3400a16c7
2019-05-31 15:51:18 -07:00
Fabian Kozynski
9a560e068d DO NOT MERGE Remove Privacy Indicators
Bug: 133257910
Test: build and check that behavior is as P
Change-Id: I24bfc3806e2d12f6a1cc968d6979107e7002a3c4
2019-05-31 20:43:21 +00:00
Robert Snoeberger
33ce8f47c9 Merge "Implemented the mechanism of hiding clock face based on phenotype flag." into qt-r1-dev 2019-05-31 18:38:59 +00:00
lumark
9992e08829 Merge "Skip IME initialization when received the token that already registered" into qt-dev
am: 9bb2607703

Change-Id: I47e3521b214d5b5e057c979dfe8d96696bd42009
2019-05-30 10:44:19 -07:00
TreeHugger Robot
9bb2607703 Merge "Skip IME initialization when received the token that already registered" into qt-dev 2019-05-30 17:33:17 +00:00
lumark
e0af39403e Skip IME initialization when received the token that already registered
When IME window switches from current display to another display and back quickly,
system will re-bind InputMethodService to re-attach window token for each moving,
the IME service lifecycle will be onBind -> onUnBind -> onDestroy -> onBind.

Ideally, system will deliver window token when onServiceConnected and system should
only receive one onServiceConnected when the last service bound.

But due to user switch display very quick, before unbind service callbacked from client,
the next bind service request comes, caused the connection exists in system side and
client will then callback 2 onServiceConnected to system.

Since CL [1] introduced InputMethodPrivilegedOperationsRegistry to deal with token
registraction singleton-ness, the exception will be thrown for above case due to
the duplicate window token passed to client.

Add InputMethodPrivilegedOperationsRegistry#isRegistered to check if the token
already registered, if so, skip this duplicate initialization request.

[1]: I4a61470f06ffac5f7a512536f8431489db0108f4

Fix: 133624278
Test: manual as below steps:
    1) Settings > Developer options, enable "Simulated display" & "force desktop mode"
    2) Reboot device.
    3) Launch app from simulated display.
    4) Launch app from primary display (i.e. contacts), focus EditText to show IME.
    5) Tapping primary & simulated display repeatly & quickly.
    6) See if any exception log from IME application. (i.e. Gboard)

Change-Id: Ie6bfbae735724fe744590e715124d2737d2b665d
2019-05-30 12:27:17 +08:00
Govinda Wasserman
c69727d509 Adds learned state to the Reminder Experience for Assistant Handles
am: 1f606b099e

Change-Id: I9e23630e82a3cc4a060f906d9892cee148f522eb
2019-05-29 20:42:00 -07:00
shawnlin
f443938d56 Implemented the mechanism of hiding clock face based on phenotype flag.
Created a string type of phenotype flag which contains the clock plugin
service names that are not allow to be shown. Each service name is
seperated by a comma(",").

Test: atest com.android.keyguard.clock.ClockManagerTest
Bug: 133406302
Change-Id: I51c00b03ec56eaf4de7cab91073deeeb73610f93
2019-05-30 11:06:26 +08:00
Govinda Wasserman
1f606b099e Adds learned state to the Reminder Experience for Assistant Handles
Also sets the Reminder Experience as the default behavior.

Test: Tested locally
BUG:132983599
Change-Id: I27b063ca142fbde99b0bd1f6d107f45d6070869a
2019-05-29 23:06:02 -04:00
Govinda Wasserman
5415f8171a Merge "Update assist handle behavior control" into qt-dev
am: f8e7608263

Change-Id: Ic6e818a15976a12ccd5e9c465816c07ec237fdd0
2019-05-29 13:41:28 -07:00
TreeHugger Robot
f8e7608263 Merge "Update assist handle behavior control" into qt-dev 2019-05-29 20:34:48 +00:00
Govinda Wasserman
2c1134052e Update assist handle behavior control
Improves behavior modes to use more reliable callback mechanisms. Added
phenotype flag hooks for control of behavior and behavior parameters.
Added more robust null guarding.

Test: Tested locally
BUG:132983599
Change-Id: I42039152836071941d6b4f1cafb3670c62a65824
2019-05-29 14:41:23 -04:00
Mehdi Alizadeh
cdc1153d95 Merge "Filter disabled/suspended direct share targets in sharesheet" into qt-dev
am: 8a09c7c0ae

Change-Id: I57f9b54efa599a5bbf402313649153bf7337ae86
2019-05-29 11:27:00 -07:00
Mehdi Alizadeh
8a09c7c0ae Merge "Filter disabled/suspended direct share targets in sharesheet" into qt-dev 2019-05-29 18:06:57 +00:00
Matt Pietal
aed9a62d7f Merge "Sharesheet - Fix NPE on default app launch" into qt-dev
am: b5fbf20a55

Change-Id: I90a755ccac6a638542e52093c0af75dea51e0b8c
2019-05-29 10:05:22 -07:00
TreeHugger Robot
b5fbf20a55 Merge "Sharesheet - Fix NPE on default app launch" into qt-dev 2019-05-29 16:53:48 +00:00
Varun Anand
dadc3c9da4 Merge changes from topic "vpn_data_accounting" into qt-dev
am: b33d2ca2e3

Change-Id: Ie336c7c3968dd8cbb2b303398620632681d516b6
2019-05-29 09:47:38 -07:00
Varun Anand
b33d2ca2e3 Merge changes from topic "vpn_data_accounting" into qt-dev
* changes:
  Add one more test for VPN usage stats.
  Addressing comments for http://ag/7700679.
  NetworkStatsService: Fix getDetailedUidStats to take VPNs into account.
  Take all VPN underlying networks into account when migrating traffic for VPN uid.
2019-05-29 16:34:14 +00:00
Matt Pietal
97a04f921a Sharesheet - Add additional checks for low ram devices
am: 030bd8471f

Change-Id: I240b000807df5617dbf2320cfa6f2c917d37b0a6
2019-05-29 06:18:20 -07:00
Matt Pietal
32922ca4db Sharesheet - Fix NPE on default app launch
Turns out there's a secondary layout used by resolver which does not
contain R.id.empty. Check for null.

Bug: 133707284
Test: Open PDF file through resolver
Change-Id: I311f1c1d2fa6edcebc81d9056755884b1585a7cb
2019-05-29 07:39:21 -04:00
Matt Pietal
030bd8471f Sharesheet - Add additional checks for low ram devices
Continue to hide the direct share area for low ram devices. Make sure
the A-Z list loads properly.

Bug: 132342311
Test: Use low ram device
Change-Id: I66b58af3994e034e4d870286ef62ba4a9289e083
2019-05-29 07:17:39 -04:00
Varun Anand
917327b193 Take all VPN underlying networks into account when migrating traffic for
VPN uid.

(cherry picked from commit 95aa6d446f)

Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Test: Manually verified on device that stats from VPN UID are moved
      appropriately based on its declared underlying network set.
Test: vogar --mode app_process --benchmark NetworkStatsBenchmark.java

Change-Id: I7f368c5970b2dcb969fe0daf5ef44edb1f51d09d
2019-05-29 18:15:17 +09:00
Matt Pietal
227305d6a9 Merge "Sharesheet - Load images off main thread" into qt-dev
am: a11f79120b

Change-Id: I4288cd0a0223858681d8c836b5f01622b606d157
2019-05-28 12:40:51 -07:00
Matt Pietal
a11f79120b Merge "Sharesheet - Load images off main thread" into qt-dev 2019-05-28 19:28:41 +00:00
Matt Pietal
e7cacab797 Sharesheet - Load images off main thread
To prevent main thread from being blocked and potential ANRs, load
images on AsyncTasks. If no images are successfully loaded within a
timeout period, hide the content preview area. Optimize scrolling by
reusing the views in their entirety and not reloading images. Also
allow for more time for direct share loading

Bug: 132698784
Test: Manual
Change-Id: Ia73e9b6912bf36a1c6c9660423d6f0602e832187
2019-05-28 12:54:25 -04:00
Matt Pietal
fef3b40787 Merge "Resolver - Fix bottom spacing issue with edge-to-edge" into qt-dev
am: ea73bddd5b

Change-Id: Ib68d80ac81a4d112d7bdf3ab7f7a65d45fc7861d
2019-05-28 05:42:07 -07:00
TreeHugger Robot
ea73bddd5b Merge "Resolver - Fix bottom spacing issue with edge-to-edge" into qt-dev 2019-05-28 12:29:28 +00:00
Mehdi Alizadeh
3e3216f111 Filter disabled/suspended direct share targets in sharesheet
Bug: 123961239
Test: Manual test by suspending test app using Digital Wellbeing
Change-Id: Id26465c484a708714ba955a1657fb1c3be402734
2019-05-27 17:56:51 -07:00
Mathew Inwood
b8bda0e07a Merge "Revert "Adjusts the USAP pool refill mechanism."" into qt-dev
am: b7bf4fa27a

Change-Id: I4702653db00fbcc211ac912c9570baa6c6d8408f
2019-05-26 18:31:49 -07:00
TreeHugger Robot
b7bf4fa27a Merge "Revert "Adjusts the USAP pool refill mechanism."" into qt-dev 2019-05-27 01:18:42 +00:00
Winson Chung
99e4162dd3 Merge "Add null check for component name when fetching uid" into qt-dev
am: 35d6deced8

Change-Id: I458be4b7028f81d955bde72c75e64a98293f02b8
2019-05-24 17:53:05 -07:00
TreeHugger Robot
35d6deced8 Merge "Add null check for component name when fetching uid" into qt-dev 2019-05-25 00:05:07 +00:00