For testing and demo purpose, currently support selecting from well
defined list of aspect ratio, include 21:9, 16:9, 1:1, 9:16 and 9:21
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gqFQI7mpeQ6EZZ5JibsV6R
Bug: 198643358
Test: Change aspect ratio within the app, see video
Change-Id: I0580dc45bf32e795fefd7d80f5183f268f810790
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:
BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower
See https://errorprone.info/bugpatterns for more
information on the checks.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: Ic7e78cc74523ee09c1b4aa9969756f0cfd609e08
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Iaecb05992482dfea041e51e3978d0d51d4ca2ce8
The demo Activity simply finishes itself when it receives the callback
from the close action PendingIntent.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/fR0hxeorlYrxXyzfZ02btK
Bug: 223896879
Test: see video
Change-Id: I94797b666fbcd630c828463668d9bc4e07274cd8
Put various configurations for PiP into one Activity, access by navigate
to `App > Activity > Picture in Picture`. Current supports
- Enter PiP with on-screen button
- Enter PiP by swiping up to home or tap on home button
- Toggle the auto enter PiP flag on and off
- Toggle the source rect hint on and off
- Toggle the seamless resize flag on and off
- Change the position of current and next source rect hint
- Tablet layout on foldables
The upcoming content PiP will also be hosted here.
Added also support passing the intent extra, full command
```
adb shell am start \
--ez auto_pip [true|false] \
--ez source_rect_hint [true|false] \
--ez seamless_resize [true|false] \
--es current_position [start|end] \
com.example.android.apis/.app.PictureInPicture
```
Bug: 175727044
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gdcklbUsT7SmbUhNcVSXfd
Test: manual, see Video
Change-Id: I60233f2d6e428d11d4ab1b566e36c38fd4c4f937
1. Convert ApiDemos/Android.mk to ApiDemos/Android.bp;
2. Convert ApiDemos/tests/Android.mk to ApiDemos/tests/Android.bp
Bug: 186778349
Test: compared the apk files built by Make and Soong
Test: TreeHugger
Change-Id: I7b72a998b56804e647d0908be5a118f9bf2cd896
FGS notification deferral control is now a tri-state.
Bug: 171499612
Bug: 179290175
Test: ApiDemos foreground service paths
Change-Id: Ie426fb64b998ba452ff92f0231811679946500ff
Since the actual aspect ratio is defined in layout file, measuring the
value in layout change listener can only cause irrelevant
onTaskInfoChanged callbacks sent to SysUI due to 1px difference.
Bug: 180630127
Test: enter PiP w/ autoEnter from landscape in button navigation
Change-Id: I25dcf82bfbebde017c2c938d745c23d615a7015b
For easy side-by-side comparison turning on/off seamlessResizeEnabled
flag. Adjusted also the wording to emphasize the recommended usage.
Bug: 152554547
Test: use the ApiDemos app
Change-Id: I1fbeee2479d9e93614d040d10e01f9fe2fb4c8d4
Revert "Add pid and uid to SF::setClientStateLocked"
Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"
Revert submission 13350963-blur_system_api
Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.
Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi
Bug: 177523043
Change-Id: Ic1f1657eee370a2fcc625c28f876c34e3e0427e9
- Demonstrates the source rect hint API (on enter and exit)
- Invoke path: App -> Activity -> Picture In Picture Source Rect Hint
Video: http://rcll/e8RgaQ0dFlwFuh0c7GRpyy/cCQiDoYLvfJ4dKwQQbsaYC
Bug: 167447693
Test: m -j ApiDemos
Change-Id: I80b41b017b021bf6da16a21fe9d5bf8ec0c35ea5
- Demonstrates the autoEnterPip API with multi-activity in original task
- Invoke path: App -> Activity -> Picture in Picture Auto Enter
Video: http://rcll/aaaaaabFQoRHlzixHdtY/gIO4G5dybW7tJWXihkhXfE
Bug: 177335910
Test: m -j ApiDemos
Test: see video
Change-Id: If69116dd52476ead8cc46dc3475447d4bfa64ff8
WindowManager.LayoutParams.FLAG_BLUR_BEHIND has been deprecated since
2011 and has been a no-op ever since.
We are @remove-ing it in S and making it a SystemApi to be used for
cross-app blurs. To that end, we have to remove its public usages.
This CL removes its usage in ApiDemos.
Bug: 177524486
Test: m
Change-Id: I3683db296e8331a9d255d39f23fad7dedc28bb9b
As discussed with Romain Guy in the email thread, the Apache 2.0
license applies to the affected .jpg files now and retroactively from
the time of import.
Each of the images was altered using the exiftool:
exiftool -WebStatement=http://www.apache.org/licenses/LICENSE-2.0
Change-Id: I557d0129617164209a3eec7ec2d228f266643ca0
Also fix bug where persistent uri access was not taken for
OPEN_DOCUMENT_TREE intents.
Change-Id: Iccc3e2434e08e42fa84dc3ceb3fbfe1db1320180
Fixes: 119519300
Test: manually using ApiDemos Content > Storage > Documents
The framework Preference APIs are deprecated, so these samples are
misleading and should be removed.
Trying to submit again now that the relevant sample tags have been removed.
Bug: b/119602280
Test: n/a
Change-Id: I7efb509f5c938122575cf4177b50872bfc089d00
This reverts commit 946280d6ce.
Reason for revert: Breaking builds due to doc generation using these samples
Change-Id: I7caf9792e84e0e1eedea4a7294a321c684be2d5c
The framework Preference APIs are being deprecated, so removing the
samples will help avoid confusion.
Bug: b/119602280
Test: n/a
Change-Id: Ib3a2c38b8fbb0f1afc9ef6a35963def46ee931f7
Add alphabetic shortcuts to the menu in ActionBarUsage. This mirrors
what is already present in a similar support lib demo.
Bug: 31045453
Test: run com.example.android.apis.app.ActionBarUsage on a device
with keyboard shortcuts enabled (such as Chromebook). Action menu
items should display keyboard shortcuts.
Change-Id: I9e6b04df8e2a6cbc728cb60b3706d054521da7cb