Typeface.NORMAL/BOLD/ITALIC/ITALIC_BOLD is used for specifying relative
from current Typeface. For example
Typeface face = Typeface.create("serif");
Typeface thickerFace = Typeface.create(face, Typeface.BOLD);
Typeface moreThickerFace = Typeface.create(tickerFace, Typface.BOLD);
For the purpose of providing font information, we should use weight/italic
value instead of style in Typeface.
The Columns.STYLE field was kept for preventing runtime crash of demo
apps.
Test: Manually
Change-Id: I732e8ee04a66f61321fc0a98dbfb8fdc0a4dd7a4
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.
Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
There are two separate overrides for display metrics in DisplayManager
and WindowManager:
- In DM - LogicalDisplay#mOverrideDisplayInfo, in most cases not null.
- In WM - DisplayContent#mBaseDisplayWidth/Height/Density, different
from #mInitialDisplayWidth/Height/Density values when some metrics are
forced.
When display was resized its windows weren't updated because of
two problems: old LogicaDisplay#mOverrideDisplayInfo was preventing
WM from detecting the change and override (base) display metrics were
never updated by resize.
When display size changes:
- Before this CL:
DM receives DISPLAY_CHANGED event, it updates internal values and
WM is notified about them with a message. In most cases there is an
override obtained from WM and WM doesn't get new values from
LogicalDisplay#getDisplayInfoLocked().
- With this CL:
WM will requests real updated values from DM without any overrides
and will decide whether to apply them or not: if there is no override
in WM - it will apply values from WM, otherwise it will keep the
override. Also it will always update initial display metrics if there
is a real change detected.
Bug: 35258051
Bug: 34164473
Bug: 36518752
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testDisplayResize
Test: #testForceDisplayMetrics
Change-Id: I2495c27797f11f9aaee4ea06648a8ccd29ac5b62
With this CL, an @hide method InputMethodManager#showSoftInputUnchecked
is marked to be deprecated and starts showing a warning message in logcat
when it gets called to tell application developers who are still using
old implementation fo android.support.v7.widget.SearchView that they
need to switch to support library ver. 26.0 or later version.
Other than that there is no behavior change in this CL.
Test: Manually verified as follows:
1. Flash an OS image
2. Complete the setup wizard (if any).
3. In N MR-1 AOSP repository
frameworks/support/gradlew -p frameworks/support support-v7-demos:assemble
4. adb install out/host/gradle/frameworks/support/support-v7-demos/build/outputs/apk/support-v7-demos-debug.apk
5. adb logcat -s InputMethodManager
6. adb shell am start -n com.example.android.supportv7/.Support7Demos
7. Tap AppCompat -> Action Bar -> Action Bar Usage
8. Tap the magnifier icon.
9. Make sure that the software keyboard shows up.
10. Make sure that in logcat a warning that showSoftInputUnchecked
is going to be removed is shown.
Fixes: 36015425
Change-Id: If01316a0c2a210f9ea03b53700d0ef651955ba9c
If the snapshot starting window has different dimensions than the
snapshots we have taken, we do the following:
- Create a child Surface that has exactly the dimensions of the
snapshot.
- We fill the parent surface with the app background color, as well
as all screen background decorations (status bar background,
navigation bar background).
- We also clip of the status bar/navigation bar background in some
cases, as it looks ugly if it's not behind the system bars.
- Furthermore, we inherit all layout flags on the window and all
layout relevant SystemUI flags on the window such that it's very
likely that the size will match, and the system bars are drawn
correctly.
- In order to make the transition from the snapshot to the real
window a bit more predictable/less messy, we enforce a minimum
duration the snapshot is visible, which is slightly more than our
app transitions.
Test: TaskSnapshotSurfaceTest
Test: Open app, go home, go landscape, open app again
Test: Go to multi-window, open app from recents with a snapshot
taken in fullscreen.
Fixes: 36703868
Change-Id: Ia2d4add6971a18ab7aa2942d2b644d6e87a402af
Test: Run window animation, make sure it's smooth
Test: Take systrace, make sure it runs at vsync-tick
Test: Move divider, make sure it's still smooth
Change-Id: I1600618e074be811134fe4ccb1dfbd5034820c71
Fixes: 36583867
It's confusing, but f_bsize is not the value you're looking for; the
real block size is f_frsize. Fix all those bugs.
Also, the vast majority of clients are interested in the usable
disk space, not including reserved space.
Test: builds, boots
Bug: 36840579
Change-Id: Ib1470389afd49c14cab62282ec1e978ebb2c4791
Previously FuseAppLoop instantiates Runnable for each command, which
causes lots of instantiation and GC.
Test: CTS
Bug: 35229514
Change-Id: Ifea098e5ade044b1a954c0b714c5b3270a95cd1a
This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access. It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.
Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
Expose both duration and maximum extended advertising events to limit
advertising time.
Test: manual
Bug: 30622771
Change-Id: I44df300995ef985526b93f8c24389775720b3432
(cherry picked from commit 5a355610fe6ac0460f7130375de97b4d7bae7ba4)
This patch adds some additional error checking for the advertising set
parameters, and some more comments.
Test: manual
Bug: 30622771
Change-Id: I87bd44f4179ef63694ad3ed656dc2acc52e40f1e
(cherry picked from commit f4ed33f5fa6ffa3bda6faff773a3fb90b16a760c)
UUID in service data field can be 2, 4, or 16 bytes long.
Test: manual
Bug: 36553478
Change-Id: Ib5ba2d16065496ca311e8642a15a7ea6bc84d4c1
(cherry picked from commit 72e9e9f81504559ca18b71358203b1b39d9f0581)