am 946a5c91: Merge "Save off the seinfo value with packages.list."

* commit '946a5c91d95daea8e12c235f003abbd3191b57b2':
  Save off the seinfo value with packages.list.
This commit is contained in:
Geremy Condra
2013-03-28 16:52:49 -07:00
committed by Android Git Automerger
2 changed files with 6 additions and 3 deletions

View File

@ -1359,6 +1359,7 @@ final class Settings {
// userId - application-specific user id // userId - application-specific user id
// debugFlag - 0 or 1 if the package is debuggable. // debugFlag - 0 or 1 if the package is debuggable.
// dataPath - path to package's data path // dataPath - path to package's data path
// seinfo - seinfo label for the app (assigned at install time)
// //
// NOTE: We prefer not to expose all ApplicationInfo flags for now. // NOTE: We prefer not to expose all ApplicationInfo flags for now.
// //
@ -1372,6 +1373,8 @@ final class Settings {
sb.append((int)ai.uid); sb.append((int)ai.uid);
sb.append(isDebug ? " 1 " : " 0 "); sb.append(isDebug ? " 1 " : " 0 ");
sb.append(dataPath); sb.append(dataPath);
sb.append(" ");
sb.append(ai.seinfo);
sb.append("\n"); sb.append("\n");
str.write(sb.toString().getBytes()); str.write(sb.toString().getBytes());
} }

View File

@ -111,9 +111,9 @@ public class PackageManagerSettingsTests extends AndroidTestCase {
private void writePackagesList() { private void writePackagesList() {
writeFile(new File(getContext().getFilesDir(), "system/packages.list"), writeFile(new File(getContext().getFilesDir(), "system/packages.list"),
( "com.google.app1 11000 0 /data/data/com.google.app1" ( "com.google.app1 11000 0 /data/data/com.google.app1 seinfo1"
+ "com.google.app2 11001 0 /data/data/com.google.app2" + "com.google.app2 11001 0 /data/data/com.google.app2 seinfo2"
+ "com.android.app3 11030 0 /data/data/com.android.app3") + "com.android.app3 11030 0 /data/data/com.android.app3 seinfo3")
.getBytes()); .getBytes());
} }