Commit Graph

7894 Commits

Author SHA1 Message Date
TreeHugger Robot
173222142f Merge "Always use Context.getSystemService() to get IMM" 2018-09-18 22:25:52 +00:00
kopriva
64c4523ed4 Merge "docs: fixed five typos" into pi-dev am: 82b413428e
am: d366837e05

Change-Id: I0cf5630bc936c872ca936f2d3de9e8aaa509f083
2018-09-18 12:10:35 -07:00
kopriva
d366837e05 Merge "docs: fixed five typos" into pi-dev
am: 82b413428e

Change-Id: I4af571d6bcfa151235223b51cb8135fbacb62c82
2018-09-18 12:00:24 -07:00
Yohei Yukawa
484d4afc92 Always use Context.getSystemService() to get IMM
This is a preparation to deprecate the following two methods.

 * InputMethodManager#getInstance()
 * InputMethodManager#peekInstance()

Since we soon need to stop relying on the current per-process
InputMethodManager singleton model to fully support multi-display,
those two methods really need to be deprecated.

With this CL, framework code no longer depends on
InputMethodManager#peekInstance(), which is also marked as deprecated
in this CL.

InputMethodManager#getInstance() is a bit tricky because it also works
as a constructor of such a per-process singleton instance.  Remaining
two call-sites of this method will be migrated in a subsequent CL.

This is a mechanical refactoring, which in theory should have no
observable logical behavior difference.

There could be a small performance regression, but it is basically not
avoidable to correctly support multi-display scenarios.

Bug: 115891476
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: atest CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: atest FrameworksCoreTests:com.android.internal.inputmethod
Test: atest FrameworksServicesTests:com.android.server.textservices
Change-Id: I5db31491f3d47d3ad4a621e956995135c72e007b
2018-09-17 16:47:08 -07:00
kopriva
7ecfe31427 docs: fixed five typos
Test: make ds-docs

Bug: 37095452
Bug: 37001217
Bug: 37004068
Bug: 37015340
Bug: 37044652

Change-Id: Ib305df88b63286810d7722e73321ddb238b45e8e
Exempt-From-Owner-Approval: Docs-only change
2018-09-17 15:17:50 -07:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
kopriva
eac0905c11 docs: fixed instances of typo in 'overridden' am: debd4ee72d
am: 9b641cbc71

Change-Id: I071643e73656a2a17a3c0ab89ffacda9c1bfec80
2018-09-13 15:11:27 -07:00
kopriva
9b641cbc71 docs: fixed instances of typo in 'overridden'
am: debd4ee72d

Change-Id: Idde6240486463dee51cdc27b8cd066a80fb869e0
2018-09-13 14:57:25 -07:00
kopriva
debd4ee72d docs: fixed instances of typo in 'overridden'
This affects several files beyond those mentioned in the bug.

I didn't fix some instances because the files had code
problems that blocked presubmit checks.

Test: make ds-docs

Bug: 37094741

Change-Id: I642f0384fef2b267ebc970bae1b4fb90bae667e7
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 11:40:59 -07:00
Haoyu Zhang
0ed64376e4 Merge "Add Missing fontVariationSetting attr Javadoc" 2018-09-12 12:13:17 +00:00
Haoyu Zhang
aff7bd76ec Add Missing fontVariationSetting attr Javadoc
Bug: 79477441
Test: m offline-sdk-docs
Change-Id: I6d40f6f176674e0b08434e997c4c4a0b66fe6f78
2018-09-12 12:13:04 +00:00
Seigo Nonaka
a8fab8acdb Move maximum weight constant from Typeface to Font and make it public
Now we have Font class. It is good to move max weight constant from
Typeface to Font.

Bug: 112327179
Test: atest FontTest

Change-Id: I3946ac150a02bf0cafa0fc81e61e69c31b45ed1d
2018-09-10 10:34:23 -07:00
Haoyu Zhang
f0e6794cae Merge "Add fontVariationSettings to TextView and TextAppearance in XML" 2018-09-07 17:43:47 +00:00
Nader Jawad
071149a9e7 API Review: StateListDrawables#getDrawableForState
Renamed getStateDrawableIndex to findStateDrawableIndex
based on API review feedback.

Change-Id: If07fe279fb02bc8180a28c7f58ea84ca030773ad
Fixes: 113856171
Test: Re-ran CTS
2018-09-05 17:28:37 +00:00
TreeHugger Robot
a8aaa38d51 Merge "[Magnifier-60] Fix race condition after #dismiss" 2018-09-04 14:37:19 +00:00
Mihai Popa
ddcd54813b [Magnifier-60] Fix race condition after #dismiss
The CL fixes a race condition introduced by
I2799229bee7acfbd6236089487a5766f46605366, which caused apps to crash
when, for example, the following happened:
 1. #show(xc, yc, xm, ym) is called on the main thread, and the
    arguments are stored in mPrevShow[Source/Window]Coords
 2. #show(xc, yc, xm', ym') is called on the main thread (note that only
    the window position is different from the previous call), and we
    post a job to the pixel copy handler thread to only update the
    expected position of mWindow (without doing pixel copy)
 3. the job starts and checks that mWindow != currentWindowInstance is
    false
 4. #dismiss() is called on the main thread, mWindow is set to null
 5. the position update job at step 3 continues, grabs mLock but now mWindow is null
    and the crash happens

Bug: 113272299
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Ibc815888f4eeaf077fa1a9ddfb1d4d401382623a
2018-09-03 17:56:27 +01:00
Haoyu Zhang
d62697075d Add fontVariationSettings to TextView and TextAppearance in XML
Bug: 73235218
Test: atest TextViewFontVariationTest
Change-Id: Ic284846919b1c58dc696a140b59b3244491c774e
2018-08-31 12:09:44 -07:00
TreeHugger Robot
1dfc2c7188 Merge "[Magnifier-48] Allow on-the-fly zoom update" 2018-08-31 09:03:30 +00:00
TreeHugger Robot
b6a2cfbd75 Merge "[Magnifier-47] Expose magnifier properties" 2018-08-30 13:36:51 +00:00
TreeHugger Robot
dd13082dde Merge "[Magnifier-46] Add builder for magnifier objects" 2018-08-30 11:25:15 +00:00
Mihai Popa
beeaf5589d [Magnifier-48] Allow on-the-fly zoom update
The CL adds Magnifier#setZoom(float), which allows dynamically changing
the initial zoom applied to the content that will be magnified and
displayed in the magnifier.

Bug: 72211470
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I1dd01085ef5a1589a3602aefd03223d1451564f5
2018-08-29 11:16:26 +01:00
Mihai Popa
c2e0bee9ea [Magnifier-47] Expose magnifier properties
The CL adds public getters around magnifier properties. The properties
mostly correspond to the ones that can be specified using the magnifier
builder class.

Bug: 72211470
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I84c827bed039cb46b19c2dfb5123bd2d97374eca
2018-08-29 11:16:26 +01:00
Mihai Popa
469aba83bb [Magnifier-46] Add builder for magnifier objects
The CL adds a builder class that enables creating Magnifier objects with
custom properties. The defaults of the builder remain the predefined
values of the magnifier in P.

Bug: 72211470
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I066082fb17cfb8c483c49b7011abfa9dca9de77a
2018-08-29 11:16:14 +01:00
Chih-hung Hsieh
625a46dfb1 Merge "Use multiple patterns and emails in per-file syntax." am: 62d0edc6ef am: f16ded6120
am: 26b072d20d

Change-Id: I5929eb1f8c5906dd6fb1dc1f2166d26a7f6d7c27
2018-08-24 13:39:51 -07:00
Chih-hung Hsieh
26b072d20d Merge "Use multiple patterns and emails in per-file syntax." am: 62d0edc6ef
am: f16ded6120

Change-Id: I76a342fdc7097ba5941f78873145999612379e6c
2018-08-24 13:13:34 -07:00
Chih-hung Hsieh
f16ded6120 Merge "Use multiple patterns and emails in per-file syntax."
am: 62d0edc6ef

Change-Id: I15a2aaf9dd002f1164146d81e8adbbe2bca74231
2018-08-24 12:48:10 -07:00
Chih-Hung Hsieh
002a574a7d Use multiple patterns and emails in per-file syntax.
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: Ia3e1df3f5ba8ad29489a017e55890b4dbb23a64d
2018-08-23 14:53:16 -07:00
TreeHugger Robot
029ce60caf Merge "Fixing static instant of OnClickHandler is getting modified at runtime" 2018-08-23 21:00:03 +00:00
TreeHugger Robot
83b8a73508 Merge "[Magnifier-45] Add #show(float,float,float,float)" 2018-08-23 12:25:40 +00:00
Sunny Goyal
0279453309 Fixing static instant of OnClickHandler is getting modified at runtime
Bug: 113071278
Test: atest core/tests/coretests/src/android/widget/RemoteViewsTest.java
Change-Id: Ie32e897a7a82e8dced49927312b43273e2e90db9
2018-08-22 16:09:43 -07:00
David Brazdil
7ac9e3a1c7 Merge "Greylist requested hidden API" am: 473654c377 am: 9582cf7c1b
am: e10a083e57

Change-Id: Ie1b9085d2766bae6e4725ae50250cdb8b5efd9c6
2018-08-22 08:35:11 -07:00
David Brazdil
e10a083e57 Merge "Greylist requested hidden API" am: 473654c377
am: 9582cf7c1b

Change-Id: I635076240a90acd213a4ec73460e882b6a1a2a74
2018-08-22 07:32:03 -07:00
David Brazdil
9582cf7c1b Merge "Greylist requested hidden API"
am: 473654c377

Change-Id: I01c25f8570851fee7f5db6f355de071acc1f095d
2018-08-22 06:08:03 -07:00
David Brazdil
473654c377 Merge "Greylist requested hidden API" 2018-08-22 09:14:05 +00:00
Mathew Inwood
5d1b9f6ef8 Merge "Add @UnsupportedAppUsage annotations" am: 6d891937a3
am: 4373a4d763

Change-Id: Ie6ca6dd36cf3fc769ce04db3de9bf762ddb97d4d
2018-08-21 13:34:09 -07:00
Mathew Inwood
4373a4d763 Merge "Add @UnsupportedAppUsage annotations"
am: 6d891937a3

Change-Id: I919b9dddda7d848dc96c83d0cfb0aa4e3179fb12
2018-08-21 13:20:01 -07:00
David Brazdil
47451322ee Greylist requested hidden API
Greylist APIs from public requests which used to be off-limits because
the classes were not discovered by Doclava.

Bug: 79904498
Bug: 79902686
Test: N/A
Change-Id: If6678bed5c2da076f97e3de7ff0bc4e7ebaf1965
2018-08-21 16:59:24 +01:00
Mathew Inwood
a85f4eb6c6 Add @UnsupportedAppUsage annotations
For packages:
  android.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Idf7ccc7a850fa984ea16f91cdd70159087274e5c
Merged-In: Ic61019b1df85448a158fc2ba55c326353222c6b9
2018-08-21 16:08:34 +01:00
Mathew Inwood
978c6e2190 Add @UnsupportedAppUsage annotations
For packages:
  android.widget

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ic61019b1df85448a158fc2ba55c326353222c6b9
2018-08-21 15:58:55 +01:00
Mathew Inwood
abaa38a1f7 Merge "Code reformatting for upcoming automated code changes." am: 661facc2f1 am: aca9678a86
am: dc236d5fce

Change-Id: Ic4fef82d5c6018e55143e0a570e32ec930a6c072
2018-08-21 03:20:19 -07:00
Mathew Inwood
dc236d5fce Merge "Code reformatting for upcoming automated code changes." am: 661facc2f1
am: aca9678a86

Change-Id: I153eca69dcddd809f11ebc398380a5dca9408041
2018-08-21 03:07:25 -07:00
Mathew Inwood
aca9678a86 Merge "Code reformatting for upcoming automated code changes."
am: 661facc2f1

Change-Id: Ie2c10b5d6afadec937400f651aecc08a9aa494df
2018-08-21 02:54:18 -07:00
Mathew Inwood
986d790edb Code reformatting for upcoming automated code changes.
Adding annotations to individual fields cannot be easily done when there
are two fields defined in a single statement. Put each definition in a
statement of its own.

See go/UnsupportedAppUsage for more context.

Bug: 110868826
Test: m
Change-Id: If3adee4136f3c406e9cebd9d2845b22b979b8353
2018-08-20 14:55:21 +01:00
Mathew Inwood
2fb271cb29 Merge "Code reformatting for upcoming automated code changes." am: d68f003c67 am: d48ec695d3
am: 640fa1526d

Change-Id: Idc4ce525b14a29f6ed87850f6df9577bdd05f38e
2018-08-17 02:08:49 -07:00
Mathew Inwood
640fa1526d Merge "Code reformatting for upcoming automated code changes." am: d68f003c67
am: d48ec695d3

Change-Id: Ic0c27635bc63b0cfdf437fc819b52b9cb2d5244e
2018-08-17 01:54:58 -07:00
Mathew Inwood
d48ec695d3 Merge "Code reformatting for upcoming automated code changes."
am: d68f003c67

Change-Id: I4c95500cddf7659b13ada0ad70584aef190ced7f
2018-08-17 01:44:55 -07:00
Jeff Chang
9744262ffa Merge "Support the toast Window to show on the secondary display." 2018-08-17 01:14:51 +00:00
Mathew Inwood
74e7aed9c6 Code reformatting for upcoming automated code changes.
Adding annotations to individual fields cannot be easily done when there
are two fields defined in a single statement. Put each definition in a
statement of its own.

See go/UnsupportedAppUsage for more context.

Bug: 110868826
Test: m
Change-Id: I7756185bdfdca15fa8f73ef4b76c4f70abcd8ea6
2018-08-16 17:29:31 +01:00
Jeff Chang
48ecef4bfb Support the toast Window to show on the secondary display.
1) Looking for the specific display when add a toast window.

2) Modify the enqueueToast interface to support the toast with
   specific dispaly Id.
   2.1 Toast get the specific display id from context.
   2.1 Toast use the new interface with display id to communicate with
       the Notification manager servcie.

3) Support to add/remove toast window token according to the displayId.

Bug: 80001975
Test: atest WindowManagerSmokeTest ActivityManagerMultiDisplayTests
Test: atest android.widget.cts.ToastTest
Test: manual, use ActivityView & launch a toast testing app in virtual
      display
      1. Make a toast.
      2. Verify the toast if show on the virtual display

Change-Id: I3a95c291af647ed9c6e966b2a90924097df19b6a
2018-08-15 14:20:54 +08:00