diff options
Diffstat (limited to 'core/java/android/os')
-rw-r--r-- | core/java/android/os/BatteryStats.java | 1 | ||||
-rw-r--r-- | core/java/android/os/Looper.java | 3 | ||||
-rw-r--r-- | core/java/android/os/Process.java | 2 | ||||
-rw-r--r-- | core/java/android/os/RecoverySystem.java | 25 |
4 files changed, 23 insertions, 8 deletions
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index 90e2e79..1d6bc4e 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -1883,7 +1883,6 @@ public abstract class BatteryStats implements Parcelable { final int NU = uidStats.size(); boolean didPid = false; long nowRealtime = SystemClock.elapsedRealtime(); - StringBuilder sb = new StringBuilder(64); for (int i=0; i<NU; i++) { Uid uid = uidStats.valueAt(i); SparseArray<? extends Uid.Pid> pids = uid.getPidStats(); diff --git a/core/java/android/os/Looper.java b/core/java/android/os/Looper.java index 8204e3c..ccf642c 100644 --- a/core/java/android/os/Looper.java +++ b/core/java/android/os/Looper.java @@ -141,7 +141,8 @@ public class Looper { Log.wtf("Looper", "Thread identity changed from 0x" + Long.toHexString(ident) + " to 0x" + Long.toHexString(newIdent) + " while dispatching to " - + msg.target + " " + msg.callback + " what=" + msg.what); + + msg.target.getClass().getName() + " " + + msg.callback + " what=" + msg.what); } msg.recycle(); diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 0c6ab9e..2bfada0 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -95,7 +95,7 @@ public class Process { * Defines the UID/GID for the NFC service process. * @hide */ - public static final int NFC_UID = 1022; + public static final int NFC_UID = 1025; /** * Defines the GID for the group that allows write access to the internal media storage. diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java index 4991914..c1dd911 100644 --- a/core/java/android/os/RecoverySystem.java +++ b/core/java/android/os/RecoverySystem.java @@ -16,6 +16,11 @@ package android.os; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.util.Log; + import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileNotFoundException; @@ -37,9 +42,6 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import android.content.Context; -import android.util.Log; - import org.apache.harmony.security.asn1.BerInputStream; import org.apache.harmony.security.pkcs7.ContentInfo; import org.apache.harmony.security.pkcs7.SignedData; @@ -336,8 +338,21 @@ public class RecoverySystem { * @throws IOException if writing the recovery command file * fails, or if the reboot itself fails. */ - public static void rebootWipeUserData(Context context) - throws IOException { + public static void rebootWipeUserData(Context context) throws IOException { + final ConditionVariable condition = new ConditionVariable(); + + Intent intent = new Intent("android.intent.action.MASTER_CLEAR_NOTIFICATION"); + context.sendOrderedBroadcast(intent, android.Manifest.permission.MASTER_CLEAR, + new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + condition.open(); + } + }, null, 0, null, null); + + // Block until the ordered broadcast has completed. + condition.block(); + bootCommand(context, "--wipe_data"); } |