Commit Graph

83335 Commits

Author SHA1 Message Date
Treehugger Robot
98627fa455 Merge "Framework: Remove a nonsensical substring(0)" 2018-09-11 16:30:36 +00:00
Treehugger Robot
0890a2b51e Merge "Stop invoke initAppOps in Camera default constructor." 2018-09-11 01:32:53 +00:00
David Brazdil
fdd378c594 Merge "Move ApplicationInfo.usesNonSdkApi to private flags" 2018-09-07 09:32:13 +00: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
Andreas Gampe
214c76cd70 Framework: Remove a nonsensical substring(0)
String.substring(0) will return the same String instance. There is
also no reason to make a copy.

Found by errorprone.

Bug: 114129741
Test: m
Change-Id: Ic089f04efc3c73f70aa15a132d62ac665c8b8f4c
2018-09-05 16:58:45 -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
Treehugger Robot
680f6e802c Merge "Let SoftInputWindow handle BadTokenException" 2018-09-04 19:08:27 +00:00
Treehugger Robot
8ac363088c Merge "Add DENSITY_600" 2018-09-03 20:25:30 +00:00
David Brazdil
9446fbbeb8 Merge "Add android:usesNonSdkApi manifest attribute" 2018-08-31 09:59:39 +00:00
Chih-hung Hsieh
1d3571cb88 Merge "Use multiple emails in per-file syntax." 2018-08-31 07:19:22 +00: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
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
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
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
Nitin Shivpure
1555eae7fa BLE: Add service solicitation uuid feature in scan filter
Adding service solicitation uuid feature in
scan filter, So BLE Scanner can set scan filter for
advertising packets that includes the Service Solicitation
uuid, which can be one of the below types.
 - List of 16 bit Service UUIDs
 - List of 32 bit Service UUIDs
 - List of 128 bit Service UUIDs

Test: BLE Scanner can do filter scan for advertising packets that
includes the Service Solicitation uuid.

Bug: 78483310
Change-Id: I3d83c50e446fca06a76db002dad716759c145d6e
2018-08-29 07:40:29 +00:00
Remi NGUYEN VAN
64dda3cf18 Merge "Add global setting to use new DHCPv4 server" 2018-08-29 06:24:40 +00:00
Remi NGUYEN VAN
e3a0f42e8e Merge "Add DhcpServer" 2018-08-29 03:19:27 +00:00
Treehugger Robot
0e1621296f Merge "Remove ResolveUtil from frameworks/base callers" 2018-08-29 02:58:08 +00:00
Treehugger Robot
20cc0ef048 Merge "Q." 2018-08-28 18:40:11 +00:00
Treehugger Robot
7dd3f1dca6 Merge "Use multiple patterns and emails in per-file syntax." 2018-08-28 18:28:23 +00:00
Jeff Sharkey
5c877634ae Q.
Clean cherry-pick of ag/4057716.

Bug: 77588754
Test: builds, boots
Change-Id: Ib1d993fe2949f480a350acfa7e2b3cfdc7abd257
Merged-In: Ib1d993fe2949f480a350acfa7e2b3cfdc7abd257
2018-08-28 17:51:35 +00:00
Treehugger Robot
dfd7bc77c3 Merge "Add <p> to UnsupportedAppUsage javadoc." 2018-08-28 15:30:29 +00:00
Treehugger Robot
0589adc790 Merge "Add myself as OWNERS for UnsupportedAppUsage.java." 2018-08-28 15:24:23 +00:00
Mathew Inwood
8ea8654bae Add <p> to UnsupportedAppUsage javadoc.
To make HTML rendering of it readable.

Test: m
Change-Id: Ie829b422d6d905f44a909e4a402b61169268e940
2018-08-28 10:52:51 +01:00
Remi NGUYEN VAN
0597453f7c Add global setting to use new DHCPv4 server
The setting applies to the choice of DHCPv4 server for tethering.

Bug: b/109584964
Test: Still builds, SettingsBackupTest passes
Change-Id: Id9b5820883eaf3148f09ad948c34795b3619a30e
2018-08-28 17:47:04 +09:00
Erik Kline
f4fa982339 Remove ResolveUtil from frameworks/base callers
Use the Private DNS bypass logic that was moved into Network.

Once all callers of ResolvUtil are updated to use this interface
ResolvUtil can be deleted.

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - connection to captive portal network detects portal correctly
      and the login activity functions as expected

Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 78548486

Change-Id: If11ef2b5ffdc729f8449cf18dccd5f1eccbc51e6
2018-08-28 12:59:21 +09:00
Remi NGUYEN VAN
a13007ad0f Add DhcpServer
This first version can serve discover/request/release, although there
are some small behavior changes with current implementation which will
be addressed later.

Also removes final modifiers on start() and stop() in FdEventsReader, to
allow mocking the methods in tests with the current mockito lib.

Test: Added tests pass, manual: flashed a device using the server
Change-Id: I025366ff7d51c4ba31152af50f3dd2b5e280a54d
2018-08-28 12:50:47 +09:00
Makoto Onuki
1fda56bbda Fix OWNERS (change google.com to android.com)
Bug: N/A
Test: N/A
Change-Id: I9a9eecfff1a72d7da55be0df73f29985b19c1e38
2018-08-24 14:58:42 -07:00
Makoto Onuki
7e54042f9c Merge "Actually make OWNERS in sync with the internal version" 2018-08-24 21:56:34 +00:00
Makoto Onuki
83c1a68491 Actually make OWNERS in sync with the internal version
Bug: N/A
Test: N/A
Change-Id: Idc1dcc7753a5cf731475ae0f8f01ccd54ac0e3b3
2018-08-24 12:47:20 -07:00
Chih-hung Hsieh
62d0edc6ef Merge "Use multiple patterns and emails in per-file syntax." 2018-08-24 18:52:43 +00:00
Makoto Onuki
aea74ff62a Merge "Update OWNERS for database code" 2018-08-24 16:20:55 +00:00
Treehugger Robot
7b7e05459f Merge "Fix typo in IpConfiguration comment" 2018-08-24 03:43:38 +00:00
Remi NGUYEN VAN
e01b4ce6c7 Merge changes I2cea553a,Id8d3dcf6,I19e68e88,I35598935,Idd7dc369, ...
* changes:
  Add a SharedLog method to log errors w/ stacktrace
  Add DhcpServingParams
  Add fields to DHCP packets for server use-case
  Add util to add an ARP table entry
  Add DHCP utils extracted from DhcpClient
  Add DhcpLeaseRepository
2018-08-24 03:09:55 +00:00
Treehugger Robot
2ef6338351 Merge "Add more tracing for obtainStyledAttributes" 2018-08-24 00:11:50 +00:00
Chih-Hung Hsieh
e5657128e2 Use multiple emails in per-file syntax.
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I16349f12fa566ec0772b4744aa33e65b614d054b
2018-08-23 16:00:42 -07:00
Chih-Hung Hsieh
f690aebc09 Use multiple patterns and emails in per-file syntax.
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I1de13d357c4bcc51fd75d0df6f9bc994dfd17efb
2018-08-23 15:11:24 -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
Blake Lawson
0c9ed965d3 Fix typo in IpConfiguration comment
Bug: NONE
Test: NONE
Change-Id: Ib2ce166532292266da17ec85c16e400afe4f9111
2018-08-23 08:43:07 -07:00
Remi NGUYEN VAN
a420b57a6b Add DhcpServingParams
Those parameters will be used to start DhcpServer or update its
configuration.

Test: runtest DhcpServingParamsTest.java
Bug: b/109584964
Change-Id: Id8d3dcf62d66dcb02accffa8d8500e30f07af452
2018-08-23 17:29:48 +09:00
Mathew Inwood
5404443a55 Add myself as OWNERS for UnsupportedAppUsage.java.
Test: N/A
Change-Id: I8cfe22c504844f7f0cc50c81fe718e49fc6705f6
2018-08-23 09:16:57 +01:00
Remi NGUYEN VAN
12da4a5efc Add util to add an ARP table entry
This is to be used by the new DhcpServer to add ARP entries with new
addresses before sending unicast responses.

Test: manual: cat /proc/net/arp with implementation based on this
Bug: b/109584964
Change-Id: I3559893583aa3c49b188ad689a41ee2f3e9d9bf3
2018-08-23 16:01:44 +09:00
Tyler Gunn
a6d6bf816b Merge "Update BlockedNumberContract to indicate why a call was blocked." 2018-08-22 20:12:04 +00:00
Makoto Onuki
5b3c10cb28 Update OWNERS for database code
Test: N/A

Change-Id: If657f1ac87d9a9e77162816c7ac6abb719b834d4
Merged-in: If657f1ac87d9a9e77162816c7ac6abb719b834d4
2018-08-22 15:43:13 -04:00
Mathew Inwood
29f955559a Merge "Add maxTargetSdk to @UnsupportedAppUsage annotation." 2018-08-22 14:14:25 +00:00