374643 Commits

Author SHA1 Message Date
Brad Ebinger
608fa51d55 Merge "Fix docs comment for ACTION_SECRET_CODE" 2018-08-30 21:10:49 +00:00
Brad Ebinger
8b05d8b40d Fix docs comment for ACTION_SECRET_CODE
Test: makeg doc-comment-check-docs
Bug: 112440728
Change-Id: I0c953ce2112e30534847fafc8ab9d286e82a102f
2018-08-30 21:10:02 +00:00
Yohei Yukawa
c8c5f1345e IMMS should preserve selected IME upon boot
This is another follow up CL to my refactoring CL [1], which
unintentionally changed the condition to reset default
enabled/selected IMEs when the device boots up.

My previous attempt [2] actually fixed the unexpected reset of
the enabled IMEs (Bug 67093433), but did not fix the unexpected reset
of the selected IME (Bug 113159114).

The culprit was IMMS#resetDefaultImeLocked(), which always resets the
selected IME when it gets called in a too early boot phase where
mCurMethodId is still null.  Actually it turns out that we do not need
to call IMMS#resetDefaultImeLocked() from IMMS#systemRunning() at all,
because

    buildInputMethodListLocked(!imeSelectedOnBoot /* resetDefaultEnabledIme */)

one line above already takes care of such a case.

Note that this issue is observable only on direct-boot aware devices
because of the same reason explained in my previous CL [2].

 [1]: I5b37c450db4b25b3e635b6d634293a34eec8b9d4
      7924782c000733b2d7a180701b74988f0154adee
 [2]: Id624d577d941245cca944498dc6935eb364865cf
      1f9a3cbe39a91bd5579e42a0c7a9ae251d955e8e

Fix: 113159114
Test: Manually verified as follows
  1. Check out AOSP master
  2. Build an OS image for a direct-boot aware device then flash it.
  3. Open
       development/samples/SoftKeyboard/AndroidManifest.xml
     then add
       android:directBootAware="true"
     to the IME service.
  4. tapas SoftKeyboard
  5. make -j
  6. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  7. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  8. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
  9. adb shell locksettings set-password aaaa
 10. adb reboot
 11. Make sure that
      * Sample Soft keyboard is shown by default on the unlock screen.
      * AOSP Keyboard is also enabled.
Change-Id: Icb782c01c742a9359b5a6684c360f30c5cf9cdc9
2018-08-30 13:41:32 -07:00
Joel Fernandes
84b5650315 Merge "Rename map names in read_mapinfo" 2018-08-30 19:30:58 +00:00
Philip P. Moltmann
a0a67862aa Merge "UsbDeviceManager: Check PTP FileDescriptor properly" 2018-08-30 19:16:21 +00:00
Meng Wang
71b6039bff Expose KEY_CARRIER_DEFAULT_WFC_IMS_{ROAMING_,}MODE_INT
Bug: 112867975
Test: make docs
Change-Id: I281d30f874136c77ad1d0e66747694bb1b79e67c
2018-08-30 12:11:27 -07:00
David Brazdil
a264c2c83e Merge "Rewrite hidden API list generation in Python" 2018-08-30 17:59:02 +00:00
Benedict Wong
564e2aa81e Use tunnel local/remote addresses in security policies
This patch changes tunnel mode security policies to use the actual
tunnel's local and remote addresses to select the SA.
This prevents the kernel from calling xfrm_get_saddr(), which does a
route lookup, potentially resolving an incorrect saddr.

Bug: 79384676
Test: CTS, IpSecService* tests passing
Change-Id: I8223225e2363a79591a0bb0040aa8619cf84c184
2018-08-30 10:55:02 -07:00
David Brazdil
8503b9045b Rewrite hidden API list generation in Python
Generating hidden API lists has grown in complexity and the original
Makefile rule has become a bottleneck for build times. Rewrite the
logic in Python.

Bug: 113278235
Bug: 73736106
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I63f03133d70260d06c55f482b844a4980dc6f734
2018-08-30 16:19:26 +01:00
Treehugger Robot
9137ecafbd Merge "Add @UnsupportedAppUsage annotations" 2018-08-30 15:18:18 +00:00
Cassie Han
47c7675ae4 Merge "Move SECRET_CODE_ACTION from Telephony.Sms.Intents to TelephonyManager." 2018-08-30 15:15:27 +00: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 787b6f22a63e5c90e6bde69da64af2fbea68a50d)
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
Remi NGUYEN VAN
6717a6f930 Merge changes I58f904d5,Ie0bf7804
* changes:
  Fix DHCP options sent by DHCP server
  Fix BOOTP fields for server-generated DHCP packets
2018-08-30 09:24:29 +00:00
Remi NGUYEN VAN
8975ab6322 Send ciaddr in DHCP server ACK if set by client
RFC2131#4.3.1 specifies that ciaddr should be set to the "'ciaddr' from
DHCPREQUEST or 0". Previous behavior sets ciaddr if provided by the
client in DHCPREQUEST, so keeping this behavior.

Bug: b/109584964
Test: DhcpServerTest.py debian/macos/win10 renewing test pass
Change-Id: I283e88b1f66f39d24589c5af4518cf9a2e77b95d
2018-08-30 18:23:23 +09:00
Remi NGUYEN VAN
9865cc1bd2 Minor logging fixes for new DHCP server
- Do not use Inet4Address#toString(), but Inet4Address#getHostAddress()
 - Dump enableLegacyDhcpServer in TetheringConfiguration

Bug: b/109584964
Test: manual: flashed, observed logs
Change-Id: I1f4d008b8bb1818e05a68ac0b5da4ce856cc1588
2018-08-30 17:30:56 +09:00
Ian Zerny
b0896e61f8 Merge "Revert "Expose KEY_CARRIER_DEFAULT_WFC_IMS_{ROAMING_,}MODE_INT"" 2018-08-30 08:29:58 +00:00
Ian Zerny
e72a524590 Revert "Expose KEY_CARRIER_DEFAULT_WFC_IMS_{ROAMING_,}MODE_INT"
This reverts commit 3284e35061f74d39e23039c8ae3cf2adc9af4415.

Reason for revert: breaks most branches

Bug: 112867975
Change-Id: Icb27e193529f523f4cf07ef55e19625c402a2d3b
2018-08-30 08:29:25 +00:00
Mathew Inwood
fa4ccace61 Merge "Add @UnsupportedAppUsage annotations" 2018-08-30 07:55:39 +00:00
Remi NGUYEN VAN
6557a2464e Fix DHCP options sent by DHCP server
Add Android metered option, rebinding time option (T2), and match
current order of options.  Current DHCP server uses subnet_mask,
broadcast_address, router, name_server in this order.

Test: DhcpServerTest.py:test_discover_paramrequestlist passes
      atest FrameworksNetTests passes

Bug: b/109584964
Change-Id: I58f904d5fac306f704c16234fd69c2440fe0803d
2018-08-30 16:13:20 +09:00
Remi NGUYEN VAN
e59d031fb9 Fix BOOTP fields for server-generated DHCP packets
Set siaddr to the server address instead of zero in DHCPOFFER
Set siaddr to zero instead of the server address in DHCPNAK
Set giaddr to the relay address instead of the server address in
DHCPNAK
Set giaddr to the relay address instead of zero on DHCPACK and
DHCPOFFER
Set server identifier option in DHCPNAK

Current code is not compliant with RFC2131 and does not match dnsmasq
behavior. It was not an issue until now since the packets were only used
by the DHCP client, which does not send DHCPOFFER or DHCPNAK.

Bug: b/109584964
Test: following DhcpServerTest.py regression tests pass:
      test_discover_bootpfields
      test_request_selecting_inuse
      test_request_rebinding_relayed
      test_discover_relayed_broadcastbit
      test_request_rebinding_wrongaddr_relayed
      Also: atest FrameworksNetTests

Change-Id: Ie0bf780498e38945444bff66ca499cff5983a97f
2018-08-30 15:54:02 +09:00
Wang Han
e030a09023 UsbDeviceManager: Check PTP FileDescriptor properly
* A typo causes MTP one to be checked twice

Change-Id: If16bf5df43b6d51f6717aa7994b2f428fb3f1a69
2018-08-30 06:28:36 +00: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
     6fcbb5629019489a88a9748f278d40d554cc5cdc
 [2] I2c21573cf972145ab08e66604cdb9344139a3f31
     e4bbb1cc451c7ebdad9f92968732fc4f6c21a70c

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
Shaotang Li
b825510b80 Merge "Add new metrics constants for emergency dialer" 2018-08-30 02:24:22 +00:00
Treehugger Robot
d8523f3c01 Merge "Expose KEY_CARRIER_DEFAULT_WFC_IMS_{ROAMING_,}MODE_INT" 2018-08-30 02:16:38 +00:00
Treehugger Robot
7bd321ca25 Merge "Convert aapt to Soong" 2018-08-30 02:12:30 +00:00
Remi NGUYEN VAN
846c80acf5 Merge "Switch DHCP server based on global setting" 2018-08-30 02:01:31 +00:00
Treehugger Robot
7aae482135 Merge "Simply logic for connect and disconnect in HeadsetProfile" 2018-08-30 01:55:56 +00:00
Treehugger Robot
8593fc6c06 Merge "Remove connected device check logic in getConnectionState" 2018-08-30 01:55:27 +00:00
Pengquan Meng
adbe45e0ca Merge "Add new Telephony API for settings migration" 2018-08-30 00:39:37 +00:00
Mengjun Leng
3918f4fc14 Add carrier config of showing original dial string for CDMA MO call
Support to configure showing original dial string for CDMA MO call.

Bug: 62074217
Change-Id: Icfd542107e36641823d2fdcb815b9456a8d61f36
Merged-In: Icfd542107e36641823d2fdcb815b9456a8d61f36
2018-08-30 00:27:13 +00:00
Dan Willemsen
5d12935f35 Convert aapt to Soong
See build/soong/README.md for more information.

Test: cd frameworks/base/tools/aapt; mma
Test: aapt version
Change-Id: Ice97e9b32c53cfed30d68acd5717d8c66712df4c
2018-08-29 17:24:18 -07:00
Oscar Shu
5add10333d Merge "Fix some fields in WifiInfo are not written into Parcel" 2018-08-30 00:13:51 +00:00
Treehugger Robot
05d5ec7842 Merge "Add new team member to owners file." 2018-08-29 23:45:12 +00:00
Pengquan Meng
ad224b637e Add new Telephony API for settings migration
Bug:111453847
Test: build test
Change-Id: Ia4468664453e532e80b8834e53d386fabeb11c41
Merged-In: Ia4468664453e532e80b8834e53d386fabeb11c41
2018-08-29 22:19:15 +00:00
Tyler Gunn
87a1397ee0 Add new team member to owners file.
Bug: 113528087
Test: Manual
Change-Id: I17d82d53386c14cfd0324d455b892ca17e07a079
2018-08-29 14:07:42 -07:00
Treehugger Robot
cdf75c3cc8 Merge changes from topic "androidx-settings-aosp"
* changes:
  Migrated various apps under frameworks/base/packages/Shell  to androidx
  Migrated SystemUI & SettingsLib to androidx
2018-08-29 18:31:09 +00:00
Chienyuan
c129df807f Remove connected device check logic in getConnectionState
From current code, it will check if the device connected before
getConnectionState. We can remove this check logic because
HidHostService will do it.

Bug: 111812003
Test: manual - connect/disconnect HID keyborad from Settings UI
Change-Id: Ib512b3f15109b6f4cacf1f1c517b69d17ddd5ac4
2018-08-29 23:14:55 +08:00
Chienyuan
edd44ec292 Simply logic for connect and disconnect in HeadsetProfile
* connect: remove debug log of connect connected device. HeadsetService
  will check it and print related log.
* disconnect: remove connected device check logic. HeadsetService will
  check it.
* getConnectionStatus: remove connected device check logic.
  HeadsetService will check it.
* wrap if/else statement in curly brackets.

Bug: 111812003
Test: manual - connect/disconnect headset from Settings UI

Change-Id: I2c58362c236a26b38c8aa67eb3a3433d76f97e45
2018-08-29 20:40:06 +08:00
Jakub Pawlowski
13d6540956 Merge "BLE: Add service solicitation uuid feature in scan filter" 2018-08-29 11:26:51 +00:00
Dario Freni
17115bdb02 Merge "Include NOTICE from /product and /product_services" 2018-08-29 09:12:52 +00:00
Treehugger Robot
0c7343ccd7 Merge "Also copy-construct multinetwork policy preference" 2018-08-29 08:06:34 +00:00
Erik Kline
397f8110b5 Also copy-construct multinetwork policy preference
Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - manual bluetooth tethering testing doesn't seem to trigger any
      actual tethering, since bt-pan interface keeps going down on
      test device (IpClient never really starts up fully)
Bug: 62476366
Bug: 113136023
Change-Id: I3265f60f8ae125eba4545cb652c95a2f70049058
2018-08-29 16:55:47 +09: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
Stan Iliev
cccd03859c Don't apply filter in readback, when there is no scaling
Fix check for scaling in SkiaOpenGLReadback: old code was not
taking into account that matrix rotation swaps width/height.

Test: Passed PixelCopyTest#testWindowProducerCopyToRGBA16F
Bug: 110097060
Bug: 111776948
Change-Id: I0d26416fa72a026bc376417773d5a73548b1f1a5
Merged-In: I0d26416fa72a026bc376417773d5a73548b1f1a5
(cherry picked from commit d50edd004b60bec3f1d36066725129276b4a53ec)
(cherry picked from commit ee7b63aa646c937e326ac5f39f07f724020533bb)
2018-08-29 15:03:08 +08:00
Michael Wachenschwanz
2795cca1cf Set AppStandbyController charging state on init
Test: manual (restart device and "adb shell dumpsys usagestats | grep
mCharging=")
Test: CtsHostsideNetworkTests
Fixes:80545083

Change-Id: I0592622b83525159eeca611b3cc1021347bc53ca
Merged-In: I0592622b83525159eeca611b3cc1021347bc53ca
(cherry-picked from 13b1e1774cfc6a568f57b9500f16dd2b26da3cd3)
(cherry picked from commit 4d5b4b03c8065fc6421456a6135f6d247d2d1dd5)
2018-08-29 15:00:30 +08:00
Stan Iliev
421449a4a6 Fix TextureView.getBitmap with scale layer transform
Fix TextureView.getBitmap to capture content only from the layer.

Bug: 111401911
Test: A new test TextureViewTest.testTransformScale is passing
Change-Id: I2b9cee17fc48de7b12ed03d5b4f173ce5445dbfe
Merged-In: I2b9cee17fc48de7b12ed03d5b4f173ce5445dbfe
(cherry-picked from ff129aefe2b68c5dc6fe51a9b1d34f98750d4973)
(cherry picked from commit 9675537555913a6aa7c25a71a6b854a083e22ede)
2018-08-29 14:54:53 +08:00
Remi NGUYEN VAN
ef7432f245 Merge "Ignore DHCP packet sent from non-68 client port" 2018-08-29 06:25:06 +00:00
Remi NGUYEN VAN
64dda3cf18 Merge "Add global setting to use new DHCPv4 server" 2018-08-29 06:24:40 +00:00
paulhu
b67338042a PermissionMonitor: Limit preinstalled apps network permissions
Not all preinstalled apps should have access to background
networks or restricted networks. But we give them all network
access permissions currently, it's not a good design. So we
shall limit preinstalled apps permissions, they should just
request the appropriate permission for their use case from
the network permissions.

Bug:19610688
Test: runtest frameworks-net
Change-Id: I184ae3197208c979847ca134c8f01b32528badf1
2018-08-29 13:49:33 +08:00