DecorView has no support for multi-display (bug 65172902).
Until that is done, the easy fix for displaying cut, copy, paste
on non-default display is to modify FloatingToolbar.
FloatingToolbar uses context of Default display. Changed it
to use context of the window (which makes it multi-display
compatible).
Fixes: 64837794
Test: Manual using AAe's KitchenSink test app
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I513f1aac1c0d22355c996247e3bf56c6d812348f
Such that apps can set this in the theme and get a splash screen
that has a light navigation bar if requested.
Test: LightBarThemeTest
Change-Id: Iee93c49743f66ecad76e0a056ba16a1785f22784
Fixes: 62429332
Before this cl, there exists nullpointer crash in PowerProfile in
following part:
"sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0"
To my best knowledge, it is because in
PowerUsageSummary.SummaryProvider, we may create batterystats in
meantime:
1. setListening is invoked in worker thread, in which we will force
update the batterystats.
2. In setListening we will register receiver, which may update
batterystats through onReceive in UI thread.
This cl adds static lock in PowerProfile, making the init part can
only be accessed by an thread at a time.
Bug: 64209576
Test: Manual
Change-Id: I00bc094f44416669b4f0e11e647b0fae2ff61013
13405c5529 introduced a bug where
activities using ResolverActivity without dafaults/always option get selected,
the ResolverActivity tries to set a default causing a crash.
Test: Test Application using TECH_DISCOVERED intent filter
Bug: 38358120
Change-Id: Id36635d84963bcf1dc7e55938e2370542ed291ab
Symptom:
"Share with" popup displayed incompletely, and cannot be slid after
rotated the screen twice.
Root cause:
Since ChooserActivity's configChanges attribute contains
"screenSize|orientation" , when user rotates device, Android will
not recreate ChooserActivity, its content view ResolverDrawerLayout
is also not recreated. In ResolverDrawerLayout's onMeasure, it will
call getHeightUsed to calculate the ListView's height. getHeightUsed
will check against the lowest child view plus padding and margin
instead of the actual measured height of the ListView. This lets the
ListView hang off the edge when all of the content would fit on-screen
. Because of ResolverDrawerLayout has not been drawn yet, we can not
get the actual showing items' count of ListView before it's drawn, the
result of getChildCount for ListView will return the value in landscape
mode. The heightUsed of ListView might be smaller. mCollapsibleHeight
will be 0. When received a move action, the mCollapseOffset and new
position might both be 0.
Solution:
When configuration changed, we should rebuild the list and refresh
adapter's data set. Just like onRestart does.
Bug: 34365764
Change-Id: I4be0f9afc68588fbb0d8d152c41509650d04c754
The metrics are persisted in /data/system/shutdown-metrics.txt file
property and logged after reboot. MetricsLogger API cannot be directly
used during shutdown since event log is cleared on reboot/power off.
Test: manual reboot/shutdown and verify that metrics are logged
Bug: 64815357
Change-Id: I7fa1af8be58a80a3d5bae26d55c1ed40bf98f4c0
Added a divider view in popup_menu_item_layout.
Hiding divider where they are not required in MenuAdapter.
Bug: 32172964
Test: Added test method testGroupDividerEnabledAPI to PopupMenuTest.java
Change-Id: I9cf0e9a72f085336e9f136a7ed17aead0e30760c
When launching to quicksettings, the camera icons showed
above the camera, clashing with their UI
Test: launch camera (locked) and click on galery
Fixes: 64317909
Change-Id: I4ef68963af11f6d0be739c79cdf352ba35d9ece0
First pass at transitioning away from using stack ids for windowing mode
to WindowConfiguration. Added some TODO that will require the introduction
of applicationType in WindowConfiguration before additional conversation
can be done.
Test: bit FrameworksServicesTests:com.android.server.wm.WindowConfigurationTests
Test: adb shell am instrument -w -e package com.android.server.wm com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: go/wm-smoke
Change-Id: I2b315623faa16445a9f942e082089123842cb5a1
In TextView and Switch, version-gate the use of
setUseLineSpacingFromFallbacks() to apps targeting Android P and
later for backward compatibility.
In internal widgets, ImageFloatingTextView and SubtitleView, always
turn it on, since there is no backward compatibility concerns.
Bug: 28963299
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.SwitchTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Icfe4e71ba26bbc6755ba12ddab72e6bf20b3ce25