Commit Graph

13365 Commits

Author SHA1 Message Date
Lorenzo Colitti
ce3e4d5676 Merge "Allow applications to query for foreground/background data usage." into pi-dev am: 3cafea0701
am: a232ae53bc

Change-Id: I324e6d67db28e6076f1d422bb15d0b5190a9a6c3
2018-04-02 22:20:43 -07:00
Dianne Hackborn
913599854a Merge "Work on issue #74404949: Screen state usage API" into pi-dev am: 886fc6aef0
am: b45bc522f6

Change-Id: If566b8baf8367f31d0f8dc1107c547cc9ee11913
2018-04-02 19:50:56 -07:00
Felipe Leme
3879ec3502 Merge "Don't use a copy of window params when showing a dialog." into pi-dev am: 3f6b7714a7
am: 558e9116fb

Change-Id: I2c5822125c734fbf5d11465fb5b59368094d3f76
2018-04-02 18:22:37 -07:00
Andrii Kulian
b5be07ba3d Merge "Don't finish activity on duplicate resume request" into pi-dev am: 38af02e75b
am: 4f632a306f

Change-Id: I016967a65cbbce525088d3c008d5bb311dc69d83
2018-04-02 18:03:36 -07:00
Lorenzo Colitti
3cafea0701 Merge "Allow applications to query for foreground/background data usage." into pi-dev 2018-04-02 22:20:03 +00:00
Dianne Hackborn
886fc6aef0 Merge "Work on issue #74404949: Screen state usage API" into pi-dev 2018-04-02 20:48:51 +00:00
Dianne Hackborn
4753f377c2 Merge "Fix issue #77230164: Add app op to control foreground services" into pi-dev am: 21306849e6
am: 1eec82353c

Change-Id: Id62ee94ade97b55eb088a0ff8abf2ce0b994ef68
2018-04-02 20:39:22 +00:00
TreeHugger Robot
3f6b7714a7 Merge "Don't use a copy of window params when showing a dialog." into pi-dev 2018-04-02 19:22:58 +00:00
Andrii Kulian
38af02e75b Merge "Don't finish activity on duplicate resume request" into pi-dev 2018-04-02 17:58:42 +00:00
Felipe Leme
15d403dd6a Don't use a copy of window params when showing a dialog.
When a Dialog's show() method is called, it makes a copy (l) of its window param
and change the copy's softInputMode before calling wm.addView(). This call ends
up calling WindowManagerGlobal.addView(view, l, display, parentWindow),
which in turn sets the application token from the parentWindow into l and stores
l on its mParams map.

Later, when the dialog layout is changed (for example, if it's resized), the
original params ends up passed to WindowManagerGlobal.updateViewLayout(),
which in turn updates it's internal mParams with it, hence losing the
application token (as the token was set in the copy).

Then, when Autofill (and possibly Assist) is triggered to that activity, the
Dialog's view hierarchy is ignored because WindowManagerGlobal.getRootViews()
ignores views whose params do not have an application token.

This CL fixes this issue by passing the original dialog's param to the wm
method and resetting the softInputMode that was changed, rather than making a
copy.

Test: atest DialogLauncherActivityTest
Test: manual verification with Twitch

Fixes: 68816440

Change-Id: I55f510ab7a44030bc368221b7db1a221bc2e09c8
2018-04-02 10:07:40 -07:00
Lorenzo Colitti
84b317cecf Allow applications to query for foreground/background data usage.
Currently the NetworkStatsManager APIs allow applications to
query for their own data usage by UID and tag, but do not allow
applications to query by foreground/background state.

This is causing popular apps to resort to parsing xt_qtaguid
stats files directly. Because this is no longer allowed for apps
targeting P and above, provide replacement functionality.

This API allows apps to query for data usage for a given state,
but not to receive data usage broken down by state. This is
consistent with how the current UID and tag APIs work. It is also
not an undue burden on apps: there are currently only two states
of interest (FOREGROUND and everything else), and even if we add
states in the future, unmodified apps can still obtain total
traffic using STATE_ALL.

Bug: 72977484
Test: New CTS test added in other change in this topic.
Change-Id: Ic8c9194569ffd599b49e4a8197c5c2ea0ec3f7f7
2018-04-02 19:58:24 +09:00
Dianne Hackborn
21306849e6 Merge "Fix issue #77230164: Add app op to control foreground services" into pi-dev 2018-04-01 22:26:18 +00:00
Mady Mellor
78c1a8a290 Merge "Add subtype for layout direction to Slice" into pi-dev am: 703f31db63
am: dbbffe3948

Change-Id: I1a2a30b9c026dbfe2b99d875f77cabf72a49d53c
2018-03-31 09:51:14 +00:00
Jason Monk
dbc61bc03d Merge "Add some methods to manage slice permissios" into pi-dev am: 35201a6af2
am: 69acc65a37

Change-Id: I97df11f64b66684d73b47cc22e95aa5b4a7ede3e
2018-03-31 06:40:18 +00:00
TreeHugger Robot
703f31db63 Merge "Add subtype for layout direction to Slice" into pi-dev 2018-03-31 04:16:35 +00:00
Jason Monk
7a8127f121 Merge "Add auto-grant permission slice API" into pi-dev am: 4ced90cb12
am: 650287c699

Change-Id: I1dc8ccfc76c70eb5b019eecd2cd84e7192bd5ff0
2018-03-31 00:53:32 +00:00
Dianne Hackborn
3378aa9f88 Work on issue #74404949: Screen state usage API
Add events for the keyguard being shown and hidden.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents
Change-Id: I038e03cf4ba80669d7d17c3d66b98ee81050abc8
2018-03-30 17:43:49 -07:00
TreeHugger Robot
35201a6af2 Merge "Add some methods to manage slice permissios" into pi-dev 2018-03-31 00:26:06 +00:00
Jason Monk
936d5eaf21 Merge "Add more AppComponentFactory docs" into pi-dev am: 7790a2f2d1
am: 6c85b2babc

Change-Id: I688e2f2bce0876475da456cca0402825d935173e
2018-03-30 22:15:09 +00:00
Mady Mellor
209af08eca Add subtype for layout direction to Slice
Test: make
Bug: 73123366
Change-Id: I1446dadd8a50e7682d640aa55a7d4a20faf52416
2018-03-30 14:24:13 -07:00
Dianne Hackborn
e9d9b4b9a2 Fix issue #77230164: Add app op to control foreground services
New app op added.

Bug: 77230164
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest\#testForegroundServiceAppOp
Change-Id: I59f2f03850da4b9f5550e82ba28f175e4779e783
2018-03-30 13:10:54 -07:00
Jason Monk
6e5799d9c8 Merge "Slices: Fix up some formatting and add examples" into pi-dev am: ea3377b4d4
am: e7c23d8ddb

Change-Id: If8245a3f80c2a7ff2d406f6b5bde7d6626563c22
2018-03-30 20:07:42 +00:00
TreeHugger Robot
4ced90cb12 Merge "Add auto-grant permission slice API" into pi-dev 2018-03-30 18:45:00 +00:00
Jason Monk
71888552d8 Add some methods to manage slice permissios
Test: update-api
Bug: 77323760
Change-Id: I72284957c7dfc3bcf12bb24a6be4902762e95fed
2018-03-30 14:29:38 -04:00
Rubin Xu
f24d22c1e0 Merge "Remove password blacklist API" into pi-dev am: 69196f6fad
am: 73ebccace2

Change-Id: I785df4a0158c62a358c0f1d1cff95eb2e75d91fc
2018-03-30 18:23:44 +00:00
TreeHugger Robot
7790a2f2d1 Merge "Add more AppComponentFactory docs" into pi-dev 2018-03-30 17:08:23 +00:00
Jason Monk
42e03f8756 Add auto-grant permission slice API
Test: slice manager tests
Bug: 77313888
Change-Id: I21e9200c5c8cd7ff812d3f5eac997a704a9b86a2
2018-03-30 11:39:36 -04:00
Makoto Onuki
c2b812647c Merge "AppStandby exemption: sync requested by FG apps" into pi-dev am: 929ce0086a
am: b819348712

Change-Id: I3efc9b914a4654d77f6a17033bb88c45a7f28a1b
2018-03-30 15:30:20 +00:00
Erik Wolsheimer
fbf842dc91 Merge "Return PERMISSION_DENIED instead of NPE when missing ActivityManager" into pi-dev am: dedc5d7141
am: d1981d6fb6

Change-Id: I8213e9dcf2103e48cc3f8013ddde3ca63f804564
2018-03-30 15:25:44 +00:00
TreeHugger Robot
ea3377b4d4 Merge "Slices: Fix up some formatting and add examples" into pi-dev 2018-03-30 15:09:26 +00:00
Makoto Onuki
b819348712 Merge "AppStandby exemption: sync requested by FG apps" into pi-dev
am: 929ce0086a

Change-Id: If4d60cefecf3a469ce9a7fbb2690f5120f77b858
2018-03-30 14:48:06 +00:00
Erik Wolsheimer
d1981d6fb6 Merge "Return PERMISSION_DENIED instead of NPE when missing ActivityManager" into pi-dev
am: dedc5d7141

Change-Id: I1515bf52b3561e7ce2c66adb8a4a9f87f0e012c7
2018-03-30 14:43:17 +00:00
Jason Monk
c138696489 Add more AppComponentFactory docs
Test: TH
Change-Id: I9978d182433a71a04d019304ebe59bd7de8bfeae
Fixes: 74408467
2018-03-30 09:57:36 -04:00
Rubin Xu
69196f6fad Merge "Remove password blacklist API" into pi-dev 2018-03-30 13:38:31 +00:00
Julia Reynolds
a7336274d7 Merge changes I3e542532,Id8f2147f into pi-dev am: 68256e09d9
am: 9472db8d0d

Change-Id: I72b6c1ccd2611b7327f202ae6912d7e56f560d1d
2018-03-30 11:27:50 +00:00
Julia Reynolds
9472db8d0d Merge changes I3e542532,Id8f2147f into pi-dev
am: 68256e09d9

Change-Id: Iffa80c2254d25336d52c0f502b4c050c9c448581
2018-03-30 10:54:11 +00:00
Remi NGUYEN VAN
bd2c0fa813 Merge "Allow null subscriberId in NetworkStatsManager." into pi-dev 2018-03-30 07:39:23 +00:00
Remi NGUYEN VAN
786b7ad260 Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I8296220472a9ba37044dd1a5ede9bdb45d3ed339
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
Merged-In: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
Merged-In: Ia84d2c7cc63bf8b8bf30f133e0382fd7103bf490
(cherry-picked from aosp I4b39e7031416cb33b23d89aa36ff0f774eaa942f)
2018-03-30 12:18:23 +09:00
TreeHugger Robot
929ce0086a Merge "AppStandby exemption: sync requested by FG apps" into pi-dev 2018-03-30 01:26:35 +00:00
TreeHugger Robot
dedc5d7141 Merge "Return PERMISSION_DENIED instead of NPE when missing ActivityManager" into pi-dev 2018-03-30 01:26:27 +00:00
yuemingw
c4eec5e09b Merge "Merge "Allow PO to call setSystemSetting." into pi-dev am: 04446f9f68" into pi-dev-plus-aosp
am: 07d5ba249c

Change-Id: Ia058b8d9d08b5874a7be97a3813de932df679b4a
2018-03-30 01:13:13 +00:00
TreeHugger Robot
68256e09d9 Merge changes I3e542532,Id8f2147f into pi-dev
* changes:
  Update notification blocking documentation.
  Wait before computing contact affinity
2018-03-30 00:10:22 +00:00
Andrii Kulian
d9e2acba96 Don't finish activity on duplicate resume request
With ActivityLifecycler infrastructure duplicate resume situations
are limited to double-relaunch scenario and there shouldn't be any
incorrect resume requests. This means that there shouldn't be any
reasons to finish activity when trying to resume it.

Bug: 77240441
Test: android.app.activity.ActivityThreadTest
Change-Id: I70a3fcbff72954ff673b2020be3134be367cd823
2018-03-29 17:00:05 -07:00
Mady Mellor
26c60bd567 Merge "Add permission hint, update permission slice structure" into pi-dev am: 92006c1764
am: fc124567dd

Change-Id: Ibe672c83e4731a01e44d821ad209a4a8864fef42
2018-03-29 23:44:57 +00:00
Erik Wolsheimer
e21576fd28 Return PERMISSION_DENIED instead of NPE when missing ActivityManager
Bug: 75005160
Change-Id: I710c5ee9f3d679240bf708102ef508041d0a3122
2018-03-29 23:34:10 +00:00
yuemingw
c915a909b7 Merge "Allow PO to call setSystemSetting." into pi-dev
am: 04446f9f68

Change-Id: Ib0fe1542e76c862a5b6c1f7652dd5d5ded29b122
2018-03-29 23:32:18 +00:00
TreeHugger Robot
04446f9f68 Merge "Allow PO to call setSystemSetting." into pi-dev 2018-03-29 22:24:25 +00:00
Mady Mellor
fc124567dd Merge "Add permission hint, update permission slice structure" into pi-dev
am: 92006c1764

Change-Id: I3c0a31b24fa9e37b5a5bee384578ac4ad2c4ed9f
2018-03-29 22:22:51 +00:00
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
TreeHugger Robot
92006c1764 Merge "Add permission hint, update permission slice structure" into pi-dev 2018-03-29 21:29:07 +00:00