This reverts commit f21c885ca7.
Reason for revert: Have regression b/168268396.
Needs to pull out from Nov. builds.
Bug: 162627132
Change-Id: I29fa3937d1655a0cc7591abcfa2067f4fb2b2bcb
SlicePermissionActivity reads provider_pkg from intent, which can be
modified at will. As a result user might see incorrect package name in
the dialog granting slice permission.
Bug: 159145361
Test: manual
Merged-In: I8b66c02786df4096dad74b7e76255d5ddd1d609d
Change-Id: I8b66c02786df4096dad74b7e76255d5ddd1d609d
The application may get Resources instance from Resources.getSystem()
and context.getApplicationContext().getResources(). Since fixed
rotation is introduced that allows an activity to start in a different
rotation than the current display, when using getConfiguration() and
getDisplayMetrics() of these Resources instances, the orientation
and metrics need to be the same as current display is rotated.
Otherwise the app may show unexpected UI layout.
Although it is not recommended to use global resources/config for
activity. One of the goal of fixed rotation transform is to simulate
the app is started in a rotated environment, so this CL makes the
configuration and display metrics of system resources are consistent
with application and activity for compatibility.
About WindowProcessController and ActivityStackSupervisor:
The process configuration passed to LaunchActivityItem may be
associated from activity. if the sequence number of configuration
is overridden by activity, the configuration may be ignored when
launching the activity because the sequence number isn't larger
than the previous process configuration. Although there will be a
ConfigurationChangeItem later to update correct state, the app may
get the intermediate state with old configuration and metrics.
About ResourcesManager and DisplayAdjustments:
There are 2 new fields appWidth and appHeight added to
DisplayAdjustments#FixedRotationAdjustments because the display
metrics from Resources.getSystem() is independent from activity
configuration. Only window manager knows the rotated size, so
the values need to send to client and then ResourcesManager takes
the adjustment to change the global display metrics.
About WindowToken:
When fixed rotation is applied on the token, send the
FixedRotationAdjustmentsItem first so the later configuration
change can pick the adjustment at ActivityThread. And because the
registration of activity configuration only occurs on add/remove
activity, if it is only switching to another existing activity in
different orientation, the process configuration still needs to
be updated.
About ActivityThread:
The code flow for a rotated activity (DA = display adjustments):
- Launch new activity
handleLaunchActivity: override app DA
handleConfigurationChanged: adjust global display metrics by DA
performLaunchActivity
createBaseContextForActivity: override activity DA
- Resume existing activity
handleFixedRotationAdjustments: override app and activity DA
handleConfigurationChanged: adjust global display metrics by DA
handleResumeActivity
Also some minor corrections:
- Fix wrong display metrics adjustment that xdpi and ydpi should
not be swapped because they are physical attributes.
Bug: 167564038
Test: atest DisplayAdjustmentsTests
AppConfigurationTests#testRotatedInfoWithFixedRotationTransform
WindowProcessControllerTests#testProcessLevelConfiguration
DisplayContentTests#testApplyTopFixedRotationTransform
Change-Id: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
Merged-In: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
This reverts commit e49aa726f0.
Reason for revert: We've decided not to have this in the QPR.
Bug: 164440539
Change-Id: I72ca946f1a5be937b3f3bed746e4251fa9257891
Merged-In: I72ca946f1a5be937b3f3bed746e4251fa9257891
When setNightModeActivated is called, the change affects the current logged in user
Also, permission checks are made before changing dark theme
Test: manual
Bug: 168039904
Merged-In: I7786d9dde10f7547f5dd9fb00661fb89fde9f05c
Change-Id: I7786d9dde10f7547f5dd9fb00661fb89fde9f05c
(cherry picked from commit f16e87a992)
Reduce lock contention for processes that use
ResourcesManager#createResources on background threads by preloading
the apk assets into a temporary cache while the RM lock is not held.
As a result, multiple threads may be performing I/O opening the same
apk assets since multiple threads could be preloading the same apk
at once.
Bug: 111966000
Test: observe significantly less monitor contention with owner bg
threads calling android.app.ResourcesManager.createResources
Merged-In: Iccf383cb8e1a358af4f71ac242e2216dc5a19ff2
Change-Id: Iccf383cb8e1a358af4f71ac242e2216dc5a19ff2
(cherry picked from commit fb9a011b1d)
* changes:
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Update language to comply with Android's inclusive language guidance
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092
Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
the app freezer state can be toggled in multiple situations when a
debugging tool like heapdump is invoked, or when system_server dumps its
binder connections. All these uses are potentially concurrent and a
robust method to handle reentrancy is necessary to avoid leaving the
freezer in a state incompatible with a specific operation.
This patch moves freezer enable and disable operations from Process to
CachedAppOptimizer (ActivityManager), introduces a new ActivityManager API
to centralize all freezer state changes to ActivityManager and modifies
client code accordingly.
Bug: 151225245
Test: manually verified that no regression are introduced on freezer
behavior, verified that concurrent behavior is handled properly
Change-Id: I7d588cc6e0499012dce64ed4e42ff2adb336062d
Merged-In: I7d588cc6e0499012dce64ed4e42ff2adb336062d