Test: Unlock with fingerprint, observe icon
Test: Unlock with fingerprint while collapsing panel, make sure
icon reappears after 800ms.
Change-Id: I8b081445bdaaa68741e4bab57a6f79f6e12f1d54
Fixes: 30507748
(cherry picked from commit 8dea48c87e)
When user fails an authentification in lockscreen many times,
"Try again in 30 seconds." is displayed and a 30 seconds
timer starts to count backwards.
This lets "Try again in 1 seconds" to be displayed for one second.
Bug: 31078006
Change-Id: I6c7de2b751582bb06a93e583b710f83201da1728
Test: Unlock with fingerprint, observe icon
Test: Unlock with fingerprint while collapsing panel, make sure
icon reappears after 800ms.
Change-Id: I8b081445bdaaa68741e4bab57a6f79f6e12f1d54
Fixes: 30507748
Make setAffiliationIds public so that it can be used for COMP.
That way we can allow network logging and other features to
work on devices that have a DO and a managed profile.
Those features are currently restricted to single user devices but we'll
open them up to devices where all users are affiliated.
Also create a getter for that API.
Bug: 32326223
Test: m FrameworksServicesTests &&
adb install \
-r ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk &&
adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ie443be887a6ca61a7f7a07e137757dceab7eb3d3
In most cases, we can safely use the values from package settings instead.
We do the work when we're in the middle of an upgrade or the first boot,
since we have no choice.
This saves about 200-400ms on package manager startup on a freshly wiped
device with no app installs. Savings are likely to grow linearly with
the number of installed apps.
Bug: 22063656
Test: make + manual testing.
Change-Id: I1b2bdc4df45f334620c1fb94d78276f0095d5ff8
Symptom: monkey crash caused system server killed.
Root Cause: when monkey crash or app crash before process bound,
calling AppErrors.crashApplication will first
clear binder identities, that will caused calling pid / uid
will become with current process (i.e. system server),
so in handleAppCrashInActivityController, when monkey registered
activityController would like to kill crash process,
but not found in AMS (monkey created by app_process)
then using calling pid / uid will become to kill system server.
Solution: add calling pid / uid parameters for
handleAppCrashInActivityController to prevent binder identities
cleared case.
Test: To simulate monkey or app crash before process bound may not easy
by using simple command, but we can write a sample program to
simulate RuntimeInit to call handleApplicationCrash when met
uncauchtException,
Below is test steps in Android 7.1.1 emulator.
1. start emulator
2. after emulater started, use "adb shell am monitor" to set
activityController & monitor process by console.
3. write a .jar program as monkey by below sample code to simulate null
application binder to call handleApplicationCrash() as RuntimeInit:
package com.android.test;
import com.android.internal.os.BaseCommand;
public class SimulateMonkeyCrash extends BaseCommand {
public static void main(String[] args) {
IActivityManager am = ActivityManagerNative.getDefault();
try {
am.handleApplicationCrash(null,
new ApplicationErrorReport.CrashInfo(new Throwable()));
} catch (RemoteException e) {
e.printStackTrace();
}
}
4. write a .sh file named SimulateMonkeyCrash.sh as below:
#
base=/system
export CLASSPATH=$base/framework/SimulateMonkeyCrash.jar
exec app_process $base/bin com.android.test.SimulateMonkeyCrash "$@"
5. let .sh file is executable by "chomod 755".
6. push .jar file into /system/framework & .sh file into /system/bin
7 execute .sh file.
8. activityController will detected program crash in console as below,
press k:
Waiting after crash... available commands:
(c)ontinue: show crash dialog
(k)ill: immediately kill app
(q)uit: finish monitoring
9 you can see system server is crash.
Change-Id: Ibac4d88872f24af109d8e8522ecf5ac72fac0ce0