diff options
author | Matthew Williams <mjwilliams@google.com> | 2014-08-22 14:15:28 -0700 |
---|---|---|
committer | Matthew Williams <mjwilliams@google.com> | 2014-08-22 16:08:45 -0700 |
commit | d1c06753d045ad10e00e7aba53ee2adba0712ccc (patch) | |
tree | 6a1103dfcc0b6db0dfc030aba6cdb4961e2a91c2 /tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp | |
parent | acb570cd84b4e3503e7e96138ea0d9d236ca9b9e (diff) | |
download | frameworks_base-d1c06753d045ad10e00e7aba53ee2adba0712ccc.zip frameworks_base-d1c06753d045ad10e00e7aba53ee2adba0712ccc.tar.gz frameworks_base-d1c06753d045ad10e00e7aba53ee2adba0712ccc.tar.bz2 |
Implement API review feedback for JobScheduler
BUG: 17005336
Took the opportunity to clean up some back-off logic
Change-Id: Ibc8ae34d1d44dd064ba071e4cbad17872f7e38cf
Diffstat (limited to 'tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp')
-rw-r--r-- | tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java b/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java index 6e5484e..b9a2a7e 100644 --- a/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java +++ b/tests/JobSchedulerTestApp/src/com/android/demo/jobSchedulerApp/MainActivity.java @@ -143,13 +143,13 @@ public class MainActivity extends Activity { boolean requiresUnmetered = mWiFiConnectivityRadioButton.isChecked(); boolean requiresAnyConnectivity = mAnyConnectivityRadioButton.isChecked(); if (requiresUnmetered) { - builder.setRequiredNetworkCapabilities(JobInfo.NetworkType.UNMETERED); + builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED); } else if (requiresAnyConnectivity) { - builder.setRequiredNetworkCapabilities(JobInfo.NetworkType.ANY); + builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY); } builder.setRequiresDeviceIdle(mRequiresIdleCheckbox.isChecked()); builder.setRequiresCharging(mRequiresChargingCheckBox.isChecked()); - builder.setIsPersisted(mIsPersistedCheckbox.isChecked()); + builder.setPersisted(mIsPersistedCheckbox.isChecked()); mTestService.scheduleJob(builder.build()); } |