mirror of https://github.com/perkeep/perkeep.git
Merge branch 'master' of danga.com:camlistore
This commit is contained in:
commit
8c65f36662
|
@ -23,6 +23,7 @@ public class CamliActivity extends Activity {
|
|||
private static final String TAG = "CamliActivity";
|
||||
private static final int MENU_SETTINGS = 1;
|
||||
private static final int MENU_STOP = 2;
|
||||
private static final int MENU_UPLOAD_ALL = 3;
|
||||
|
||||
private IUploadService mServiceStub = null;
|
||||
private IStatusCallback mCallback = null;
|
||||
|
@ -181,6 +182,7 @@ public class CamliActivity extends Activity {
|
|||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
super.onCreateOptionsMenu(menu);
|
||||
menu.add(Menu.NONE, MENU_UPLOAD_ALL, 0, "Upload All");
|
||||
menu.add(Menu.NONE, MENU_STOP, 0, "Stop");
|
||||
menu.add(Menu.NONE, MENU_SETTINGS, 0, "Settings");
|
||||
return true;
|
||||
|
@ -201,6 +203,13 @@ public class CamliActivity extends Activity {
|
|||
case MENU_SETTINGS:
|
||||
SettingsActivity.show(this);
|
||||
break;
|
||||
case MENU_UPLOAD_ALL:
|
||||
Intent uploadAll = new Intent(UploadService.INTENT_UPLOAD_ALL);
|
||||
uploadAll.setClass(this, UploadService.class);
|
||||
Log.d(TAG, "Starting upload all...");
|
||||
startService(uploadAll);
|
||||
Log.d(TAG, "Back from upload all...");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ public class UploadService extends Service {
|
|||
|
||||
public static final String INTENT_POWER_CONNECTED = "POWER_CONNECTED";
|
||||
public static final String INTENT_POWER_DISCONNECTED = "POWER_DISCONNECTED";
|
||||
public static final String INTENT_UPLOAD_ALL = "UPLOAD_ALL";
|
||||
|
||||
// Everything in this block guarded by 'this':
|
||||
private boolean mUploading = false; // user's desired state (notified
|
||||
|
|
Loading…
Reference in New Issue