Have bit grant permissions to installed APKs.

Otherwise unit tests fail spectacularly when they don't get the
runtime permissions that they expect.

Bug: 63391323
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Change-Id: I5307e0456865387ac14178268f543e2007b97096
This commit is contained in:
Jeff Sharkey
2017-07-06 12:13:42 -06:00
parent 4f5adb9801
commit 5f9dc424b3

View File

@@ -731,7 +731,7 @@ run_phases(vector<Target*> targets, const Options& options)
InstallApk& apk = installApks[i];
if (!apk.file.fileInfo.exists || apk.file.HasChanged()) {
// It didn't exist before or it changed, so int needs install
err = run_adb("install", "-r", apk.file.filename.c_str(), NULL);
err = run_adb("install", "-r", "-g", apk.file.filename.c_str(), NULL);
check_error(err);
apk.installed = true;
} else {