Commit Graph

83813 Commits

Author SHA1 Message Date
Daichi Hirono
39a305ea21 Merge "Stop invoke initAppOps in Camera default constructor." am: 0890a2b51e
am: f98d5cb38b

Change-Id: Id24b3456d69a03557382023ddcff6ebd4aa3cc9e
2018-09-10 20:09:40 -07:00
Daichi Hirono
f98d5cb38b Merge "Stop invoke initAppOps in Camera default constructor."
am: 0890a2b51e

Change-Id: I6ed52f595757c3ca7308969105f05e6bd55dee65
2018-09-10 20:00:30 -07:00
Treehugger Robot
0890a2b51e Merge "Stop invoke initAppOps in Camera default constructor." 2018-09-11 01:32:53 +00:00
David Brazdil
0b62a08c76 Merge "Move ApplicationInfo.usesNonSdkApi to private flags" am: fdd378c594
am: de5cc1ff5b

Change-Id: I8849fab757c732ab600e243c187f9acd0aa2c9d7
2018-09-07 04:15:02 -07:00
David Brazdil
de5cc1ff5b Merge "Move ApplicationInfo.usesNonSdkApi to private flags"
am: fdd378c594

Change-Id: I43fe6b903eb4cd900da9ebc2b10893213329c691
2018-09-07 03:12:59 -07:00
David Brazdil
fdd378c594 Merge "Move ApplicationInfo.usesNonSdkApi to private flags" 2018-09-07 09:32:13 +00:00
Ryan Prichard
66e6f61bb1 Merge changes from topic "b113052379-cp-from-pi-dev-p2"
am: c9fc995e0e

Change-Id: Ia83844fa93a02234178042be85cc99eaeaca221f
2018-09-06 14:37:27 -07:00
Eino-Ville Talvala
e0641b2619 Camera: Documentation updates for calibration and distortion correction
am: 96024af857

Change-Id: Ie07f7074a0347f63cd8c6f2bb715efbdba8b717f
2018-09-06 14:30:42 -07:00
Ryan Prichard
c9fc995e0e Merge changes from topic "b113052379-cp-from-pi-dev-p2"
* changes:
  Camera: Documentation update to remove physicalIds
  Camera: Documentation updates for calibration and distortion correction
2018-09-06 20:35:24 +00:00
David Brazdil
fa5e8361c4 Move ApplicationInfo.usesNonSdkApi to private flags
No need to create an extra field for a boolean flag. Move the recently
added ApplicationInfo.usesNonSdkApi to one bit in privateFlags.

This also solves an issue where the field was not propagated during
copying of the data structure.

Bug: 113315999
Test: phone boots
Merged-In: I09f8f39454c013a84893ac304904a4412fc542bf
Change-Id: I09f8f39454c013a84893ac304904a4412fc542bf
(cherry picked from commit a5b4df2a89)
2018-09-06 15:31:33 +01:00
Michael Wachenschwanz
379daa98dd Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev am: d32c2a4189 am: 1f5050c054 am: 4fda414ed6
am: 78a2caeb94

Change-Id: Ie28836c6080238499bc218b2fb11597235e5b7a1
2018-09-05 20:59:25 -07:00
Michael Wachenschwanz
78a2caeb94 Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev am: d32c2a4189 am: 1f5050c054
am: 4fda414ed6

Change-Id: I7c7901f0147f7577240803cc2adc4e189f1994b4
2018-09-05 20:23:16 -07:00
Michael Wachenschwanz
4fda414ed6 Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev am: d32c2a4189
am: 1f5050c054

Change-Id: Ibae3dc08eabf5b12a8f1a03ea33bd54a28e0442e
2018-09-05 19:01:27 -07:00
Michael Wachenschwanz
1f5050c054 Merge changes from topic "am-bdb0270e-8295-4ee6-be36-2709e172d48f" into oc-dev
am: d32c2a4189

Change-Id: Ie2ad590368e9c10f6222d9ae65470ebb12dabac2
2018-09-05 18:46:57 -07:00
Daichi Hirono
2dba5c8417 Stop invoke initAppOps in Camera default constructor.
Camera default constructor does not create the underlying native camera
object. Thus calling _enableShutterSound after the default constuctor
causes application crash.

Bug: 80498247
Test: Manually modify the code to return MODE_IGNORED for
      AppOpsService#checkAudioOperation() and to return false for
      CameraManager#supportsCamera2ApiLocked. Then start voice call in
      Hangouts.

Change-Id: Id738c4d46a8e3625bc3b1142b11acac9cfb0b603
Merged-In: Id738c4d46a8e3625bc3b1142b11acac9cfb0b603
(cherry picked from commit cb63c640cd)
2018-09-05 01:51:59 +00:00
Ryan Prichard
3cd4b66ceb Merge changes from topic "b113052379-cp-from-pi-dev-p1"
* changes:
  Camera: hardware level related doc update
  Camera: codegen doc update
2018-09-04 20:20:17 +00:00
Yohei Yukawa
045109ab03 Merge "Let SoftInputWindow handle BadTokenException" am: 680f6e802c
am: da916d83a0

Change-Id: Id3c6ae4c997c8394517d5c75e6b2813683b56b31
2018-09-04 12:38:14 -07:00
Yohei Yukawa
da916d83a0 Merge "Let SoftInputWindow handle BadTokenException"
am: 680f6e802c

Change-Id: I6f9c1ff99ee9cc2157e32ebe3c0ff3faa2b6bf7f
2018-09-04 12:27:47 -07:00
Treehugger Robot
680f6e802c Merge "Let SoftInputWindow handle BadTokenException" 2018-09-04 19:08:27 +00:00
st.ji
cd6e61cd53 Merge "Add DENSITY_600" am: 8ac363088c
am: e79f44a393

Change-Id: I9a4cc11b8d45bafa5a4c25171c51b663b1091188
2018-09-03 13:59:46 -07:00
st.ji
e79f44a393 Merge "Add DENSITY_600"
am: 8ac363088c

Change-Id: I92fac616676fb93fcbe1ddc59b2e577b551cb387
2018-09-03 13:50:57 -07:00
Treehugger Robot
8ac363088c Merge "Add DENSITY_600" 2018-09-03 20:25:30 +00:00
David Brazdil
3fb373d63a Merge "Add android:usesNonSdkApi manifest attribute" am: 9446fbbeb8
am: a872cb1fcc

Change-Id: I489673fe1b36c146b9b64f3da434b853e002a472
2018-08-31 03:38:08 -07:00
David Brazdil
a872cb1fcc Merge "Add android:usesNonSdkApi manifest attribute"
am: 9446fbbeb8

Change-Id: I53b5c85fc16cdea5413b35ba4ddeec0d64f22b11
2018-08-31 03:28:30 -07:00
David Brazdil
9446fbbeb8 Merge "Add android:usesNonSdkApi manifest attribute" 2018-08-31 09:59:39 +00:00
Chih-hung Hsieh
e9a54af0fc Merge "Use multiple emails in per-file syntax." am: 1d3571cb88
am: f106a9a2c7

Change-Id: I08605f6f8def734385e26475625e88eb3b0c31bc
2018-08-31 00:50:51 -07:00
Chih-hung Hsieh
f106a9a2c7 Merge "Use multiple emails in per-file syntax."
am: 1d3571cb88

Change-Id: Iaf7f8d314afe7d03cd119a861f94da10a9666a84
2018-08-31 00:41:58 -07:00
Chih-hung Hsieh
1d3571cb88 Merge "Use multiple emails in per-file syntax." 2018-08-31 07:19:22 +00:00
Eino-Ville Talvala
96024af857 Camera: Documentation updates for calibration and distortion correction
- Add more notes on coordinate axes
- Add more text on metadata when distortion correction is active
- Note that poseTranslation needs to be negated in many use cases
- Fix coordinate system references for OIS reporting, add more information
- Note that pixel centers at half-integers for the camera API metadata
  such as lens intrinsics

Bug: 79371566
Bug: 74434422
Bug: 109742048
Bug: 109834325
Bug: 109817371
Bug: 112107924
Bug: 113052379
Test: Manual reading of added text
Change-Id: I450e80b79ef66ce8d82a4dee835db6abd1e598a3
Merged-In: I450e80b79ef66ce8d82a4dee835db6abd1e598a3
(cherry picked from commit 08bd163e2d)
2018-08-30 16:42:19 -07:00
Shuzhen Wang
44397643f4 Camera: Documentation update to remove physicalIds
Public API doesn't see android.logicalcam.physicalIds. Remove it
from public doc.

Bug: 112655222
Bug: 113052379
Test: make offline-sdk-docs
Change-Id: Idf6958fb7c117912e33ece4fbaed04cb8e5e14c0
Merged-In: Idf6958fb7c117912e33ece4fbaed04cb8e5e14c0
(cherry picked from commit de23d28d07)
2018-08-30 16:42:19 -07:00
Yin-Chia Yeh
a8cfb0ae93 Camera: hardware level related doc update
Codegen doc update + CameraDevice manual update about EXTERNAL
hardware level.

Test: check offline-sdk-docs output
Bug: 77861412
Bug: 113052379
Change-Id: I70c87a176cf873cf8bec2037f973a94fe99aef2e
Merged-In: I70c87a176cf873cf8bec2037f973a94fe99aef2e
(cherry picked from commit c565700b94)
2018-08-30 16:42:18 -07:00
Yin-Chia Yeh
c925656a1e Camera: codegen doc update
Test: N/A. Doc update
Bug: 109666939
Bug: 113052379
Change-Id: I2bd176a7f5ada755c8a79201d142a98131e2e82c
Merged-In: I2bd176a7f5ada755c8a79201d142a98131e2e82c
(cherry picked from commit 6c73e409fc)
2018-08-30 16:42:18 -07:00
Android Build Merger (Role)
7cf42221c6 [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf am: 628cbe5c53 am: 433e4173ec am: 686897ddd9
Change-Id: I07c1d68a0c5d8da6ec81c717dff97d33dba86a16
2018-08-30 20:46:20 +00:00
Android Build Merger (Role)
686897ddd9 [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf am: 628cbe5c53 am: 433e4173ec
Change-Id: I8375f1c1a860f5021efc5873e94b452a44d6c145
2018-08-30 20:46:12 +00:00
Android Build Merger (Role)
433e4173ec [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf am: 628cbe5c53
Change-Id: Id32bd5aa02d5689873bb311eebc87f367af9a9d9
2018-08-30 20:46:05 +00:00
Android Build Merger (Role)
628cbe5c53 [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3 am: d6947f1cbf
Change-Id: Idaab5395d9e0970fe57b017bcba10f8757ffe3c7
2018-08-30 20:45:59 +00:00
Android Build Merger (Role)
d6947f1cbf [automerger] Verify number of Map entries written to Parcel am: 057a01d1f3
Change-Id: Idb2572b46c48fe2f3e4b99c5cb4372dcfe6b20ce
2018-08-30 20:45:51 +00:00
Michael Wachenschwanz
057a01d1f3 Verify number of Map entries written to Parcel
Make sure the number of entries written by Parcel#writeMapInternal
matches the size written. If a mismatch were allowed, an exploitable
scenario could occur where the data read from the Parcel would not
match the data written.

Fixes: 112859604
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Change-Id: I325d08a8b66b6e80fe76501359c41b6656848607
Merged-In: I325d08a8b66b6e80fe76501359c41b6656848607
2018-08-30 13:40:44 -07:00
Mathew Inwood
a0c5ec60b3 Merge "Add @UnsupportedAppUsage annotations" am: 9137ecafbd
am: 2e5fdd0051

Change-Id: I217e9d2fbad18653d33a5a775047a5b0ffaba55d
2018-08-30 09:10:27 -07:00
Mathew Inwood
2e5fdd0051 Merge "Add @UnsupportedAppUsage annotations"
am: 9137ecafbd

Change-Id: I467341cc8f70554f58266ddc28ff3a648ec5cc18
2018-08-30 08:57:54 -07:00
David Brazdil
ca6f81d395 Add android:usesNonSdkApi manifest attribute
ActivityManagerService decides on the non-SDK API enforcement policy
of every newly spawned process. System apps can be exempted by adding
their package name to a config XML file, tests can pass a flag to
'am instrument'. This patch adds a new @hide attribute on the <application>
manifest tag, "android:usesNonSdkApi", which can be used by both
system apps and tests, and is automatically set by the build system.

The use of the attribute remains guarded as follows:
- if invoked via 'am instrument', must hold shell user permission,
- if app launched, must be a system app or an updated system app.
The attribute is ignored in all other cases.

Bug: 113315999
Test: N/A
Merged-In: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
Change-Id: I2f6cb56f63fa2c5dd6c7c25fcefe8205da1ec96a
(cherry picked from commit 787b6f22a6)
2018-08-30 14:10:33 +01:00
Mathew Inwood
71da3a1fe4 Add @UnsupportedAppUsage annotations
For all remaining unannotated code.

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: I32861fa341a08f11a9c50c07a1ef7404dadf6bb6
Merged-In: I67c8b71ea535ebffb10bf577948bd4ccb8ca069d
2018-08-30 13:38:01 +01:00
Yohei Yukawa
13a9ffba01 Let SoftInputWindow handle BadTokenException
After several attempts [1][2], this is our latest attempt to
gracefully ignore BadTokenException an IME that is being destroyed is
still handling pending showSoftInput() requests.

The point is that SoftInputWindow is a hidden API. This means that
instead of adding a bunch of try/catch blocks around mWindow.show() in
InputMethodService we can always override SoftInputWindow#show() to
inject our own code around mWindow.show().

With this CL, we can now fully track the internal lifecycle of
SoftInputWindow in SoftInputWindow#mWindowState.  It enables us to
easily sort out cases like double fault cases discussed
in Bug 113159114, where showSoftInput() requests were queued multiple
times and still IMEs crash because what mWindow.show() throws for
the 2nd failure is IllegaStateException not BadTokenException.

 [1] Id1e5f236f48c8ef01b7f157ba3f6e7ab2c26b135
     6fcbb56290
 [2] I2c21573cf972145ab08e66604cdb9344139a3f31
     e4bbb1cc45

Fix: 113159114
Test: Manually verified IME switching scenario as follows.
  1. Build and flush aosp_taimen-userdebug
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  5. Open the Dialer app and tap the top edit field.
  6. Make sure that AOSP Keyboard is shown.
  7. Tap the globe button on AOSP Keyboard.
  8. Make sure that AOSP Keyboard is dismissed and SoftKeybaord is
     shown.
  9. Tap the globe button on SoftKeybaord.
 10. Make sure that SoftKeybaord. is dismissed and AOSP Keyboard is
     shown again.
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I1f51ed29df6b22b003ca285698e06b8f3ee5106a
2018-08-29 19:56:02 -07:00
Benjamin Miller
a63d7aaa7f Merge "Docs: fixed formatting for setLaunchBounds()" into pi-dev
am: 7795e97f27

Change-Id: If08dc4bfcb5516cb06aa03603016ca127e6a4ed2
2018-08-29 18:53:59 -07:00
TreeHugger Robot
7795e97f27 Merge "Docs: fixed formatting for setLaunchBounds()" into pi-dev 2018-08-30 01:45:55 +00:00
Benjamin Miller
6ec43e021c Merge "Docs: fixed a broken link in SystemUpdatePolicy" into pi-dev
am: 8bb6781e56

Change-Id: I9e0f0273f05e2f96704749b9d73557e82efd4339
2018-08-29 17:36:27 -07:00
TreeHugger Robot
8bb6781e56 Merge "Docs: fixed a broken link in SystemUpdatePolicy" into pi-dev 2018-08-30 00:18:32 +00:00
Benjamin Miller
1a96e5c5d3 Merge "docs: Added reminder that custom CAs aren't automatically trusted by apps." into pi-dev
am: 53141c3984

Change-Id: I34c30f2a7e02590d551a0f327ab55cb56a550c4c
2018-08-29 16:33:36 -07:00
TreeHugger Robot
53141c3984 Merge "docs: Added reminder that custom CAs aren't automatically trusted by apps." into pi-dev 2018-08-29 23:22:01 +00:00
dwchen
df80c8d7cc Merge "Fixes possible issue with no-op creator." into pi-dev
am: f5411070a8

Change-Id: I29e126cdf7b4929a5ffd1fadafb3b93fc5ee8ca0
2018-08-29 15:35:43 -07:00