summaryrefslogtreecommitdiffstats
path: root/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java
diff options
context:
space:
mode:
authorMatthew Williams <mjwilliams@google.com>2014-08-21 13:47:47 -0700
committerMatthew Williams <mjwilliams@google.com>2014-08-21 20:28:12 -0700
commit9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b (patch)
tree9091f11de601187a418a60d579035a2edeb3a33d /tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java
parentbfecd904bf0ea8875caaaaafa5e3ae8c44b5175f (diff)
downloadframeworks_base-9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b.zip
frameworks_base-9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b.tar.gz
frameworks_base-9ae3dbeefcd6bc139c74bfe3d51de823e3be4b4b.tar.bz2
JobScheduler only run jobs for started users.
BUG: 12876556 Minor changes to test app to make persisting an option. Change-Id: I1b40347878ec5ca44cd717ebfeb544f6c58473b5
Diffstat (limited to 'tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java')
-rw-r--r--tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java b/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java
index e15929d..6e5484e 100644
--- a/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java
+++ b/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java
@@ -65,6 +65,8 @@ public class MainActivity extends Activity {
mAnyConnectivityRadioButton = (RadioButton) findViewById(R.id.checkbox_any);
mRequiresChargingCheckBox = (CheckBox) findViewById(R.id.checkbox_charging);
mRequiresIdleCheckbox = (CheckBox) findViewById(R.id.checkbox_idle);
+ mIsPersistedCheckbox = (CheckBox) findViewById(R.id.checkbox_persisted);
+
mServiceComponent = new ComponentName(this, TestJobService.class);
// Start service and provide it a way to communicate with us.
Intent startServiceIntent = new Intent(this, TestJobService.class);
@@ -85,6 +87,7 @@ public class MainActivity extends Activity {
RadioButton mAnyConnectivityRadioButton;
CheckBox mRequiresChargingCheckBox;
CheckBox mRequiresIdleCheckbox;
+ CheckBox mIsPersistedCheckbox;
ComponentName mServiceComponent;
/** Service object to interact scheduled jobs. */
@@ -146,7 +149,7 @@ public class MainActivity extends Activity {
}
builder.setRequiresDeviceIdle(mRequiresIdleCheckbox.isChecked());
builder.setRequiresCharging(mRequiresChargingCheckBox.isChecked());
-
+ builder.setIsPersisted(mIsPersistedCheckbox.isChecked());
mTestService.scheduleJob(builder.build());
}