Android Studio automatic cleanup
This commit is contained in:
parent
553f064ce0
commit
89ef74f95b
2 changed files with 65 additions and 89 deletions
|
|
@ -28,20 +28,7 @@ public class BInstallerActivity extends Activity {
|
|||
private PowerManager mPowerManager;
|
||||
private WakeLock mWakeLock;
|
||||
private DownloadReceiver myReceiver;
|
||||
|
||||
|
||||
public class DownloadReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.hasExtra("txt")) {
|
||||
String txt = intent.getStringExtra("txt");
|
||||
boolean ready = intent.getBooleanExtra("ready", false);
|
||||
mBInstallerView.setState(txt, ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final Set<Integer> dialogIds = new HashSet<Integer>();
|
||||
|
||||
/**
|
||||
* Called when the activity is first created.
|
||||
|
|
@ -132,8 +119,6 @@ public class BInstallerActivity extends Activity {
|
|||
showDialog(DIALOG_CONFIRM_DELETE_ID);
|
||||
}
|
||||
|
||||
private Set<Integer> dialogIds = new HashSet<Integer>();
|
||||
|
||||
private void showNewDialog(int id) {
|
||||
if (dialogIds.contains(Integer.valueOf(id))) {
|
||||
removeDialog(id);
|
||||
|
|
@ -142,6 +127,18 @@ public class BInstallerActivity extends Activity {
|
|||
showDialog(id);
|
||||
}
|
||||
|
||||
public class DownloadReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.hasExtra("txt")) {
|
||||
String txt = intent.getStringExtra("txt");
|
||||
boolean ready = intent.getBooleanExtra("ready", false);
|
||||
mBInstallerView.setState(txt, ready);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static public long getAvailableSpace(String baseDir) {
|
||||
StatFs stat = new StatFs(baseDir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue