Commit Graph

11566 Commits

Author SHA1 Message Date
Hui Wang
c1183c038e Merge "Add new Telephony feature flags and update API annotations" 2021-12-20 15:50:57 +00:00
John Wu
7a6f2c8e23 Merge "Update system package broadcasts for app ID changes" 2021-12-17 01:31:04 +00:00
Evan Rosky
1b44d86802 Merge "Revert "Revert "Add XML configuration for density""" 2021-12-17 00:52:45 +00:00
Etienne Ruffieux
5251dfbc2a Merge "Moved AttributionSource related APIs in AttributionSource" am: 70d456d06c am: 52ddc063b0 am: e5d5eefb16 am: 52dfe57f07
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1922817

Change-Id: I60fa5ecea7c9b1bffbd8bfaf0ed85cafb80fa5bc
2021-12-16 22:52:35 +00:00
John Wu
4776cdee49 Update system package broadcasts for app ID changes
Whenever a package's app ID has changed, the system broadcasts should
behave as if the package is fully uninstalled and then re-installed
subsequently. Additional extras are added to indicate the app ID change
to allow components to handle this case specifically.

Test: atest SharedUserMigrationTest#testDataMigration
Bug: 179284822
Change-Id: Ie00eaed1f0a704876ea76aa0e5ae2a1b21f199df
2021-12-16 14:48:56 -08:00
Etienne Ruffieux
52dfe57f07 Merge "Moved AttributionSource related APIs in AttributionSource" am: 70d456d06c am: 52ddc063b0 am: e5d5eefb16
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1922817

Change-Id: Id6bcfb0cca120540dd251dda22c713539c5c2b8c
2021-12-16 22:08:37 +00:00
Evan Rosky
ba816ea404 Revert "Revert "Add XML configuration for density""
This reverts commit 45c4562041.

Reason for revert: Seems like reverting didn't help.

Change-Id: Ic6ac4425646100a61a978b4e7388fab88d4d0ed1
2021-12-16 22:02:55 +00:00
Etienne Ruffieux
e5d5eefb16 Merge "Moved AttributionSource related APIs in AttributionSource" am: 70d456d06c am: 52ddc063b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1922817

Change-Id: Id597191e675eca32c4d965fd4dc0e62dc2653283
2021-12-16 21:42:01 +00:00
Etienne Ruffieux
70d456d06c Merge "Moved AttributionSource related APIs in AttributionSource" 2021-12-16 21:16:58 +00:00
Joanne Chung
fcf3a92a1d Merge "Initial layout of selection toolbar." 2021-12-16 05:56:41 +00:00
Joanne Chung
41c4a0ac71 Initial layout of selection toolbar.
The initial selection toolbar related architecture. Render service
part and the implementation will be revised in the follow up changes.

Bug: 190030331
Bug: 205822301
Test: manual. Can boot to home and get manager successfully.
Ignore-AOSP-First: new file for T

Change-Id: Iab5d5f2e5e48e6258a63fb0c479194c958ea61e8
2021-12-16 11:35:23 +08:00
Yandry Perez Clemente
b9cd53b835 Merge "Fixes NullPointerException." 2021-12-15 23:30:57 +00:00
Etienne Ruffieux
770d50ed43 Moved AttributionSource related APIs in AttributionSource
Modified myAttributionSource() to check for global AS for
process in ActivityThread and fallback to building new AS
with PackageManager#getPackageForUid(myUid()) if null.

Tag: #feature
Bug: 210467846
Bug: 210468546
Test: build
Change-Id: I7aa75395469bf0bb806100420faaf98c52057355
CTS-Coverage-Bug: 210906055
2021-12-15 22:03:50 +00:00
Evan Rosky
373c8a1803 Merge "Revert "Add XML configuration for density"" 2021-12-15 21:06:22 +00:00
Evan Rosky
45c4562041 Revert "Add XML configuration for density"
This reverts commit a822ccd755.

Reason for revert: Broke a shell-transition CTS test (b/210902428)

Change-Id: I479a6152f94cc6aff30caa8f49932c53d420db1e
2021-12-15 21:02:58 +00:00
Bernardo Rufino
3d10fb4b83 Merge "Migrate unsafe parcel APIs in framework-minus-apex" 2021-12-15 19:15:58 +00:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Yandry Perez Clemente
77b0bbb413 Fixes NullPointerException.
mPendingResult is not guaranteed to have been initialized at this point.

Test: Manual.
Bug: 210266601
Change-Id: I84287a068d03dd3aac2b046d1b8fdd8e6e52803f
2021-12-15 17:27:59 +00:00
Hui Wang
c47df7fd76 Add new Telephony feature flags and update API annotations
Bug: 206437821
Test: make
Test: atest CtsTelephonyTestCases FrameworksTelephonyTests
Change-Id: I511afb5afc52b859a37f8ae27ab671c2b8037527
2021-12-14 20:37:47 +00:00
Pinyao Ting
00276585c5 Merge "Include new api to exlude a shortcut from launcher" 2021-12-14 20:02:31 +00:00
Makoto Onuki
6bef72dbfe Merge changes from topic "per-process-app-class-2"
* changes:
  Support per-process Application class (AM and client side)
  Support per-process Application class (package parser)
  Support per-process Application class in <process> tag
2021-12-14 17:55:58 +00:00
Felka Chang
00964e9aea Dump theme inheritance information in UnsupportedOperationException
It isn't enough to only dump the theme id and name because there is
no whole theme inheritance map. Developers need the map to figure out
why the attribute value is so strange.

A theme is a kind of style. This patch creates an API to retrieve the
parent id for any style.  And, it dumps the whole inheritance between
themes until it can't find the parent style.

Test: manual test described in b/209708201#comment5
Bug: 209708201

Change-Id: I9de0e6e9aaeff7cb9fc89dc9b8a04925e84f975c
2021-12-14 11:42:30 +08:00
Makoto Onuki
236abad797 Support per-process Application class (package parser)
Now the <process> tag supports `android:name`, which takes a custom
Application class name. If omitted, the system defaults to the
class set in the <application> tag, or the default class which is
`android.app.Application`.

Bug: 197264681
Test: atest CtsProcessTest
Test: atest PackageManagerServiceUnitTests
Change-Id: Iaf336cc34fe950c4b3d8887de557857f8c23dc83
2021-12-13 16:28:32 -08:00
TreeHugger Robot
3cb6aeccbd Merge "Add theme information during throwing exception" 2021-12-13 07:20:16 +00:00
Pinyao Ting
338430cebb Include new api to exlude a shortcut from launcher
Include a new field in ShortcutInfo which serves as an indication of
whether a shortcut is exlucded from launcher. Shortcut marked as
excluded from launcher will not be included in the search result in
LauncherApps nor ShortcutManager. This generally means the shortcut
would not be displayed by a launcher app (e.g. Long-Press menu), while
remain visible in other surfaces such as assistant or
on-device-intelligence.

- setDynamicShortcuts/addDynamicShortcuts/pushDynamicShortcuts:
Shortcuts that are marked as hidden from launcher are ignored.

- updateShortcuts:
Similar to enabled/long-lived, developers cannot make shortcut hidden
from launcher by calling this api. An exception would be thrown when
updating a shortcut that is hidden from launcher.

- remove APIs:
Unchanged.

- reportShortcutUsed:
Unchanged.

- applyRestore:
Unchanged.

- disableShortcuts/enableShortcuts
Unchanged.

- requestPinShortcuts:
A shortcut cannot be pinned by launcher if it's hidden from launcher. An
exception would be thrown upon requesting to pin a shortcut that is
hidden from launcher.

Bug: 202335257
Test: manual enable feature flag for appsearch integration,
then run atest ShortcutManagerTest1

Change-Id: Ia0e5d31549c9d83efac9bc2a7ea894df425fd5cd
2021-12-11 04:30:18 +00:00
Jeremy Meyer
85c6cf1646 Merge "Don't update cached ApplicationInfo with old information" 2021-12-10 18:41:07 +00:00
Songchun Fan
5e303008b4 Merge "[pm] new APIs for ApplictaionInfo/PackageInfo/ComponentInfo/ResolveInfo flags" 2021-12-10 16:08:09 +00:00
Leon Scroggins
f96aa9e82b Merge changes from topics "GL_screen_decor", "VK_screen_decor"
* changes:
  Plumb support for rendering A8 in Vulkan
  Plumb through A8 for GL/EGL
  Add COLOR_MODE_A8/ColorMode::A8
  Treat AHARDWAREBUFFER_FORMAT_R8_UNORM as kAlpha_8_SkAlphaType
2021-12-10 13:49:39 +00:00
Artur Satayev
8029969f57 Merge "Add apex-system-service tag to AndroidManifest." 2021-12-10 13:08:42 +00:00
Jeremy Meyer
99a2847acb Don't update cached ApplicationInfo with old information
This adds a created timestamp to ApplicationInfo so that when an
instance is passed in to getPackageInfo() we can determine whether or
not we should update the cached version

Bug: 188059515
Test: Installed locally to verify behavior and appropriate log messages
Change-Id: Ie87781a9272ee89c5333f56d28da8c1d88feb78b
2021-12-10 00:16:33 +00:00
Leon Scroggins III
cbdbb66d8f Add COLOR_MODE_A8/ColorMode::A8
Currently unused. This will allow rending into A8 with HWUI

Bug: 193170859
Test: TODO
Change-Id: Ic1e1cb94dfa3dc08cbb174f0a38345d724570372
2021-12-09 12:12:26 -05:00
Felka Chang
dcd3a9cbe9 Add theme information during throwing exception
When an application defines themes that are not inherited from
android:style/Theme, it may cause UnsupportedOperationException.
The cause is that the attributes needed by the application are
defined in neither theme nor layout attribute set.

It takes really a long time to trace all of the themes applied.
This patch logs the basic information about themes to help the
developers to triage issues.

Test: manual test described in b/209708201#comment3

Bug: 209708201
Change-Id: I440aa18d9627adf5e35fd74d7adb1c895f0b169d
2021-12-09 14:44:05 +08:00
Xiaowen Lei
a676d9b3df Add callback registration mechanism for listening to communal state changes.
Design: go/communal-manager-api.

Note: this CL also removed "_MANAGER" from the communal service
constant, and "_manager" from the communal service name. When these
became unhidden, ApiLint.kt suggested the changes.
  - http://cs/android/tools/metalava/src/main/java/com/android/tools/metalava/ApiLint.kt;l=2369-2386;rcl=0ef26a465a89c45fcfd24d648883208cd0161fd2

Ignore-AOSP-First: tied to launch of new upcoming hardware.

Test: atest CtsAppTestCases:CommunalManagerTest
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 206054365
Change-Id: I6d225d6ddb482d9cffb16d1f9a25a98abd0cc382
2021-12-08 23:45:42 +00:00
Naomi Musgrave
07cad8890e Merge "Introduce WindowManagerState field for sandboxing" into sc-v2-dev am: f5284f89be am: f6340cbbf3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16340536

Change-Id: If930f6fd7eca64bd02109f7d57077ea5cd418b75
2021-12-08 23:18:37 +00:00
Naomi Musgrave
f6340cbbf3 Merge "Introduce WindowManagerState field for sandboxing" into sc-v2-dev am: f5284f89be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16340536

Change-Id: I4b2fd3e47e9cbb2e873fa0db37eed74f6badb734
2021-12-08 23:00:26 +00:00
TreeHugger Robot
4109534bb3 Merge "Add feature android.hardware.felica to PM" 2021-12-08 21:58:18 +00:00
Naomi Musgrave
f5284f89be Merge "Introduce WindowManagerState field for sandboxing" into sc-v2-dev 2021-12-08 21:52:51 +00:00
Yandry Perez Clemente
9f36073504 Merge "Adds trace messages when goAsync and finish are called." 2021-12-08 19:12:06 +00:00
Naomi Musgrave
5acb031f31 Introduce WindowManagerState field for sandboxing
New field indicates if ActivityRecord#providesMaxBounds has
calculated that sandboxing of max bounds to match app bounds
should be applied.

Test: manual
Bug: 193514437
Change-Id: I91587ce1e1ded7435038e2d1a7d038be57ff0f2f
2021-12-08 17:36:03 +00:00
Gavin Corkery
ad5d4baecb Add apex-system-service tag to AndroidManifest.
This change introduces a new <apex-system-service> tag to the manifest.

A manifest may have multiple <apex-system-service> tags, with each tag
denoting one system service that lives in an apex. If the service is
not in SYSTEMSERVERCLASSPATH, the android:path attribute may be used to
indicate where the jar is located on the filesystem. The minSdkVersion
and maxSdkVersion attributes may be used to indicate which SDKs the
service should start on.

Test: atest PackageParserTest
Bug: 192880996
Change-Id: I28e595b397ed8db6c412f490f12c73537972efab
2021-12-08 16:00:26 +00:00
Tom Natan
fd716d1d9a Merge "Remove EnabledSince from OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY" into sc-v2-dev am: 56b6a1936d am: 1cb7dbffd1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16405083

Change-Id: If5f945462c89d0348d9031265e9bbccac83aced5
2021-12-08 10:55:25 +00:00
Tom Natan
1cb7dbffd1 Merge "Remove EnabledSince from OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY" into sc-v2-dev am: 56b6a1936d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16405083

Change-Id: I9672c89a744537b07ffe1d28b92bbd1d73fef6d5
2021-12-08 10:39:47 +00:00
Thiébaud Weksteen
b0caff1e6a Merge "Add @JavaOnlyStableParcelable to AttributionSource" am: 5f5ff75870 am: 7228115341 am: e371f9ace3 am: 6e8a545bff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1908651

Change-Id: Ie60f20c4672c073d51a8843bddd2e97b0d3b635e
2021-12-08 05:10:56 +00:00
Thiébaud Weksteen
6e8a545bff Merge "Add @JavaOnlyStableParcelable to AttributionSource" am: 5f5ff75870 am: 7228115341 am: e371f9ace3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1908651

Change-Id: I70718406dd94c13d39e27984c5967e1f2647bc55
2021-12-08 04:55:07 +00:00
Thiébaud Weksteen
e371f9ace3 Merge "Add @JavaOnlyStableParcelable to AttributionSource" am: 5f5ff75870 am: 7228115341
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1908651

Change-Id: I24b6e309f896dfd9937f87739605c33d92c27cc6
2021-12-08 04:32:27 +00:00
Thiébaud Weksteen
7228115341 Merge "Add @JavaOnlyStableParcelable to AttributionSource" am: 5f5ff75870
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1908651

Change-Id: Ie151644aac4642ee16ee77a767bcc1c2f0e8306e
2021-12-08 04:16:08 +00:00
Thiébaud Weksteen
5f5ff75870 Merge "Add @JavaOnlyStableParcelable to AttributionSource" 2021-12-08 04:02:07 +00:00
Xiaoyu Jin
72beecddc1 Merge "Add conditional=true for @RequiresPermission" 2021-12-08 00:47:34 +00:00
Sally Yuen
beb5cef12f Merge "Bold StyleSpan further for auto-bold" 2021-12-07 22:40:10 +00:00
Xinyi Zhou
ba4c0a6476 Merge "Add Neary feature to PackageManager" 2021-12-07 19:07:47 +00:00