Derive fingerprint at runtime when undefined.

Some devices leave "ro.build.fingerprint" undefined at build time,
since they need to build it from the components at runtime.

Bug: 13340779
Change-Id: I4d74398817af22079a11c196dc6742b85d2bfb61
This commit is contained in:
Jeff Sharkey
2014-04-09 18:07:19 -07:00
parent 01c70711d5
commit 5568772e81
2 changed files with 40 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.media.AudioService;
import android.os.Build;
import android.os.Environment;
import android.os.FactoryTest;
import android.os.Handler;
@ -201,6 +202,10 @@ public final class SystemServer {
// as efficient as possible with its memory usage.
VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);
// Some devices rely on runtime fingerprint generation, so make sure
// we've defined it before booting further.
Build.ensureFingerprintProperty();
// Within the system server, it is an error to access Environment paths without
// explicitly specifying a user.
Environment.setUserRequired(true);