Merge "Remove STOPSHIP" into nyc-dev
am: 1c39a112b4
* commit '1c39a112b43e50da4e801d634e28ae7a130c0dcb':
Remove STOPSHIP
Change-Id: I15ad40f01dd8bb86f1f64af67760de2a6e1db535
This commit is contained in:
@@ -2395,6 +2395,10 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
mPromoteSystemApps =
|
mPromoteSystemApps =
|
||||||
mIsUpgrade && ver.sdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1;
|
mIsUpgrade && ver.sdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1;
|
||||||
|
|
||||||
|
// When upgrading from pre-N, we need to handle package extraction like first boot,
|
||||||
|
// as there is no profiling data available.
|
||||||
|
mIsPreNUpgrade = mIsUpgrade && ver.sdkVersion < Build.VERSION_CODES.N;
|
||||||
|
|
||||||
// save off the names of pre-existing system packages prior to scanning; we don't
|
// save off the names of pre-existing system packages prior to scanning; we don't
|
||||||
// want to automatically grant runtime permissions for new system apps
|
// want to automatically grant runtime permissions for new system apps
|
||||||
if (mPromoteSystemApps) {
|
if (mPromoteSystemApps) {
|
||||||
@@ -2407,11 +2411,6 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When upgrading from pre-N, we need to handle package extraction like first boot,
|
|
||||||
// as there is no profiling data available.
|
|
||||||
mIsPreNUpgrade = !mSettings.isNWorkDone();
|
|
||||||
mSettings.setNWorkDone();
|
|
||||||
|
|
||||||
// Collect vendor overlay packages.
|
// Collect vendor overlay packages.
|
||||||
// (Do this before scanning any apps.)
|
// (Do this before scanning any apps.)
|
||||||
// For security and version matching reason, only consider
|
// For security and version matching reason, only consider
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ final class Settings {
|
|||||||
private static final String TAG_DEFAULT_BROWSER = "default-browser";
|
private static final String TAG_DEFAULT_BROWSER = "default-browser";
|
||||||
private static final String TAG_DEFAULT_DIALER = "default-dialer";
|
private static final String TAG_DEFAULT_DIALER = "default-dialer";
|
||||||
private static final String TAG_VERSION = "version";
|
private static final String TAG_VERSION = "version";
|
||||||
private static final String TAG_N_WORK = "n-work";
|
|
||||||
|
|
||||||
private static final String ATTR_NAME = "name";
|
private static final String ATTR_NAME = "name";
|
||||||
private static final String ATTR_USER = "user";
|
private static final String ATTR_USER = "user";
|
||||||
@@ -398,17 +397,6 @@ final class Settings {
|
|||||||
|
|
||||||
public final KeySetManagerService mKeySetManagerService = new KeySetManagerService(mPackages);
|
public final KeySetManagerService mKeySetManagerService = new KeySetManagerService(mPackages);
|
||||||
|
|
||||||
/**
|
|
||||||
* Used to track whether N+ work has been done. This is similar to the file-system level
|
|
||||||
* and denotes that first-boot or upgrade-to-N work has been done.
|
|
||||||
*
|
|
||||||
* Note: the flag has been added to a) allow tracking while an API level check is impossible
|
|
||||||
* and b) to merge upgrade as well as first boot (because the flag is false, by default).
|
|
||||||
*
|
|
||||||
* STOPSHIP: b/27872764
|
|
||||||
*/
|
|
||||||
private boolean mIsNWorkDone = false;
|
|
||||||
|
|
||||||
Settings(Object lock) {
|
Settings(Object lock) {
|
||||||
this(Environment.getDataDirectory(), lock);
|
this(Environment.getDataDirectory(), lock);
|
||||||
}
|
}
|
||||||
@@ -2396,10 +2384,6 @@ final class Settings {
|
|||||||
|
|
||||||
mKeySetManagerService.writeKeySetManagerServiceLPr(serializer);
|
mKeySetManagerService.writeKeySetManagerServiceLPr(serializer);
|
||||||
|
|
||||||
serializer.startTag(null, TAG_N_WORK);
|
|
||||||
serializer.attribute(null, ATTR_DONE, Boolean.toString(mIsNWorkDone));
|
|
||||||
serializer.endTag(null, TAG_N_WORK);
|
|
||||||
|
|
||||||
serializer.endTag(null, "packages");
|
serializer.endTag(null, "packages");
|
||||||
|
|
||||||
serializer.endDocument();
|
serializer.endDocument();
|
||||||
@@ -2937,8 +2921,6 @@ final class Settings {
|
|||||||
ver.sdkVersion = XmlUtils.readIntAttribute(parser, ATTR_SDK_VERSION);
|
ver.sdkVersion = XmlUtils.readIntAttribute(parser, ATTR_SDK_VERSION);
|
||||||
ver.databaseVersion = XmlUtils.readIntAttribute(parser, ATTR_SDK_VERSION);
|
ver.databaseVersion = XmlUtils.readIntAttribute(parser, ATTR_SDK_VERSION);
|
||||||
ver.fingerprint = XmlUtils.readStringAttribute(parser, ATTR_FINGERPRINT);
|
ver.fingerprint = XmlUtils.readStringAttribute(parser, ATTR_FINGERPRINT);
|
||||||
} else if (TAG_N_WORK.equals(tagName)) {
|
|
||||||
mIsNWorkDone = XmlUtils.readBooleanAttribute(parser, ATTR_DONE, false);
|
|
||||||
} else {
|
} else {
|
||||||
Slog.w(PackageManagerService.TAG, "Unknown element under <packages>: "
|
Slog.w(PackageManagerService.TAG, "Unknown element under <packages>: "
|
||||||
+ parser.getName());
|
+ parser.getName());
|
||||||
@@ -4233,14 +4215,6 @@ final class Settings {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNWorkDone() {
|
|
||||||
return mIsNWorkDone;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setNWorkDone() {
|
|
||||||
mIsNWorkDone = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void printFlags(PrintWriter pw, int val, Object[] spec) {
|
static void printFlags(PrintWriter pw, int val, Object[] spec) {
|
||||||
pw.print("[ ");
|
pw.print("[ ");
|
||||||
for (int i=0; i<spec.length; i+=2) {
|
for (int i=0; i<spec.length; i+=2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user