File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
services/java/com/android/server/pm Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 4545import org .xmlpull .v1 .XmlPullParserException ;
4646import org .xmlpull .v1 .XmlSerializer ;
4747
48+ import android .app .ActivityManager ;
4849import android .app .ActivityManagerNative ;
4950import android .app .IActivityManager ;
5051import android .app .admin .IDevicePolicyManager ;
@@ -5890,6 +5891,10 @@ private boolean isVerificationEnabled(int flags) {
58905891
58915892 // Check if installing from ADB
58925893 if ((flags & PackageManager .INSTALL_FROM_ADB ) != 0 ) {
5894+ // Do not run verification in a test harness environment
5895+ if (ActivityManager .isRunningInTestHarness ()) {
5896+ return false ;
5897+ }
58935898 // Check if the developer does not want package verification for ADB installs
58945899 if (android .provider .Settings .Global .getInt (mContext .getContentResolver (),
58955900 android .provider .Settings .Global .PACKAGE_VERIFIER_INCLUDE_ADB , 1 ) == 0 ) {
You can’t perform that action at this time.
0 commit comments