mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 19:31:30 +00:00
Use proper namespace for intent actions and extras.
This commit is contained in:
parent
67b97435e9
commit
ac7d410db4
6 changed files with 26 additions and 15 deletions
|
@ -40,11 +40,11 @@ import java.util.TreeSet;
|
||||||
public class FolderPickerActivity extends SyncthingActivity
|
public class FolderPickerActivity extends SyncthingActivity
|
||||||
implements AdapterView.OnItemClickListener, SyncthingService.OnApiChangeListener {
|
implements AdapterView.OnItemClickListener, SyncthingService.OnApiChangeListener {
|
||||||
|
|
||||||
private static final String TAG = "FolderPickerActivity";
|
public static final String EXTRA_INITIAL_DIRECTORY =
|
||||||
|
"com.nutomic.syncthingandroid.activities.FolderPickerActivity.INITIAL_DIRECTORY";
|
||||||
|
|
||||||
public static final String EXTRA_INITIAL_DIRECTORY = "initial_directory";
|
public static final String EXTRA_RESULT_DIRECTORY =
|
||||||
|
"com.nutomic.syncthingandroid.activities.FolderPickerActivity.RESULT_DIRECTORY";
|
||||||
public static final String EXTRA_RESULT_DIRECTORY = "result_directory";
|
|
||||||
|
|
||||||
private ListView mListView;
|
private ListView mListView;
|
||||||
|
|
||||||
|
|
|
@ -14,16 +14,20 @@ import com.nutomic.syncthingandroid.fragments.SettingsFragment;
|
||||||
*/
|
*/
|
||||||
public class SettingsActivity extends SyncthingActivity {
|
public class SettingsActivity extends SyncthingActivity {
|
||||||
|
|
||||||
public static final String ACTION_APP_SETTINGS = "app_settings_fragment";
|
public static final String ACTION_APP_SETTINGS =
|
||||||
public static final String ACTION_DEVICE_SETTINGS = "device_settings_fragment";
|
"com.nutomic.syncthingandroid.activities.SettingsActivity.APP_SETTINGS";
|
||||||
public static final String ACTION_FOLDER_SETTINGS = "folder_settings_fragment";
|
public static final String ACTION_DEVICE_SETTINGS =
|
||||||
|
"com.nutomic.syncthingandroid.activities.SettingsActivity.DEVICE_SETTINGS";
|
||||||
|
public static final String ACTION_FOLDER_SETTINGS =
|
||||||
|
"com.nutomic.syncthingandroid.activities.SettingsActivity.FOLDER_SETTINGS";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must be set for {@link #ACTION_DEVICE_SETTINGS} and
|
* Must be set for {@link #ACTION_DEVICE_SETTINGS} and
|
||||||
* {@link #ACTION_FOLDER_SETTINGS} to determine if an existing folder/device should be
|
* {@link #ACTION_FOLDER_SETTINGS} to determine if an existing folder/device should be
|
||||||
* edited or a new one created.
|
* edited or a new one created.
|
||||||
*/
|
*/
|
||||||
public static final String EXTRA_IS_CREATE = "create";
|
public static final String EXTRA_IS_CREATE =
|
||||||
|
"com.nutomic.syncthingandroid.activities.SettingsActivity.IS_CREATE";
|
||||||
|
|
||||||
private Fragment mFragment;
|
private Fragment mFragment;
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,8 @@ public class DeviceFragment extends Fragment implements
|
||||||
SyncthingService.OnApiChangeListener, RestApi.OnDeviceIdNormalizedListener,
|
SyncthingService.OnApiChangeListener, RestApi.OnDeviceIdNormalizedListener,
|
||||||
View.OnClickListener {
|
View.OnClickListener {
|
||||||
|
|
||||||
public static final String EXTRA_DEVICE_ID = "device_id";
|
public static final String EXTRA_DEVICE_ID =
|
||||||
|
"com.nutomic.syncthingandroid.fragments.DeviceFragment.DEVICE_ID";
|
||||||
|
|
||||||
private static final String TAG = "DeviceSettingsFragment";
|
private static final String TAG = "DeviceSettingsFragment";
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,11 @@ import static java.lang.String.valueOf;
|
||||||
public class FolderFragment extends Fragment
|
public class FolderFragment extends Fragment
|
||||||
implements SyncthingActivity.OnServiceConnectedListener, SyncthingService.OnApiChangeListener {
|
implements SyncthingActivity.OnServiceConnectedListener, SyncthingService.OnApiChangeListener {
|
||||||
|
|
||||||
public static final String EXTRA_FOLDER_ID = "folder_id";
|
public static final String EXTRA_FOLDER_ID =
|
||||||
|
"com.nutomic.syncthingandroid.fragments.FolderFragment.FOLDER_ID";
|
||||||
|
|
||||||
public static final String EXTRA_DEVICE_ID = "device_id";
|
public static final String EXTRA_DEVICE_ID =
|
||||||
|
"com.nutomic.syncthingandroid.fragments.FolderFragment.DEVICE_ID";
|
||||||
|
|
||||||
private static final int DIRECTORY_REQUEST_CODE = 234;
|
private static final int DIRECTORY_REQUEST_CODE = 234;
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,15 @@ public class DeviceStateHolder extends BroadcastReceiver {
|
||||||
/**
|
/**
|
||||||
* Intent extra containing a boolean saying whether wifi is connected or not.
|
* Intent extra containing a boolean saying whether wifi is connected or not.
|
||||||
*/
|
*/
|
||||||
public static final String EXTRA_HAS_WIFI = "has_wifi";
|
public static final String EXTRA_HAS_WIFI =
|
||||||
|
"com.nutomic.syncthingandroid.syncthing.DeviceStateHolder.HAS_WIFI";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intent extra containging a boolean saying whether the device is
|
* Intent extra containging a boolean saying whether the device is
|
||||||
* charging or not (any power source).
|
* charging or not (any power source).
|
||||||
*/
|
*/
|
||||||
public static final String EXTRA_IS_CHARGING = "is_charging";
|
public static final String EXTRA_IS_CHARGING =
|
||||||
|
"com.nutomic.syncthingandroid.syncthing.DeviceStateHolder.IS_CHARGING";
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
|
|
|
@ -50,12 +50,14 @@ public class SyncthingService extends Service implements
|
||||||
/**
|
/**
|
||||||
* Intent action to perform a Syncthing restart.
|
* Intent action to perform a Syncthing restart.
|
||||||
*/
|
*/
|
||||||
public static final String ACTION_RESTART = "restart";
|
public static final String ACTION_RESTART =
|
||||||
|
"com.nutomic.syncthingandroid.service.SyncthingService.RESTART";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intent action to reset Syncthing's database.
|
* Intent action to reset Syncthing's database.
|
||||||
*/
|
*/
|
||||||
public static final String ACTION_RESET = "reset";
|
public static final String ACTION_RESET =
|
||||||
|
"com.nutomic.syncthingandroid.service.SyncthingService.RESET";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue