Since WindowContext won't add WindowToken from the client side,
addWindowTokenWithOption is no more needed. Also remove the logic
to invoke removeWindowToken from the client side.
Bug: 159767464
Bug: 153369119
Test: atest WindowManagerServiceTests WindowManagerPermissionTests
Change-Id: Ib0c948dca223cf8d056865ce3a0d4adaef07d247
This change promotes DeviceStateManager to a TestApi and exposes three
additional methods:
- getSupportedStates: returns a list of state ids that can be used with
requestState().
- submitRequest: requests that the device enter the supplied state.
- cancelRequest: clears the current requested device state.
to be used initially in CTS tests.
Bug: 177235528
Bug: 177236115
Test: atest DeviceStateManagerServiceTest
Test: atest DeviceStateManagerGlobalTest
Change-Id: Ieae9208420ddecea641a5c44f1610d3cb7071b07
This reverts commit 9c2775572e.
Reason for revert: Unanticipated performance degradation observed in user-switching scenarios; investigation will follow.
Change-Id: Ie06e909a92be45a24cc46b458a372eadf302e6c4
1. Use registerWindowContextListener instead of
addWindowTokenWithOptions
2. Clean up the logic of sending the config to the client in WindowToken
3. Add a mechanism in WMS#addWindow, when a WindowContext adds a view,
the server side will switch to register the WindowToken for the
WindowContext.
In this way, we won't add a WindowToken until adding the fist view.
Also, we could apply an existing window token by overriding
WindowManager.LayoutParams.token.
Bug: 159767464
Bug: 153369119
Test: atest WindowContextTests WindowContextPolicyTests
Test: atest WindowContextTest
Test: atest WindowContextListenerControllerTests
Change-Id: I2396187c445306d18101706c4521edd9cf92facf
MeasuredEnergyStats now supports a variable number of
'buckets', including both the standard buckets (fixed number)
and additional custom buckets (variable number) whose meaning
is unknown to BatteryStats (but is enumerated as an 'ordinal').
This will be used to store per-uid energy data from custom
power components.
Test: atest MeasuredEnergyStatsTest
Test: atest com.android.internal.os.BatteryStatsTests
Bug: 179107328
Bug: 174186358
Change-Id: I0022ac6940daca5f1e7d0e502eed01effa71f796
Move GNSS listener overhead into statics so it's shared per process, and
do not instantiate by default.
Previously GNSS requests were multiplexed by LocationManager instance,
this is now removed. This could mean additional binder overhead, but
it's pretty unlikely that this feature was in active use anywhere, as in
any large application that has multiple gnss requests, they are usually
coming from different contexts (and thus LocationManager instances) and
would not have seen the benefit of multiplexing anyways.
Bug: 179261871
Test: atest CtsLocationFineTestCases
Change-Id: I8b7a41c13dfe219c326b1e519483d89d2b721ce5
Sandbox Display#getRealSize and WindowManager
bounds when letterbox or size compat mode are
applied to the configuration. Display uses
this field to provide the sandboxed display
size.
Test: atest WindowConfigurationTests
Test: atest FrameworksMockingCoreTests:android.view.DisplayTests
Test: atest WmTests:SizeCompatTests
Bug: 171386167
Change-Id: I6f78edcd9214b52ab0708e3892bc86ee05bb5b9a
Allow three types of the letterbox wallpaper:
- Solid background using color specified in R.color.config_letterboxBackgroundColorSolid color
- Color specified in R.attr.colorBackground for the letterboxed application
- Color specified in R.attr.colorBackgroundFloating for the letterboxed application
Also, adding ADB commands for each config value:
- adb shell cmd window set-letterbox-background-color [reset|color]
- adb shell cmd window get-letterbox-background-color
- adb shell cmd window set-letterbox-background-type [reset|solid_color|app_color_background|app_color_background_floating]
- adb shell cmd window get-letterbox-background-type
Test: manual with ADB commands, atest LetterboxTest
Fix: 179088234
Change-Id: I23cf0b52c9f95d1f92255731bc7be165a575c7cd
Similar to passing in display metrics. We can use
ActivityThread.currentApplication() as the context for getting
PermissionManager in system server process because it will be created
early in ActivityThread.attach() before any custom logic can run, but
it becomes a problem for apps because they can run their own logic by
overriding Application.attachBaseContext() and do things there before
ActivityThread.currentApplication() becomes non-null.
So pass in the split permissions explicitly as an external dependency
for ParsingPackageUtils, and move the getPackageArchiveInfo()
implementation from PackageManager to ApplicationPackageManager to
utilize the context there. PackageParser2 can get the split
permissions internally because it's only used in system server.
Fixes: 178155985
Test: manual
Change-Id: I8213cf752e16b08328ad1150b2639da18c5d0e83
(cherry picked from commit 7b8974d375)
Use the same VibrationThread to control combined vibrations on all
vibrators.
Bug: 167946816
Test: VibratorManagerTest
Change-Id: I40c9f235f05baf85e5ed15bf3bce41451283c7f2
- Created a new @hide class RoundedCorners
- The class is used to create and manager all the rounded corners.
- Created a new public class RoundedCorner
- Represent each rounded corner.
- Created a new public API in Display to get the original rounded
corners.
- Created a new public API in WindowInsets to get the rounded corners
relative to the window bounds.
Bug: 161808676
Test: atest RoundedCornerTest RoundedCornersTest
DisplayPolicyLayoutTests DisplayPolicyTests
WallpaperControllerTests
Change-Id: I58c671b0e9a077cdf26764c6302537c72db0f667
Created new API methods that allow apps to access external battery info
of devices such as bluetooth connected gamepads.
Bug: 161633432
Test: atest android.hardware.input.cts.tests.SonyDualshock4BluetoothTest
atest android.hardware.input.cts.tests.SonyDualshock3UsbTest
Change-Id: Iba59fc9a259818b03c24ee8c2c49601952ed65a3
Merged-In: Iba59fc9a259818b03c24ee8c2c49601952ed65a3
This is a contract class for a provider that reads contacts from the SIM
card.
Bug: 154363919
Test: atest CtsSimPhonebookProviderTestCases CtsSimPhonebookProviderNoSimTestCases
Change-Id: I584150dd8352dbb49d70ea28c6d064a6336d018d
The AndroidText.xml needs the root preparer to run on non-rooted
devices.
Bug: 177115481
Test: adb unroot && atest OverlayDeviceTests
Change-Id: I4377207428182fbb76c09abef248b69eeae6acf5
Changes included:
* 081c412: Remove spam logs from GenericDocumentToPlatformConverter.
* 69df01d: Fix an issue with nested documents after serialization.
* 0197939: Update Jetpack API usages to build against the latest SDK.
* 843f415: Rename @AppSearchDocument to @Document.
* 37adb0f: Update docs around database name.
* 19383f8: Apply naming changes to AppSearchSession and GlobalSearchSession.
* 8359c2b: Update SetSchemaRequest to comply with API council requirements.
* 4b04aba: Update PutDocumentsRequest APIs to align with API council guidance.
* 3c8ebfb: Update SearchSpec APIs to match API council recommendations.
Bug: 174614009
Bug: 178540467
Bug: 175763859
Bug: 171340471
Test: Presubmit
Change-Id: I4649ffe1d1c94b0c6125943772d33c6fb38d0006
GameManager service is a service to manage game related features. This
patch creates the initial service to manage the game mode and persist
the data across reboot.
Bug: b/174956354
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Change-Id: Iee2ab47c79d29f48847bc6d4b3eb781a5af18ff4
Adds a new attribute to downloadable font xml
that checks if downloaded font is on the system
already and uses that instead.
Test: added new tests
Test: atest ResourcesTest
Test: atest FontResourcesParserTest
Bug: 178589784
Change-Id: Ib7c32ba3037c534e9ab8c144716d68e46c908a39