Commit Graph

413350 Commits

Author SHA1 Message Date
Kevin Chyn
1c100834dd Set pending client to null after it's been started
Pending client can now be started in two places. Originally it was only
started when onError was received (previous client canceled). We recently
discovered some enumerate bugs likely due to system boot timing changes,
where Keyguard authenticate() can occur while enumerate() is still going.

As a result, we queue clients while enumerate is happening and start them
when enumerate finishes. We need to remember to set the pending client to
null.

Fixes: 130208531

Test: Fingerprint works during cold boot
Change-Id: I5fe1c7a9fc96875f3d87048b12e601755d7f4963
2019-04-11 17:48:51 -07:00
Mady Mellor
d8913d7eac Merge "Drop the 'initial' of suppressInitialNotification API" into qt-dev 2019-04-11 16:28:34 +00:00
Chen Xu
d81cd26296 Merge "throw securityexception for notifyNetworkChange" into qt-dev 2019-04-11 15:56:02 +00:00
TreeHugger Robot
ac3d917aa3 Merge "Remove remaining deepCopy() usages in TextClassifier" into qt-dev 2019-04-11 15:54:52 +00:00
Zimuzo Ezeozue
f4e878d7ce Merge "Fixed PackageWatchdog health check state" into qt-dev 2019-04-11 15:54:46 +00:00
TreeHugger Robot
1c891d6772 Merge "Retry getting DynamicSystem service" into qt-dev 2019-04-11 15:53:52 +00:00
Matt Pietal
43e9ec2354 Merge "Sharesheet - 4->8 direct share expansion fix" into qt-dev 2019-04-11 15:30:34 +00:00
chen xu
627d1b262a throw securityexception for notifyNetworkChange
throw exception instead of check permission and return.

Bug: 130329121
Test: Build
Change-Id: I9f0e60312ebd0baaf1538a6e658414211b17991b
2019-04-11 15:27:33 +00:00
Winson Chung
71d3450762 Merge "Add state callbacks to launcher" into qt-dev 2019-04-11 15:22:36 +00:00
TreeHugger Robot
6ba3be1044 Merge "Import translations. DO NOT MERGE" into qt-dev 2019-04-11 15:14:27 +00:00
TreeHugger Robot
507bcb189f Merge "Import translations. DO NOT MERGE" into qt-dev 2019-04-11 15:10:17 +00:00
TreeHugger Robot
2d8c54a532 Merge "Update comment per review feedback" into qt-dev 2019-04-11 15:06:37 +00:00
Ricky Wai
bbde1150c5 Merge "Do not allow moveToFront() and moveTaskToFront() when app is in background" into qt-dev 2019-04-11 13:33:04 +00:00
Chiachang Wang
7757b14c3b Merge "Add lifecycle tests to NetworkMonitorTest" into qt-dev 2019-04-11 13:15:40 +00:00
Todd Kennedy
a6da679199 Update comment per review feedback
Treehugger was being a pain and I wanted to submit if it passsed.
It passed, so, need to adjust in a separate change.

Bug: 123919310
Test: None. This is a comment change only
Change-Id: Ib49cea7d814a7cb4566d663a2805ed56763454e8
2019-04-11 06:14:15 -07:00
Bill Yi
9bf2c01d16 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Ic2368d119ddd7e16c500dedefae454a50052edf0
2019-04-11 06:11:31 -07:00
Jorim Jaggi
38ae4d1a92 Merge "Mark testEarliestAlarmSet as flaky" into qt-dev 2019-04-11 13:09:53 +00:00
Jorim Jaggi
b9a724b0d4 Mark testEarliestAlarmSet as flaky
Blocks presubmits.

Test: n/a
Bug: 130313408
Change-Id: Ia716510866676c6aefeb2765bfef7a1a030cd791
2019-04-11 14:57:35 +02:00
Zimuzo
6997f3c852 Fixed PackageWatchdog health check state
1. Receiving List<PackageInfo>:
Since I29e2d619a5296716c29893ab3aa2f35f69bfb4d7, we now receive a
List of PackageInfo instead of Strings for packages supporting
explicit health checks. Now, we parse this List<PackageInfo> from
ExtServices instead of trying to parse List<String> and we use the
health check timeout in the PackageInfo as the health check expiry
deadline instead of using the total package expiry time.

2. Updating health check durations onSupportedPackages:
Before, we always updated the health check duration for a
package if the package is supported and the health check state is
not PASSED, this caused the health check duration for a package to
never reduce as long as we kept getting onSupportedPackages. Now, we
improved the readability of the state transitions onSupportedPackages.
We now correctly only update the health check duration for supported
packages in the INACTIVE state.

3. FAILED state:
Before we only had INACTIVE, ACTIVE and PASSED states. When a package
has failed the health check we could notify the observer multiple
times in quick succession and get into a bad internal state with
negative health check durations. Now we added check to ensure we
don't try to schedule with a Handler with a negative duration and we
defined a negative health check duration to be a new FAILED state if the
health check is not passed. This clearly defines the state transitions
as seen below:

+----------+     +---------+    +------+
|          |     |         |    |      |
| INACTIVE +---->+ ACTIVE  +--->+PASSED|
|          |     |         |    |      |
+-----+----+     +----+----+    +------+
      |               |
      |               |
      |               |
      |               |
      |          +----v----+
      |          |         |
      +----------> FAILED  |
                 |         |
                 +---------+

4. Uptime state:
Everytime we pruned observers, we scheduled the next prune and stored
the current SystemClock#uptimeMillis. This allowed us determine how
much time had elapsed for the next prune. The uptime was not correclty
updated when starting to observe already observed packages. With the
following sequence of events:

-monitor package A for 1hr
-30mins elapsed
-monitor package A again for 1hr

A would expire 30mins from the last event instead of 1hr.
This was because the second time around, we
saved the new state to disk but did not reschedule so did not update
the uptime at last schedule, so 1hr from the first event, we would
prune packages with the original uptime and incorrectly expire A
earlier. Now we update all internal state, fixed this and added a test
for this case.

5. Readability
Improved method variable names, logging and comments.

Bug: 120598832
Test: Manual testing && atest PackageWatcdogTest
Change-Id: I1512d5938848ad26b668636405fe9b0db50d3a2e
2019-04-11 13:51:58 +01:00
Alison Cichowlas
bf72ee109b Merge "Merge caller targets and ranked targets." into qt-dev 2019-04-11 12:24:22 +00:00
TreeHugger Robot
fd47e681f0 Merge "Override actionModeCloseDrawable in Theme.DeviceDefault.DocumentsUI" into qt-dev 2019-04-11 12:13:21 +00:00
Lorenzo Colitti
5beebde64d Add lifecycle tests to NetworkMonitorTest
- Ensure that NetworkMonitor quits when notifyNetworkDisconnected
  is called.
- Ensure that BroadcastReceivers are registered when a captive
  portal is detected and unregistered when the network validates
  or when NetworkMonitor quits.

Bug: 122164725
Test: atest FrameworksNetTests NetworkStackTests
Test: atest --generate-new-metrics 10 NetworkStackTests:com.android.server.connectivity.NetworkMonitorTest
Test: test fails if "Don't leak captive portal broadcast receivers." change reverted
Change-Id: I1202626face33cc1e1ec02016b95da487b3335c8
Merged-In: I1202626face33cc1e1ec02016b95da487b3335c8
(cherry picked from commit bb41c8f751)
2019-04-11 11:52:27 +00:00
Po-Chien Hsueh
7565fcc71b Retry getting DynamicSystem service
DynamicSystemService might not be ready even sysprop init.svc.gsid
is "running". Move connect() into retry loop.

Bug: 130336119
Test: boot the device and check logcat
Change-Id: Iab5065bf139abcf6c19dcc3553f8a3ca1642e7b3
2019-04-11 17:04:59 +08:00
Tony Huang
ca49f0636d Override actionModeCloseDrawable in Theme.DeviceDefault.DocumentsUI
Since RRO do not support to override theme which indicate specific
attr to reference private resource at Q, defined actionModeCloseDrawable
in Theme.DeviceDefault.DocumentsUI can ensure all Q devices apply the
reasonable design.

Fix: 130209354
Test: visual
Test: atest DocumentsUIGoogleTests
Change-Id: I7751aaa753e92a860dc20b873967631a4070595e
2019-04-11 08:16:07 +00:00
Junyu Lai
c53df3a9cc Merge "Fix onBlockedStatusChanged does not work on multiple networks" into qt-dev 2019-04-11 06:58:48 +00:00
Mady Mellor
9aae324a2a Merge "Fix regression from ag/6938053 where the pointer is in wrong place" into qt-dev 2019-04-11 06:57:25 +00:00
Yohei Yukawa
2d4b343b69 Add '-u <user id>' option to 'adb shell ime reset'
This is a preparation to add end-to-end CTS for per-profile IME mode.

In order to allow CTS tests to switch IME via shell command in
multi-user environment, this CL adds '-u <user id>' option to
  adb shell ime reset

Bug: 122924287
Test: Manually tested as follows:
  1. Build aosp_blueline-userdebug and flash it
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  5. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
  6. adb shell pm create-user test
  7. adb shell am switch-user 10
  8. adb shell ime list -s -u 0
     -> com.android.inputmethod.latin/.LatinIME
        com.example.android.softkeyboard/.SoftKeyboard
  9. adb shell ime reset -u 0
     -> Reset current and enabled IMEs for user #0
          Selected: com.android.inputmethod.latin/.LatinIME
           Enabled: com.android.inputmethod.latin/.LatinIME
 10. adb shell ime list -s -u 0
     -> com.android.inputmethod.latin/.LatinIME
Test: Manually tested as follows.
  1. Build aosp_blueline-userdebug and flash it
  2. adb shell pm create-user restricted_test
  3. adb root
  4. adb shell pm set-user-restriction --user 10 no_debugging_features 1
  5. adb shell ime reset -u all
     -> Reset current and enabled IMEs for user #0
          Selected: com.android.inputmethod.latin/.LatinIME
           Enabled: com.android.inputmethod.latin/.LatinIME
        User #10 is restricted with DISALLOW_DEBUGGING_FEATURES
Change-Id: Ie330c6faa76f366b78c15c0161873a051a3d40e3
2019-04-10 23:23:25 -07:00
Yohei Yukawa
099f80ce97 Add '-u <user id>' option to 'adb shell ime set'
This is a preparation to add end-to-end CTS for per-profile IME mode.

In order to allow CTS tests to switch IME via shell command in
multi-user environment, this CL adds '-u <user id>' option to
  adb shell ime set <ime id>

Another notable behavior change in this CL is that
  adb shell ime set <ime id>
now gracefully fails with showing one-line error message when <ime id>
does not exist.  Previously it failed with showing a stacktrace
because of unhandled IllegalArgumentException.

Bug: 122924287
Test: Manually tested as follows:
  1. Build aosp_blueline-userdebug and flash it
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell pm create-user test
  5. adb shell am switch-user 10
  6. adb shell ime enable -u 0 com.example.android.softkeyboard/.SoftKeyboard
     -> Input method com.example.android.softkeyboard/.SoftKeyboard: now enabled for user #0
  7. adb shell ime set -u 0 com.example.android.softkeyboard/.SoftKeyboard
     -> Input method com.example.android.softkeyboard/.SoftKeyboard selected for user #0
Test: Manually tested as follows.
  1. Build aosp_blueline-userdebug and flash it
  2. adb shell pm create-user restricted_test
  3. adb root
  4. adb shell pm set-user-restriction --user 10 no_debugging_features 1
  5. adb shell ime set -u all com.android.inputmethod.latin/.LatinIME
     -> Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #0
        User #10 is restricted with DISALLOW_DEBUGGING_FEATURES.
Change-Id: I397cf0fb418a395dcafc0ab0d8d4e553b0f2eaab
2019-04-10 23:23:17 -07:00
Yohei Yukawa
e177170f64 Add '-u <user id>' option to 'adb shell ime enable'
This is a preparation to add end-to-end CTS for per-profile IME mode.

In order to allow CTS tests to enable/disable IMEs via shell command
in multi-user environment, this CL adds '-u <user id>' option to
  adb shell ime enable <ime id>
and
  adb shell ime disable <ime id>

Note that '-u' option is already supposed in 'adb shell ime list' [1].

 [1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b
      7f8ee4b9dd

Bug: 122924287
Test: Manually tested as follows:
  1. Build aosp_blueline-userdebug and flash it
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell pm create-user test
  5. adb shell am switch-user 10
  6. adb shell ime enable -u 0 com.example.android.softkeyboard/.SoftKeyboard
     -> Input method com.example.android.softkeyboard/.SoftKeyboard: now enabled for user #0
  7. adb shell ime disable -u 0 com.example.android.softkeyboard/.SoftKeyboard
     -> Input method com.example.android.softkeyboard/.SoftKeyboard: now disabled for user #0
Test: Manually tested as follows.
  1. Build aosp_blueline-userdebug and flash it
  2. adb shell pm create-user test
  3. adb shell pm create-user restricted_test
  4. adb root
  5. adb shell pm set-user-restriction --user 11 no_debugging_features 1
  6. adb shell am switch-user 10
  7. adb shell am switch-user 11
  8. adb shell am switch-user 0
  9. adb shell ime disable -u all com.android.inputmethod.latin/.LatinIME
     -> Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #0
        Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #10
        User #11 is restricted with DISALLOW_DEBUGGING_FEATURES.
Change-Id: Ia0f873e4589a9fc3f549469e3d1d966640dc2df5
2019-04-10 23:20:51 -07:00
TreeHugger Robot
ce1acbc526 Merge "Fix puller callback with gauge/value metric" into qt-dev 2019-04-11 05:40:33 +00:00
Android Build Merger (Role)
db797218a4 Merge "[automerger skipped] Merge changes from topic "am-09249f80-e618-46fc-ac06-c7fdc73c36ae" into oc-dev am: 07a485743a am: 30826bd658 am: d89cac1562 -s ours am: 0f512b2eba -s ours am skip reason: change_id I8ee3f876fcaffa63636645f0f59709cd147254ef with SHA1 5ab98de315 is in history" into qt-dev 2019-04-11 05:37:50 +00:00
Eran Messeri
f0acf8f25e [automerger skipped] Merge changes from topic "am-09249f80-e618-46fc-ac06-c7fdc73c36ae" into oc-dev am: 07a485743a am: 30826bd658 am: d89cac1562 -s ours
am: 0f512b2eba -s ours
am skip reason: change_id I8ee3f876fcaffa63636645f0f59709cd147254ef with SHA1 5ab98de315 is in history

Change-Id: I827ef6a6a400895a374946059424f4901201cf57
2019-04-10 22:37:23 -07:00
TreeHugger Robot
b2514335e5 Merge "Add Vts test for xsd_config" into qt-dev 2019-04-11 05:35:43 +00:00
TreeHugger Robot
27ac06ea33 Merge "Crash the system server if network stack is lost" into qt-dev 2019-04-11 05:34:24 +00:00
TreeHugger Robot
d69eb2457a Merge "Change to choice" into qt-dev 2019-04-11 05:33:41 +00:00
Julia Reynolds
45c0ce2efa Merge "[RESTRICT_AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage" into oc-dev am: 2256fd4e11 am: 51fee974a9 am: 19ad060bf0
am: 9456d1e079

Change-Id: I4dc59e06e8744cd3cb8b457f0901fa474e1bf538
2019-04-10 22:25:23 -07:00
Julia Reynolds
37291c057a Merge changes from topic "am-3ca7326a-cbf1-4f97-a1b5-a4fdfac0fb47" into oc-dev am: 652a666500 am: 5d35ad7446 am: 03cddd8562
am: 00f5cf45c7

Change-Id: I5272a3c39f8e7d0b60368dcc35b398f455c5ae2c
2019-04-10 22:17:52 -07:00
Pavel Grafov
dffb9c7068 [automerger skipped] [automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e am: 55209aca88 am: d5ce9a41b6 am: 20007cb46f am: 3ae9c5c63b -s ours am: 8a317effc2 -s ours
am: cbffcf9c24 -s ours
am skip reason: change_id I2fef9ab13614627c0f1bcca04759d0974fc6181a with SHA1 1b6301cf24 is in history

Change-Id: I5d0100f3e0b5a404836572a34ddcd685282407eb
2019-04-10 22:04:58 -07:00
TreeHugger Robot
6b1c8d6816 Merge "Fix compressed stubs" into qt-dev 2019-04-11 04:31:22 +00:00
TreeHugger Robot
b73580d2fa Merge "Revert "Remove overlay logic from package manager and parser"" into qt-dev 2019-04-11 04:12:23 +00:00
Remi NGUYEN VAN
9164fabba4 Crash the system server if network stack is lost
Crash the system server if it cannot bind to the network stack, or if
the network stack crashes. This is better than keeping the system
running in a bad state where all networking would be broken.
Before the network stack was moved to a different process, the whole
system would go down when it encountered a crash.

Test: added crash in NetworkStack, verified system_server restart
Bug: 130028724
Merged-In: I64f366fc69b52f27d65461be50d81edc199bcb62
Merged-In: I034a62ec44ba1da32fd47c842a2bdf86f6ccf542
(cherry picked from commit d44fc02248)

Change-Id: I989703c9dda62bd58df413ca8949f9a25187e062
2019-04-11 03:49:39 +00:00
Remi NGUYEN VAN
e0603420f8 Merge "Expose captive portal urls for configuration" into qt-dev 2019-04-11 03:44:08 +00:00
Tej Singh
de473b5138 Fix puller callback with gauge/value metric
Allows gauge/value metrics to work with pulled atoms that were
registered after the config was received.

Test: gts
Bug: 130314103
Change-Id: I9cddd28efd464d8bb78da868d8c0d850ffb0235c
2019-04-10 20:41:59 -07:00
TreeHugger Robot
c7a2372ab6 Merge "stopSelf() if there is no installed system image" into qt-dev 2019-04-11 03:41:01 +00:00
TreeHugger Robot
10093916cc Merge changes from topic "bt-metadata-api-v2-qt-dev" into qt-dev
* changes:
  Bluetooth metadata API changes in SettingsLib
  Refine Bluetooth Metadata API
2019-04-11 03:37:58 +00:00
Eran Messeri
0f512b2eba [automerger skipped] Merge changes from topic "am-09249f80-e618-46fc-ac06-c7fdc73c36ae" into oc-dev am: 07a485743a am: 30826bd658
am: d89cac1562 -s ours
am skip reason: change_id I8ee3f876fcaffa63636645f0f59709cd147254ef with SHA1 5ab98de315 is in history

Change-Id: I734fd8e0dc271ed7942a8c9d17e5ce19a9cb544d
2019-04-10 20:17:04 -07:00
TreeHugger Robot
db8b76d501 Merge "Temporarily stop crashing on alarm limit" into qt-dev 2019-04-11 03:14:20 +00:00
Bill Yi
0c3b511cd1 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I348eb96921137b301dde350836c8ab42286dbf51
2019-04-10 20:08:55 -07:00
Julia Reynolds
9456d1e079 Merge "[RESTRICT_AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage" into oc-dev am: 2256fd4e11 am: 51fee974a9
am: 19ad060bf0

Change-Id: I0ed6effdd52e511fab32a668b8232fc0095e3295
2019-04-10 20:06:30 -07:00
Julia Reynolds
00f5cf45c7 Merge changes from topic "am-3ca7326a-cbf1-4f97-a1b5-a4fdfac0fb47" into oc-dev am: 652a666500 am: 5d35ad7446
am: 03cddd8562

Change-Id: Ifa1fe4acb2249480c1b9067e1e53a3f020008859
2019-04-10 20:00:26 -07:00