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
Renderscript is deprecated and scheduled for removal. Let's start by
removing the easiest part to remove.
Test: treehugger
Change-Id: I5f172497756c3931ccfda742e9c08bde56b362c9
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
If your app targets Android 12, you must specify the mutability of each PendingIntent
object that your app creates. This additional requirement improves your app's security.
https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
Android Lint is being updated, and adds an error-level check for this.
Bug: 247885568
Test: Presubmits
Change-Id: I2bb91d98b443af2b5c16944ce197d863dbd33f9a
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
This CL introduces a sample AccessibilityService that demonstrates how
to use newly added APIs based on IME APIs [1].
[1]: Ia651a811093a939d00c081be1961e24ed3ad0356
fb17e5ae7a9e1a095d114d8dde76f14578b6c233
Fix: 223671031
Test: Manually done as follows.
1. make -j SampleInputMethodAccessibilityService
2. adb install -r $OUT/system/app/SampleInputMethodAccessibilityService/SampleInputMethodAccessibilityService.apk
3. adb shell settings put secure enabled_accessibility_services com.example.android.sampleinputmethodaccessibilityservice/com.example.android.sampleinputmethodaccessibilityservice.SampleInputMethodAccessibilityService
Change-Id: Iea75f4378118fadc142c56aad7667784111033ba
Push specific licenses down the tree toward the leaf directories.
Remove extra Apache 2.0 license texts--just use Android-Apache-2.0
Test: m nothing
Change-Id: Ibee25f75f5933699d6f43acdc192b2ada6823757
With CL[1],[2] to migrate InputMethodService as the subclass of the new
introduced class WindowProviderService in S_V2, IME context resources
can be managed by associating the window container of IME window when
its display/window configuration changed.
So in SoftKeyboard#getDisplayContext, we can get rid of
createDisplayContext logic from S_V2 with gated by SDK version and
refining the method documentation to make it clear.
[1]: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
[2]: I64a1614f32d097785915f6105b1813a929e0fe32
Bug: 213118079
Bug: 133825283
Test: manual with below steps
1) adb install -r EditTextVariations.apk
2) adb install -r SoftKeyboard.apk
3) adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
4) adb shell ime set com.example.android.softkeyboard/.SoftKeyboard5
5) Enable screen auto-rotation
6) Launch EditTextVariations from launcher's shortcut
7) Tap the first EditText field to show IME
8) Rotate the device to the landscape mode
9) Expect the IME should not be shrunk
Change-Id: I9a512a90ca43f07236a041d9e82dbd875206f99e
With this CL, you can let ThemedNavBarKeyboard call
InputMethodService#setBackDisposition(int)
with either the following values
* BACK_DISPOSITION_DEFAULT
* BACK_DISPOSITION_ADJUST_NOTHING
so that you can see how those two flags work.
Bug: 213337792
Test: Manually verified as follows
1. Flash aosp_coral-userdebug into the device
2. make -j ThemedNavBarKeyboard
3. adb install -r $ANDROID_PRODUCT_OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
4. adb shell ime enable com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
5. adb shell ime set com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
6. Tap any edit field
7. Make sure that the back button is left-pointing triangle
8. Tap "BACK_DISPOSITION_ADJUST_NOTHING" on the IME
9. Make sure that the back button is down-pointing triangle
Change-Id: I71aa1dd23d72e8891cb3887efe5db1a48b6a017d
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
With this CL, ThemedNavBarKeyboard sameple IME will have an explicitly
set targetSdkVersion=31 so that it can be installed on older version
of Android OSes.
This CL also explicitly sets "android:exported", which has been
required in AndroidManifest.xml since API 31.
Fix: 211463997
Test: Manually verified as follows
1. Flash SQ1A.211205.008 aosp_coral-userdebug into coral
2. make -j ThemedNavBarKeyboard
3. adb install -r $ANDROID_PRODUCT_OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
Change-Id: Idd88031a6b65cca58add8abe42794bc5f01b1973
This adds two new properties alongside AndroidVersion.ApiLevel:
- AndroidVersion.ExtensionLevel: The sdk extension version if the SDK
- AndroidVersion.IsBaseSdk: Whether the extension level is the the one
that the ApiLevel shipped with (true), or if is an extension SDK
release (false).
While we're here, dedupe the recipe that processes these templates.
Bug: 195281582
Test: m out/host/linux-x86/development/sdk/platform_source.properties
and inspect the substitution is working
Change-Id: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
Merged-In: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
(cherry picked from commit cf2f42c36b7997e9ce87682bb3a5511bdb72936f)
This adds two new properties alongside AndroidVersion.ApiLevel:
- AndroidVersion.ExtensionLevel: The sdk extension version if the SDK
- AndroidVersion.IsBaseSdk: Whether the extension level is the the one
that the ApiLevel shipped with (true), or if is an extension SDK
release (false).
While we're here, dedupe the recipe that processes these templates.
Bug: 195281582
Test: m out/host/linux-x86/development/sdk/platform_source.properties
and inspect the substitution is working
Change-Id: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
(cherry picked from commit cf2f42c36b7997e9ce87682bb3a5511bdb72936f)
This adds two new properties alongside AndroidVersion.ApiLevel:
- AndroidVersion.ExtensionLevel: The sdk extension version if the SDK
- AndroidVersion.IsBaseSdk: Whether the extension level is the the one
that the ApiLevel shipped with (true), or if is an extension SDK
release (false).
While we're here, dedupe the recipe that processes these templates.
Bug: 195281582
Test: m out/host/linux-x86/development/sdk/platform_source.properties
and inspect the substitution is working
Merged-In: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
Change-Id: Ieea20731aed2e0f35bbe4cfd8ca596cf11f4b3bc
1. converted the Make file to a Soong one;
2. handled the .rscript files by genrule (to include the same commands used when build
with the former .mk file);
3. the differences observed in the apks before and after the conversion
are the same as in http://b/192521178, which should not affect the
conversion here;
4. the same result was observed when run the two apks on a physical
phone(Pixel 3a XL (bonito));
5. test commands:
mma -j LevelsRS
adb install -r ~/aosp/out/target/product/bonito/system/app/LevelsRS/LevelsRS.apk
adb shell am start -S -n com.android.rs.levels/.LevelsRSActivity
adb shell am start -S -n com.android.rs.levels/.LevelsDalvikActivity
Bug: 124261647
Test: compared the two apk files built by Make and Soong
Test: run two apks on a Pixel 3a XL (bonito) phone
Test: TreeHugger
Change-Id: I93876654215de98ec3160912676589ae143a4071