History log of /frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f7e9a8de361bbc8eb854fc83ff566033c8e75277 19-May-2018 Rahul Ravikumar <rahulrav@google.com> Removes the lock contention on CommandHandler#onExecuted().

- If there were too many workers completing work at the same time,
there would be a lot of lock contention on the main thread because
WorkerWrapper calls onExecuted() on the main thread.

- To solve this, we offload the handling of onExecuted() to the
command processor queue.

```
DALVIK THREADS (65):
"main" prio=5 tid=1 Blocked
| group="main" sCount=1 dsCount=0 obj=0x740c9000 self=0xb4025800
| sysTid=14462 nice=0 cgrp=default sched=0/0 handle=0xb77e2ea0
| state=S schedstat=( 0 0 0 ) utm=22 stm=51 core=3 HZ=100
| stack=0xbf4f1000-0xbf4f3000 stackSize=8MB
| held mutexes=
at androidx.work.impl.background.systemalarm.CommandHandler.onExecuted(CommandHandler.java:111)
- waiting to lock <0x05d42e2d> (a java.lang.Object) held by thread 34
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.onExecuted(SystemAlarmDispatcher.java:101)
at androidx.work.impl.Processor.onExecuted(Processor.java:186)
- locked <0x05378f62> (a androidx.work.impl.Processor)
at androidx.work.impl.WorkerWrapper$1.run(WorkerWrapper.java:218)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke!(Native method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
```

Test: Updated unit tests, added integration tests.

Change-Id: Ib58047e603b95e50872d0171d8fa2fbced467230
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
850226438f7ff51724f86cc7cc1c5c03afe91399 15-May-2018 Rahul Ravikumar <rahulrav@google.com> Fixes a bug in ForceStopRunnable, Schedulers which causes workers to be rescheduled.

- ForceStopRunnable now creates alarms for a designated receiver.
- WorkSpecDao ensures eligible WorkSpecs have not been marked scheduled.
- Update WorkSpecDaoTests & SystemAlarmDispatcherTests.

Fixes: b/79660657, b/79497378
Test: Updated unit tests & integration test app.

Change-Id: I23b17acafbac843b71b2b73d3755ade2404e4bd0
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
62a7e773945d980084dfc5d00c724de2e27dc22d 24-Apr-2018 Sumir Kataria <sumir@google.com> Change WorkRequest.Builder to use set.

Also, make getThis package-private
(otherwise you have to put @hide on
each overridden version).

Test: Ran tests.
Change-Id: I270ff8bd86b2de404e1e7e3229943947930734e6
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
7031a0fbe12b8159ab2dc6d9c50be5b3f38477fa 19-Apr-2018 Rahul Ravikumar <rahulrav@google.com> Rename BaseWorkRequest to WorkRequest, and WorkRequest to OneTimeWorkRequest.

- API council feedback.


Test: All unit tests continue to pass.
Fixes: b/78287721
Change-Id: Ifc00fc74cf9c42aeb44c3f4cb3244b5d445b8d0d
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
697d6a4a3797bc71d0dd8685937a318e9934066b 17-Apr-2018 Rahul Ravikumar <rahulrav@google.com> Use the standard Android (android.util.Log) logger.

- Rename Logger to InternalLogger so we can start adding internal only
logs.
- Remove redundant logs in AlarmManager based implementation.

Test: Existing tests pass.
Change-Id: I44babc42dafbce0311f439ffaca6bf40fc058be0
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
8b3284fa4a62568df91f706b0b2334284794008f 13-Apr-2018 Sumir Kataria <sumir@google.com> Change *Work -> *WorkRequest.

Test: Ran tests.
Change-Id: Ice89bfb633105ab2b60e2d5a83cdf11e92595553
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
c7077ec99a2bf4884a6e4f297398eb3f6df83d6f 30-Mar-2018 Rahul Ravikumar <rahulrav@google.com> Add WorkManagerInitializer that initializes WorkManager.

- This fixes the problem where force stopped workers are not rescheduled
until we get a call to WorkManager.getInstance(context).

Test: Unit tests pass.
Change-Id: I4592d791636295c5d04361eb4087053ec4c14eb2
Fixes: b/74444877
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
64e6bd86c786f1cb1b0c3dbc2b5307cca5c0d1f6 29-Mar-2018 Sumir Kataria <sumir@google.com> Rename Arguments to Data.

- Rename setOutput to setOutputData
- Rename BaseWork.Builder.withArguments to withInputData.

Change-Id: Idf490663c9639b9a90d0327d7f164534b0a0b2a4
Fixes: 76438322
Test: Updated and ran tests.
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
f4ae2b7ec2f6d21ac6a7ee974fa363049ba6d12e 06-Mar-2018 Sumir Kataria <sumir@google.com> Add TimeUnits to all time-related args.

Test: Updated and ran tests.
Change-Id: I4ec8baceb0e8b8291ed8526eb68c474dac1d4a38
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
df55ec7f797caa24839ed110d7a53135b7d17b0e 21-Feb-2018 Sumir Kataria <sumir@google.com> Remove PruneDatabase.

Test: Updated and ran tests.

Change-Id: I0666da36a7957161ff960e00c832b1d2406af384
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
515ed7401d62081fb2cdd34fc8df325ed8943719 20-Feb-2018 Sumir Kataria <sumir@google.com> Change getInstance() to getInstance(Context).

This removes the ContentProvider-initialized singleton in the
manifest. In general, we are prioritizing faster startup over
the marginal readability improvement. There was some concern
in previous Googler studies about "which context", "will it
be cached and scoped to this lifecycle", etc. We believe that
the documentation is sufficiently clear on this. In addition,
this follows a common pattern in Android apps.

Test: Updated and ran tests.

Change-Id: I5f24724934ed1e16bddb0d9906326ad2e54e398d
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
63badf37a3725ee242eb6690b438f869dd72891a 20-Feb-2018 Rahul Ravikumar <rahulrav@google.com> Merge "Add more test cases to background integration tests Test: Manual test cases run" into flatfoot-background
587711f9d58878042a4f1ba399bd428be55d2314 20-Feb-2018 Sumir Kataria <sumir@google.com> Mark content uri methods as @RequiresApi(24).

Test: ran tests.
Change-Id: I83f4908b19221ff064aa04c7be8f546fb31e1757
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
7950c89f5640eb1218c1fdc7456eb68cd1dc7c5f 16-Feb-2018 Rahul Ravikumar <rahulrav@google.com> Add more test cases to background integration tests
Test: Manual test cases run

Change-Id: I9ee11bcf445e2454d6c83245bd3a1acec6d9cccc
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
188b6fb0e5da3723f28c23289b5b55086210e82c 16-Feb-2018 Sumir Kataria <sumir@google.com> Rename directories and references from background -> work.

Test: Ran tests.

Change-Id: Ibde6b2f3c7ecbc2490d4225418a1e24119e4a72a
/frameworks/support/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java