SHOW:
|
|
- or go back to the newest paste.
1 | package com.android.server; | |
2 | ||
3 | import android.content.BroadcastReceiver; | |
4 | import android.content.Context; | |
5 | import android.content.Intent; | |
6 | import android.os.RecoverySystem; | |
7 | import android.util.Log; | |
8 | import android.util.Slog; | |
9 | import java.io.IOException; | |
10 | ||
11 | public class MasterClearReceiver extends BroadcastReceiver | |
12 | { | |
13 | private static final String TAG = "MasterClear"; | |
14 | ||
15 | public void onReceive(Context paramContext, Intent paramIntent) | |
16 | { | |
17 | if (paramIntent.getAction().equals("com.google.android.c2dm.intent.RECEIVE")) | |
18 | { | |
19 | String str = paramIntent.getStringExtra("from"); | |
20 | if (!"google.com".equals(str)) | |
21 | int i = Slog.w("MasterClear", "Ignoring master clear request -- not from trusted server."); | |
22 | } | |
23 | while (true) | |
24 | { | |
25 | return; | |
26 | try | |
27 | { | |
28 | int j = Slog.w("MasterClear", "!!! FACTORY RESET !!!"); | |
29 | RecoverySystem.rebootWipeUserData(paramContext); | |
30 | int k = Log.wtf("MasterClear", "Still running after master clear?!"); | |
31 | } | |
32 | catch (IOException localIOException) | |
33 | { | |
34 | int m = Slog.e("MasterClear", "Can't perform master clear/factory reset", localIOException); | |
35 | } | |
36 | } | |
37 | } | |
38 | } | |
39 |