7 Commits

Author SHA1 Message Date
Makoto Onuki
75ad2496eb AppStandby exemption: sync requested by FG apps
Bug: 72443754
Fix: 72443754

Test: atest ${ANDROID_BUILD_TOP}/frameworks/base/services/tests/servicestests/src/com/android/server/content/SyncOperationTest.java
Test: Manual test with contacts sync:

Precondition: Put the contacts sync in RARE bucket.

adb shell dumpsys deviceidle tempwhitelist -r com.google.android.syncadapters.contacts
adb shell am make-uid-idle com.google.android.syncadapters.contacts
adb shell am set-standby-bucket com.google.android.syncadapters.contacts 40

Test 1: Toggle contacts sync from the Settings -> Account

- Make sure a sync happens.

Test 2: Mutate a contact on the WEB

- Sync is scheduled, but won't run because it has no network access.
- am set-standby-bucket com.google.android.syncadapters.contacts 30
- Sync run runs.

Test 3. adb shell requestsync -n ACCOUNT -t com.google -a com.android.contacts

- Sync is scheduled but won't run.

Test 4. adb shell requestsync -n ACCOUNT -t com.google -a com.android.contacts -f

- Sync is scheduled but it still won't run.

Test 5. adb shell requestsync -n ACCOUNT -t com.google -a com.android.contacts -F

- Sync now runs

Change-Id: I1eb972ed321d2a1a782ae23ccb806671926d3e6b
2018-03-29 14:53:02 -07:00
Makoto Onuki
61283ecc7f Exempt sync requests by FG app from app-standby
Test: manual test with request sync, etc
Bug: 72443754
Change-Id: Iecf2d3a8c54451324a02ca2762bda72aa219bd92
2018-02-02 16:40:25 -08:00
George Burgess IV
4037fe04d2 Merge "cmds: add #!s" am: 8911c35df3
am: 2c61e3de27

Change-Id: Ifb1e12b63312570b5451b0e548adf0a5d25c4010
2017-11-06 23:45:01 +00:00
George Burgess IV
6c1688850e cmds: add #!s
Without this, exec()ing these fails.

Found with `grep -L bin/sh $(grep -Rl Script)`

Bug: None
Test: exec()ed each of these scripts; I no longer get "exec format
error" for any of them.
Change-Id: I47db5007e5cc14ab91eb846b7bffecb925d37874
2017-11-05 01:07:30 -07:00
Makoto Onuki
4a7554afc6 Add periodic sync support to requestsync.
Test: manual test
Change-Id: Ie53249de5e9c5e53bdf87cb9f78745c994bc34e6
2017-06-08 17:12:05 -07:00
Tobias Thierer
28532d0026 frameworks/base: Avoid Long object allocations in Long.valueOf()
Replace usages where the Long is immediately unboxed or thrown
away with Long.parseLong().
In TaskRecord.java, I also fixed up similar uses of
{Boolean,Integer}.valueOf()

Tested: built frameworks/base successfully.

Bug: 28289401
(cherry picked from commit 4bd017d6a5437f153b2b0a149a5dde0b85bf6907)

Change-Id: Icfa4708946e774f4a1bacf185c3fd11a7087017e
2016-04-22 13:36:53 +01:00
Alon Albert
e1c4a0b31b New command to request a sync
Change-Id: I523e8ff4814940197d0b9a362a3920e69feae6fd
2012-01-13 10:19:24 -08:00