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
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
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
- 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)
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
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
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
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
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
am: 0f512b2eba -s ours
am skip reason: change_id I8ee3f876fcaffa63636645f0f59709cd147254ef with SHA1 5ab98de315 is in history
Change-Id: I827ef6a6a400895a374946059424f4901201cf57
am: cbffcf9c24 -s ours
am skip reason: change_id I2fef9ab13614627c0f1bcca04759d0974fc6181a with SHA1 1b6301cf24 is in history
Change-Id: I5d0100f3e0b5a404836572a34ddcd685282407eb
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
Allows gauge/value metrics to work with pulled atoms that were
registered after the config was received.
Test: gts
Bug: 130314103
Change-Id: I9cddd28efd464d8bb78da868d8c0d850ffb0235c
am: d89cac1562 -s ours
am skip reason: change_id I8ee3f876fcaffa63636645f0f59709cd147254ef with SHA1 5ab98de315 is in history
Change-Id: I734fd8e0dc271ed7942a8c9d17e5ce19a9cb544d