Commit Graph

11014 Commits

Author SHA1 Message Date
TreeHugger Robot
bd355dbf58 Merge "Make sure apps cannot forge package name on AssistStructure used for Autofill." into oc-dev 2017-12-08 18:16:24 +00:00
Felipe Leme
9ad2900630 Make sure apps cannot forge package name on AssistStructure used for Autofill.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.VirtualContainerActivityTest#testAppCannotFakePackageName
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 69981710

Change-Id: Id6036cddb51dd8dd0c9128b7212d573f630d693f
Merged-In: Id6036cddb51dd8dd0c9128b7212d573f630d693f
2017-12-06 16:54:32 -08:00
Jonathan Dormody
35719399cb Docs: Fixed a typo by changing "retu rn" to "return"
Test: make ds-docs

Bug: 32830129
Change-Id: I86b359c2cf65fbd3c9d50569bf81fd669111055e
2017-11-09 16:57:42 -07:00
Baligh Uddin
230c78cec5 DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
Bug: 64864568

This reverts commit fd35d7c0a2, reversing
changes made to 07a21754f4.
2017-08-19 15:49:05 -07:00
Cindy Kuang
edc2f84df2 docs: updated link on RemoteInput page
Test: make ds-docs

Bug: 64613641
Change-Id: Ie3e451a15ad1fcde63c0301aaa328793af114780
2017-08-16 10:01:26 -07:00
Andrew Solovay
09289b5d7b Merge "docs: Noted that JobIntentService is usually a better choice" into oc-dev
am: d71cc3b72e

Change-Id: I348e71eac5076b37ca50fa1d4cf87afd9890eb2a
2017-08-01 21:20:59 +00:00
Andrew Solovay
494f1a4dfa docs: Noted that JobIntentService is usually a better choice
Since IntentService is subject to the O background restrictions,
most devs are better off switching to the new JobIntentService.
(I assume IntentService is not actually deprecated; if it is, tell
me and I'll change this to a @deprecated tag!)

See first comment for doc stage location.

Test: make ds-docs
Bug: 64159987
Change-Id: I83a53d1e6336c2134bf4c61bedd2ae42cd80493a
2017-07-31 19:41:01 -07:00
Erik Wolsheimer
d788e9420c DO NOT MERGE JobInfo experiment
Bug: 28696194
Change-Id: I26c5ae4a16109d5febd6e80459801ba97b3adfb1
2017-07-28 23:26:53 +00:00
Svetoslav Ganov
d9bf0f789b Report permission flags for all protections based on SDK
am: adb8c522a8

Change-Id: I91357a83b04abce402b0384ee9d362a351b0cb1c
2017-07-28 16:42:08 +00:00
Svetoslav Ganov
adb8c522a8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reported
      for normal and dangerous permissions

Change-Id: I87b10a7695d8ecfa7156525d6f3d101fc0639513
bug:62755026
2017-07-28 05:46:53 +00:00
Bart Sears
3d99cec342 Revert "Report permission flags for all protections based on SDK"
am: 784b56e1e6

Change-Id: I552f6a02c12b13825d829cd86f987502b71b0f2f
2017-07-28 05:17:46 +00:00
Bart Sears
784b56e1e6 Revert "Report permission flags for all protections based on SDK"
This reverts commit 852cf98cb8.

Change-Id: I62763bf85ec95a02a245c6b503aa34bb0e9d997a
2017-07-28 05:05:38 +00:00
Svetoslav Ganov
1c3ee56351 Report permission flags for all protections based on SDK
am: 852cf98cb8

Change-Id: I01b89051e10932c7926a6fe4f6c3225543a8ae4d
2017-07-28 02:48:37 +00:00
Svetoslav Ganov
852cf98cb8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reproted
      for normal and dangerous permissions

bug:62755026

Change-Id: I72547b0146e6b6919803e33ff64b7208c4a255ad
2017-07-28 01:46:04 +00:00
Andrew Solovay
6c106d5380 Merge "docs: Described why ProgressDialog is now deprecated." into oc-dev
am: 1cdf4244f4

Change-Id: I06ce65fb31a65750d7cc95f265295ac79db2587c
2017-07-07 19:08:53 +00:00
Andrew Solovay
4d2089c58a docs: Described why ProgressDialog is now deprecated.
Per feedback from DevRel, devs should avoid ProgressDialog because
using a modal dialog to show progress is a bad user experience.
Updating the ProgressDialog javadocs to say this; there's a separate
CL (http://cr/160568896) to make a similar note in the Dialogs API
guide.

Doc is staged to:

http://go/dac-stage/reference/android/app/ProgressDialog.html

Test: make ds-docs
Bug: 37565313
Change-Id: I189732fdda4532f248861e3f3d077f743f6387de
2017-06-29 14:01:43 -07:00
Robert Carr
dae172184b Merge "Disable requestVisibleBehind." into oc-dev
am: e33c33e38a

Change-Id: Ib9b7c9bf52fb6f4b77964c42c2b28f192c2ffb15
2017-06-29 00:26:18 +00:00
TreeHugger Robot
e33c33e38a Merge "Disable requestVisibleBehind." into oc-dev 2017-06-29 00:17:19 +00:00
Robert Carr
8661c5e519 Disable requestVisibleBehind.
As there is no caller for the SystemAPI convertToTranslucent, there is no situation
where requestVisibleBehind will actually result in the activity becoming
visible behind. However we have bugs in the requestVisibleBehind code-path,
so rather than fix them...it seems better to just prevent ourselves from
running in to them. Full deletion of the code-path is scheduled for post-O
branches.

Change-Id: I6e7c79e036986564d2d443a603e63c341de23057
Fixes: 62512584
Test: Repro from bug. go/wm-smoke.
2017-06-27 13:46:14 -07:00
Bryce Lee
337ccdc2a5 Merge "Add aborted start result." into oc-dev
am: 8796c20dae

Change-Id: Ie79b7a1cb2d5ec31673ca2c136622fd9733df1d3
2017-06-27 04:20:39 +00:00
Bryce Lee
f9d4954f30 Add aborted start result.
Previously, we were returning START_SUCCESS when ActivityStarter
aborted launching the activity. This hides this activity and makes it
harder to debug.

This CL adds a new start result type to capture this internally.

Bug: 38121026
Test: manual
Test: go/wm-smoke
Change-Id: I97699b22b1eff476724c48db0c29daa0566ad280
2017-06-26 16:27:32 -07:00
Seigo Nonaka
fcc20be8e8 Merge "Stop loading other package's font by default." into oc-dev
am: 824d75e0e1

Change-Id: Iec86839e2646bc6bf8ff45d0267d8aff82ae3452
2017-06-23 04:23:28 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Michael Kwan
10efdc0abf Add isSmallBatteryDevice flag to ActivityManager.
Bug: 37351903
Change-Id: I6fed08c35474b10987388070eafb7b16e6944638
(cherry picked from commit 15eb998e65)
2017-06-22 00:12:23 +00:00
TreeHugger Robot
0f98ddaa01 Merge "Small doc fix." into oc-dev 2017-06-21 01:59:02 +00:00
Svetoslav Ganov
324c41ba89 Merge "[DO NOT MERGE] Support native shared libs" into oc-dev 2017-06-21 01:06:22 +00:00
Svet Ganov
f8579581c1 [DO NOT MERGE] Support native shared libs
Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: CTS tests in this topic

bug:62720360

Change-Id: I0a398593ebe41b2976cb706ca8a388005f5aec83
2017-06-20 12:12:34 -07:00
Philip P. Moltmann
aed0c10d52 Merge "Correct lastId on onCreate with unexpected state" into oc-dev 2017-06-20 15:42:17 +00:00
Adam Lesinski
b0a5fd0384 Merge "Fix potential race in Theme creation" into oc-dev 2017-06-20 01:07:11 +00:00
TreeHugger Robot
4eaba84065 Merge "Fixed updateAutofillValue() when mText is not set." into oc-dev 2017-06-20 00:27:37 +00:00
Philip P. Moltmann
e78c771cf5 Correct lastId on onCreate with unexpected state
onCreate might be called with a state not produced by
onSaveInstanceState. In this case the last autofill ID is not set, so we
incorrectly restore it to NO_ID instead of LAST_APP_AUTOFILL_ID

Change-Id: Id40c06bf223c0e3c6235b2d50779e3f4532898b5
Fixes: 62296699
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
(cherry picked from commit 1266d08be5)
2017-06-19 23:57:38 +00:00
Adam Lesinski
1e87a365d6 Fix potential race in Theme creation
Bug: 38190555
Test: none
Change-Id: Id627bd6088dc469baffb1abb8310cd9e992996aa
2017-06-19 22:29:46 +00:00
Felipe Leme
266752317b Fixed updateAutofillValue() when mText is not set.
updateAutofillValue() was crashing some apps when the mText was not set at the
time it was called. One solution would be to not set mText at all - since the
Autofill Service should rely only on getAutofillValue() - but that could break
existing services.

Hence, a safer solution is to set that field if it's null.

Test: existing CtsAutoFillServiceTestCases tests pass
Test: manual verification using Fly Delta app

Fixes: 62751039

Change-Id: I91a8e0ed5db4148f5eb5729b8e254aa3531f15e4
2017-06-19 11:43:33 -07:00
Phil Weaver
c91290a6e9 Merge "Separate a11y and autofill view ids" into oc-dev 2017-06-17 00:46:05 +00:00
Dianne Hackborn
6aba8530ce Small doc fix.
Test: it builds
Change-Id: Ib4137a5981c2315cebde1ec4a4b5b8ff280b0f36
2017-06-16 14:43:36 -07:00
Phil Weaver
846cda9397 Separate a11y and autofill view ids
Autofill seems to need IDs to be preserved across things
like configuration changes, while accessibility will not
function without views with unique ids. Separating out the
two types of IDs. We can re-combine them once it's clear
that both demands can be satisfied.

Bug: 62301218
Test: Run a11y and autofill CTS, and verify that the play
store app functions with TalkBack after a screen rotation.

Change-Id: I17a99de2874768fc0ade3aa354130dd1f6b4cd7e
2017-06-16 14:36:36 -07:00
Winson Chung
06b50ab4b9 Fix backwards flag causing crash.
Bug: 62692677
Test: Use an activity options that requires the bitmap copy, ensure
      that it does not crash.

Change-Id: I20bdab1b91dfe47f7fe134fd17fe104eb4b27ec1
2017-06-16 11:07:29 -07:00
Sudheer Shanka
2ca51820f0 Merge "Use correct timestamps of events for logging." into oc-dev 2017-06-15 19:25:08 +00:00
Sudheer Shanka
c766db0a54 Use correct timestamps of events for logging.
Currently when WM detects certain events, it will notify the logger
of these events asynchronously and logger uses the timestamp at which it
gets notified to log these events. It's possible that the delay between
when the event actually occurs and when the logger gets notified could be
large. So for better accuracy, WM should also pass on the event timestamp
to the logger.

Bug: 62375480
Test: Triggered sysui_multi_action event logs and verified that
      APP_TRANSITION_DELAY_MS is less than APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS.
Test: When the system is not busy, the timestamps we used to log earlier
      and timestamps we log with this change are almost same.
Change-Id: I5f62654a6b7f179d821c0082b180246c8a569df1
2017-06-13 10:29:03 -07:00
Wale Ogunwale
b32fecd6e0 Merge "Added 'dumpsys activity lastanr'" into oc-dev 2017-06-10 15:58:14 +00:00
Wale Ogunwale
f1285916c3 Added 'dumpsys activity lastanr'
Allows for dumping the activity state during the last anr. This will
also be included in collected bug reports.

Bug: 38121026
Test: Cause an anr to occur and run 'adb shell dumpsys activity lastanr'
Change-Id: I1e4200f9e5cc16bfab98e5af31fc599cdd54cd11
2017-06-09 17:17:07 -07:00
George Mount
e5e246ce5c Merge "Add target sdk check for behavior change." into oc-dev 2017-06-09 23:41:47 +00:00
George Mount
d1cfbc506b Add target sdk check for behavior change.
Bug 62188967

A previous change stopped animations on fragment Views before
being removed. This change in behavior caused other problems,
so the behavior must be placed behind a target SDK check.

Test: ran fragment tests, validated on app
Change-Id: I098e9b0f1472d9838abeacba3baaa7581f7a82ad
2017-06-08 14:18:31 -07:00
Felipe Leme
9be8c96918 Merge "Overall improvement on Autofill javadocs for autofillable APIs." into oc-dev 2017-06-08 05:21:08 +00:00
Julia Reynolds
6e96251d92 Merge "Revert "Change default for group alert behavior"" into oc-dev 2017-06-07 20:12:28 +00:00
Julia Reynolds
2f431e264d Revert "Change default for group alert behavior"
This reverts commit 8f7828ebe7.

Mutes sound on legacy apps that use their summaries to make sound

Change-Id: I635b1428ee247c0b7753f58343637e64da1c981d

Fixes: 62387153
2017-06-07 14:16:05 +00:00
Felipe Leme
2f6fc72efc Overall improvement on Autofill javadocs for autofillable APIs.
Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: I7eaf0a521c3777baf0dc0002ae814990fd96a14c
2017-06-06 14:33:56 -07:00
TreeHugger Robot
42abe82bbb Merge "Fix #62350081 - annotate permission requirements" into oc-dev 2017-06-06 20:18:21 +00:00
Christopher Tate
8d3079f641 Fix #62350081 - annotate permission requirements
The Alarm Manager APIs that allow callers to ascribe wakelock time
to other apps are gated on the UPDATE_DEVICE_STATS permission.
Document this with the appropriate annotation.

Test: N/A
Change-Id: Idf5548089fb7d2235139ae8ba7bf58e7f455eb33
2017-06-05 18:30:05 -07:00
Jeff Sharkey
bfc4fcde9f Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system
permissions, so give Doclava the platform AndroidManifest.xml so it
can parse the actual permission protection levels to look for APIs
that are letting in non-system apps.

Also document more @SystemApi permissions.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api
Bug: 62263906
Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
2017-06-05 17:38:19 -06:00