Commit Graph

10746 Commits

Author SHA1 Message Date
Felipe Leme
85d1c2d290 Minor fixes on Autofill Framework:
- Removed default implementation of onProvideAutofillVirtualStructure() that
  was using accessibility API (it's useless because without the View calling
  AutofillManager.notifyViewEntered(), it would never be triggered).
- Fixed obsolete TODOs.
- Removed obsolete service class name constant.
- Removed unused debug constant.

Fixes: 37078783
Fixes: 33197203
Bug: 33802548
Bug: 35956626

Test: CtsAutoFillServiceTestCases pass
Merged-In: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
Change-Id: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
2017-04-24 16:01:12 -07:00
TreeHugger Robot
13ba34bf37 Merge changes from topic 'virtual-display-api' into oc-dev
* changes:
  Add command line option to set compatibility display properties
  Make VR mode virtual display properties customizable
2017-04-24 21:33:59 +00:00
TreeHugger Robot
880f4f4cc2 Merge "Even more auto-doc work." into oc-dev 2017-04-24 21:33:18 +00:00
Jeff Sharkey
30e06bb668 Even more auto-doc work.
Update docs based on what new lint detector found.  Add new @IntDef
to parameters or methods returning constants or flags, and add
@RequiresPermission to methods mentioning permissions.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I7f640f7883fcb66b911a52ae93b83f77306571ec
2017-04-24 13:20:46 -06:00
Felipe Leme
4711ed9f9f Replaced getUrl() by getWebDomain().
Bug: 37566507
Test: CtsAssistTestCases pass

Change-Id: I1b4dfa7259040b3b8bf1014ebb806eb7a3b36c58
2017-04-24 09:43:08 -07:00
TreeHugger Robot
4eaeb91e42 Merge "fix service binding" into oc-dev 2017-04-24 15:37:51 +00:00
Jeff Sharkey
6bc03748a7 Merge "More auto-doc work." into oc-dev 2017-04-22 19:11:34 +00:00
TreeHugger Robot
7bb113566f Merge "Clarify the meaning of ViewNodes methods used for Autofill purposes." into oc-dev 2017-04-22 04:20:42 +00:00
Andrii Kulian
b216d0f09f Merge "Don't put non-resizeable activities on secondary displays" into oc-dev 2017-04-22 00:59:39 +00:00
Jeff Sharkey
910e081216 More auto-doc work.
Add support for AnyThread, CallSuper, and UiThread.

Another related CL started documenting @RequiresPermission, so remove
duplicated information in existing APIs.

Suppress auto-doc on a handful of classes that are already
well-documented.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
2017-04-21 16:35:08 -06:00
Dianne Hackborn
28d1b66134 Address various JobScheduler API feedback.
- New sample code.
- Fix/improve some docs.
- Hide JobWorkItem Parcl constructor.

Also:

- Add new JobWorkItem API to get the number of times it has been
delivered.
- Do a bit more optimization of checking if a job is ready.

Bug: 37534393  API Review: JobInfo.Builder
Bug: 37544057  API Review: JobServiceEngine
Bug: 37544153  API Review: JobWorkItem

Test: bit CtsJobSchedulerTestCases:*
Change-Id: I66891a038fba752f45dcaed43e615fa9209b71fc
2017-04-21 15:02:10 -07:00
Todd Kennedy
46b4f2b795 fix service binding
there were cases where we wouldn't bind when we should. also, add
some additional debug to better track potential connection issues.

Change-Id: I381da24f490e3102817a14428ef1a63982f33d19
Fixes: 37122153
Test: kill/upgrade GMS to ensure we re-bind in a timely manner
2017-04-21 14:43:52 -07:00
Jeff Sharkey
4b32f7c676 Merge "Fix code accounting bugs, track external app data." into oc-dev 2017-04-21 20:01:43 +00:00
TreeHugger Robot
0fa2574ecb Merge "Fix issue #32180780: Sync adapters inappropriately being run..." into oc-dev 2017-04-21 19:23:11 +00:00
Felipe Leme
30e9b266aa Clarify the meaning of ViewNodes methods used for Autofill purposes.
Test: m update-api
Bug: 37565909

Change-Id: I8abcc76193876b62726acb274c5e8984e9dbe6a7
2017-04-21 11:46:01 -07:00
TreeHugger Robot
f74a736add Merge "Remove long standing debug code" into oc-dev 2017-04-21 17:17:20 +00:00
Dianne Hackborn
f9bac16d61 Fix issue #32180780: Sync adapters inappropriately being run...
...during full-data backup/restore

The activity manager now tells job scheduler service about the
current backup that is running (only if it is a full backup), it
there is a new condition where we won't consider jobs associated
with the current backup to be ready to run.

Also...  just a little optimization here. :)  The focus is on
scheduling  jobs with a 0 deadline, meaning they should run right
away.  Now the timing controller does a quick check for a new
job to see if its constraints are already satisifed, and doesn't
do anything further if that is the case (doesn't add to the list,
doesn't re-evaluate alarms, etc).  And in the path to scheduling
a job, we do a check to see if the new job is already ready and if
so then just directly add it to the pending list and schedule it.

Doing this required removing what I think is the last bit of code
relying on handler serializing for thread safety, so now everything
in the job scheduler is protected by our global lock and we can
do whatever we want with the lock held and be assured the state
remains consistent.

Also did some small optimizations to many of the other controllers,
mostly switching from an ArrayList to an ArraySet for their tracked
jobs, since one of the things we do frequently is add/remove jobs.

Finally, added some nullability annotations to the JobScheduler
APIs.

Test: bit CtsJobSchedulerTestCases:*

Change-Id: I533fad94ba59468a52fe3d077a0ceab3427f0012
2017-04-21 10:07:31 -07:00
Aurimas Liutikas
d3892caf95 Merge "Fix/suppress error-prone warnings in framework's fragment." into oc-dev 2017-04-21 15:14:08 +00:00
Julia Reynolds
fea6f7b799 Remove long standing debug code
Because it stops real errors from bubbling up to the calling app.

Test: make, post notifications
Change-Id: I0e59c61b0a60302a5fd023b7ad909e84b97e5df5
Fixes: 37494547
2017-04-21 09:38:39 -04:00
TreeHugger Robot
9ea4b33f2a Merge "Auto-generate docs based on annotations." into oc-dev 2017-04-21 02:03:33 +00:00
TreeHugger Robot
dcc7feb329 Merge "Kill running animations on fragment view's when removed." into oc-dev 2017-04-20 23:52:48 +00:00
TreeHugger Robot
d58d802c5f Merge "Execute pending transactions after FM state change." into oc-dev 2017-04-20 23:51:07 +00:00
Jeff Sharkey
6503bd8e33 Auto-generate docs based on annotations.
We have a handful of annotations that we've been sprinkling across
the platform APIs, such as @Nullable, @NonNull, @IntDef, etc.  It
would be really helpful to surface these contracts to developers
through the SDK docs.

This change allows annotations like those mentioned above to declare
the following new javadoc fields:

@memberDoc: docs to append to a field or method definition.
@paramDoc: docs to append to a @param definition.
@returnDoc: docs to append to a @return definition.

This change also builds a docstring to describe the list of all
constants listed in an @IntDef annotation.  Sadly AnnotationDesc
only passes along raw constant values, so we need the help of the
new "prefix" annotation argument to help find the field names.

Test: builds
Bug: 37526420
Change-Id: I4cfc00dd904e5dfa945b406d546e36846b7c0c28
2017-04-20 17:21:41 -06:00
Andrii Kulian
036e3adce7 Don't put non-resizeable activities on secondary displays
There is a contract that a non-resizeable activity cannot get
a configuration different from the global config (or fullscreen
config on primary display). This CL ensures that for launching on
secondary displays and checks if target display's config matches
the global config.
If a forced-resizeable activity is launched to a secondary display
or there was an attempt to launch a non-resizeable activity that
failed, corresponding toast message will be displayed.

Bug: 36777179
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testLaunchNonResizeableActivityOnSecondaryDisplay
Test: #testLaunchNonResizeableActivityWithSplitScreen
Test: #testMoveNonResizeableActivityToSecondaryDisplay
Change-Id: I5346afe740e78e4e5ba9a9694e97ac60b92663e9
2017-04-20 15:42:07 -07:00
George Mount
38eae1bb15 Merge "fix NPE when fragment container is null" into oc-dev 2017-04-20 20:38:10 +00:00
George Mount
416b377759 fix NPE when fragment container is null
Bug 37529822

Test: ran against breaking application

Change-Id: Ib829b817eddf2e91898989a2f9e7885a6f5847e5
2017-04-20 13:17:30 -07:00
Chad Brubaker
1f4e053aef Merge "Address API review comments for registerReceiver" into oc-dev 2017-04-20 19:52:51 +00:00
TreeHugger Robot
f4af35a5fe Merge "Moved getAutofillOptions() logic from SpinnerAbs to AdapterView and Adapter." into oc-dev 2017-04-20 17:25:19 +00:00
Aurimas Liutikas
221f15d44b Fix/suppress error-prone warnings in framework's fragment.
Bug: 37537860
Test: Compile
Change-Id: I0f30c423a712819ee78d16764acf20386360240f
2017-04-20 17:05:26 +00:00
Sudheer Shanka
8f40881e3e Merge "Revert "Add new api Activity.getStartInitiatedTime."" into oc-dev 2017-04-20 16:32:37 +00:00
Bryce Lee
e4b6441198 Merge "Deprecate Activity#requestVisibleBehind" into oc-dev 2017-04-20 14:19:16 +00:00
TreeHugger Robot
fb4fb03cc3 Merge "Address API council comments" into oc-dev 2017-04-20 03:53:37 +00:00
Selim Cinek
947be6bed9 Merge changes Ic76d996f,Ib9eefacb,If1b63340,I399c66af into oc-dev
* changes:
  Changed the documentation of the colorization
  Fixed the appearance of colorized fullscreenintent notifications
  Adapted the interpolator when using fingerprint
  The row is now labeling the expand button
2017-04-20 00:08:57 +00:00
TreeHugger Robot
232ff0bdc8 Merge "Fix issue #37470038: API Review: ServiceConnection.onBindingDead()" into oc-dev 2017-04-19 23:55:40 +00:00
Chad Brubaker
6d6015f652 Address API review comments for registerReceiver
Bug: 37465538
Test: manual; Verified that Instant Apps can send broadcasts to
receivers still via the changed API.

Change-Id: Ib0f3d0c8ee71234288ccecd07e621554eb9b70ac
2017-04-19 15:06:35 -07:00
Selim Cinek
5bb18a14f1 Changed the documentation of the colorization
There was still a reference to ongoing, which wasn't needed

Test: non, documentation change
Fixes: 34469375
Change-Id: Ic76d996f92f339db869f25d7696313eefc0c07bb
2017-04-19 15:00:52 -07:00
Selim Cinek
622c64a9ce Fixed the appearance of colorized fullscreenintent notifications
Previously the background would stay grey.

Test: manual, add fullscreen intent colorized notification
Change-Id: Ib9eefacba58256d2cb0c6f0d70cf0e9b5afdaf06
Fixes: 35968024
2017-04-19 15:00:50 -07:00
Dianne Hackborn
ac26534996 Fix issue #37470038: API Review: ServiceConnection.onBindingDead()
Renamed.

Test: booted and ran.

Change-Id: Ic21f7ef66d43fb6db9f7ebbc833f28c09474ea59
2017-04-19 14:53:43 -07:00
TreeHugger Robot
28602c0921 Merge changes from topic 'chooser' into oc-dev
* changes:
  Rely on view animations for ResolverActivity
  Create a valid ActivityOptions Bundle even for default animations
  Remove scale up animation for startActivity from RemoteViews
2017-04-19 21:04:26 +00:00
Chad Brubaker
904e6cad28 Merge "Change ANDROID_ID for Instant Apps" into oc-dev 2017-04-19 21:00:55 +00:00
Sudheer Shanka
55337a831a Revert "Add new api Activity.getStartInitiatedTime."
This reverts commit bc308988bd.

Change-Id: Ieaca7c9ec8b4affbb8ce98ebbcb663a531904bf8
2017-04-19 20:32:14 +00:00
George Mount
7fea910d09 Kill running animations on fragment view's when removed.
Bug 29274792

Stop animation and animators on the Fragment view from preventing
the view from being removed from the shadow view hierarchy.

Support Lib: I628b38f76357bce1ca7dd5c5c736f0f087d7bab4
Test: Ie9a11692ae883a72c17a042168feec42c698074e

Change-Id: I0ada7b4e75ef14c90038adf316b196e4cbcd6aaa
2017-04-19 12:08:14 -07:00
TreeHugger Robot
681ff5c7d8 Merge "Fix FragmentTransaction.show() to show the fragment." into oc-dev 2017-04-19 19:06:09 +00:00
TreeHugger Robot
f3ff7b8207 Merge "Adds getLayoutInflater() to return a cached value." into oc-dev 2017-04-19 18:15:36 +00:00
Chad Brubaker
0d277a7b18 Change ANDROID_ID for Instant Apps
ANDROID_ID for Instant Apps now has the following properties:
1) per-app scoped
2) reset if the user clears the Instant App
3) remains the same if the Instant App gets upgraded to an installed
app.

Note that if the user goes instant -> installed_1 -> uninstall ->
installed_2 the ANDROID_ID at installed_1 will not be the same as
installed_2. This was deemed better than the id changing on the upgrade
step.

Test: manual
Change-Id: I532975c50049c94ff80902a897e001dd35a69f9f
2017-04-19 11:10:53 -07:00
George Mount
c5828b50ed Fix FragmentTransaction.show() to show the fragment.
Bug 37413327

When there was an animation and the fragment transaction wasn't
optimized, the fragment visiiblity wasn't being set during show().

Test: I0fd4029a02d6c9f082011bf56f0d3c8245803f68
Change-Id: Idc2c74ae2fc4759a755a5988ce6ca1b39ef8d554
2017-04-19 07:32:36 -07:00
Jeff Sharkey
0034788844 Fix code accounting bugs, track external app data.
When counting code size, don't include APKs baked into the system.

Settings already accounts external storage used by apps, so they
need a way to exclude that from the total space used by external
storage; give them new getAppSize() API.

Refine docs to explain that emulated storage might be included in
measured statistics.

Resolve symlinks as part of matching getUuidForPath().

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 35812899, 35844919, 37193650
Change-Id: Iec3ce8b336b71dc98a7d25fdd30fa78e9ee826dc
2017-04-18 21:00:13 -06:00
Svetoslav Ganov
345ffa5421 Address API council comments
Test: cookie CTS tests pass

bug:37327624
bug:37325276
bug:37323696

Change-Id: I52b10470759e471629ec6772e115df94482eb341
2017-04-18 16:44:43 -07:00
Sunny Goyal
bab3075e2e Creating a common class for loading drawables and handling various badging
Test: Manually tested on device
Bug: 36591157
Change-Id: Ic847537d416650015cecaeb68f47f7f032e0dbaa
2017-04-18 16:36:15 -07:00
Felipe Leme
7e4c205d8f Moved getAutofillOptions() logic from SpinnerAbs to AdapterView and Adapter.
Fixes: 37330022
Test: CtsAutoFillServiceTestCases pass
Test: manual verification using app from bug 37327881

Change-Id: I66260131c7ef0d5b3c2b20514f29efd5eb10057e
2017-04-18 15:36:04 -07:00