39278 Commits

Author SHA1 Message Date
Treehugger Robot
cbe9c295a3 Merge "Remove unusual static method call" 2018-07-05 11:12:35 +00:00
Neil Fuller
9c610f7567 Remove unusual static method call
The code is using static method Calendar.getInstance() but via a
subclass of Calendar. It works, and getInstance() returns a
GregorianCalendar on Android, but it's odd and was probably unintended.

Noticed during static analysis of SystemUI bytecode.

Bug: 111055375
Test: build / boot
Change-Id: I1762cbeb2cc7882868f84ec11100815671cd29ec
2018-07-05 10:23:53 +01:00
Treehugger Robot
d004710e0e Merge "Fix the logic to get tv_pip_settings_class_name" 2018-07-04 22:45:16 +00:00
Colin Cross
6719222fb7 Fix ManifestMerger issues
Set LOCAL_MIN_SDK_VERSION in SettingsLib so that the build system
doesn't raise the minSdkVersion value specified in the manifest,
which causes ManifestMerger to error when trying to merge it into
a package that specifies a lower minSdkVersion.

Bug: 78447299
Test: m java
Change-Id: Ie2c2458647cd6495418999b35894dc92343992cc
2018-06-14 15:25:20 -07:00
Chalard Jean
7a635d853d Guard the SSID with NETWORK_SETTINGS
Clean cherry-pick of ag/3904260

Bug: 77865258
Test: manual
Change-Id: I2a2e236041797df495759dd4e07648545cad6c7c
Merged-In: Iba59e93875c28b8e30db0c013575bc2f117cb16c
Merged-In: I6cf364f0815a2eaab60f5de5e1d5ccc4908e9eca
2018-06-06 08:24:01 +00:00
Chalard Jean
39620248d7 Notif manager and captive portal app to read SSID again
Cherry-picked from ag/3887738 ; almost clean CP, only had
to add an import.

Bug: 77114259
Test: frameworks-net pass
      manual test shows the SSID is now displayed again
Change-Id: I5cb2b4777ad78d972031e8f2ff22e2155f4ab894
Merged-In: I588fedba49ea5d08e40bd2b3ea8ba2c2383958ec
Merged-In: I663a59ff2847a9f44ea1395326f6cb00e97237b6
2018-06-06 08:23:43 +00:00
Adam Newman
c707509274 Enable cleartext for captive portal apps
When a user attempts to visit a captive portal the Activity will attempt
to load http://connectivitycheck.gstatic.com/generate_204 and a
walled-garden will typically intercept this and respond with a 302
redirect to a sign-in flow.

The new default of disabling cleartext unless explicitly enabled breaks
captive portal operation. This change enables cleartext for the two
applications that contain a CaptivePortalLoginActivity.

Clean cherry-pick of ag/3750960

Bug: 75279991
Test: Manually associated with captive portals.
Exempt-From-Owner-Approval: Already approved by owner on pi-dev.
Change-Id: Ib9ea7a8a2aa72b8305fa7044df0e369a57d33953
Merged-In: Ie38d6ce6f54336db2f4672746dc7385e0a7979fb
Merged-In: I742bf6be74a9e6953d0a779bdab0c25cf32aa740
2018-06-06 08:21:41 +00:00
Colin Cross
2f4bf5423d Use AAPT2 for more modules with manifest validation errors
Add LOCAL_AAPT_FLAGS += --warn-manifest-validation to the modules
that have manifests that AAPT2 can't parse.

Bug: 79755007
Test: m checkbuild
Change-Id: I5f20ca582e481f7dac7b6a236662a2d1f47ea9fa
2018-05-26 10:32:26 -07:00
Remi NGUYEN VAN
7b0935509d Merge changes I3b3bcbbd,I18b3f263,I3c416c1a
* changes:
  Use CaptivePortalProbeSpec method in portal app
  Add configurable captive portal probes
  Move CaptivePortalProbeResult to its own file
2018-05-24 07:53:00 +00:00
Remi NGUYEN VAN
9f85505432 Use CaptivePortalProbeSpec method in portal app
This only changes behavior if the EXTRA_CAPTIVE_PORTAL_PROBE_SPEC extra
is passed, which only happens if extra probe specs have been defined in
settings.

Bug: b/79499239
Test: manual: on 2 different portals, works w/ and w/o the setting
Merged-In: Iebd307b5d73a7b4679baea2a1c12c3baba6a7447
Merged-In: I851d8c41d42dccb03f813e549439f44c83f7d5ac
(clean cherry-pick of pi-dev I70acfd9213bf620cbb79ad999b8ad03472e8d43f)

Change-Id: I3b3bcbbd380f8cbd0b663556d55276f43e30b3e5
2018-05-24 12:14:34 +09:00
Treehugger Robot
00c0a5bb23 Merge "PacProcessor: Include libpac as a JNI_SHARED_LIBRARY." 2018-05-22 12:24:33 +00:00
Colin Cross
940b98ee4e Disable AAPT2 for modules that use missing features
Use LOCAL_USE_AAPT2 := false to disable AAPT2 for modules that
use features that are not implemented in AAPT2.

Fixes:
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:46: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_multi_package/AndroidManifest.xml:82: error: unexpected element <package> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_bad/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/core/tests/coretests/apks/install_verifier_good/AndroidManifest.xml:19: error: unexpected element <package-verifier> found in <manifest>.
frameworks/base/packages/CtsShim/build/shim/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/tests/ActivityTests/AndroidManifest.xml:42: error: unexpected element <preferred> found in <manifest><application><activity>.
out/target/common/obj/APPS/CtsShimPriv_intermediates/AndroidManifest.xml:25: error: unexpected element <restrict-update> found in <manifest>.
frameworks/base/core/tests/coretests/AndroidManifest.xml:26: error: unexpected element <meta-data> found in <manifest><permission>.
...

Bug: 79755007
Test: m FORCE_AAPT2=true java
Change-Id: I393b697c521ab2a4fbc00b29a43aed6b4729b9a8
2018-05-16 09:34:26 -07:00
Narayan Kamath
5018208eb6 PacProcessor: Include libpac as a JNI_SHARED_LIBRARY.
libpac is only used by the PacProcessor, so this prevents us
from installing both the 32 and 64 bit versions of the library
on the system partition.

Test: make

Change-Id: I61033ba66116cf21f5518657df8fcd9fa46cd1b5
2018-05-15 11:23:53 +01:00
Dan Willemsen
4888b1f6f0 Convert to Soong
See build/soong/README.md for more information.

Test: m libframeworks_coretests_jni
Test: m FrameworkCoreTests_install
Test: m libshim_jni
Test: m CtsShimPrivUpgrade
Test: m libfilterfw
Test: m PMTest_Java_dual
Test: m libdefcontainer_jni
Test: m libperftestscore_jni
Test: m libpmtest32 libpmtest64
Test: m libprintspooler_jni
Test: m libsmartcamera_jni
Test: m idmap
Test: m libdrmframework_jni
Test: m libdvr_loader com.google.vr.platform com.google.vr.platform.xml
Test: m libfilterpack_imageproc libfilterpack_base
Test: m libwebviewchromium_loader
Test: m shared_mem_test
Test: m test-touchlag
Change-Id: I868561dd237fa28647896d59049ab9260373ada1
2018-05-14 16:47:02 -07:00
Remi NGUYEN VAN
e7ed8ffebb Add NETWORK_BYPASS_PRIVATE_DNS permission
Have the captive portal app and the MMS service use this new permission
to bypass private DNS.

This cherry-pick does not have the TODO and #SystemApi comments
deemed unnecessary in the original change.
Bug: b/78494660
Test: manual: captive portal login works
Merged-In: I0d3429faddc0509781c896608039e4143cb1e8fd
Merged-In: I77bec89592c594392e94da001f1e3992543b23ec
(cherry-pick of I0a4a8d0105becf6957fd44099bd84eca51e6716f, manual merge)

Change-Id: I041d123ccd9bb1af730a97707cce9003b552cffa
2018-05-08 11:57:10 +09:00
Aurimas Liutikas
5e81f7cf67 Move SettingsLib tests and EasterEgg to aapt2.
Test: make -j SettingsLibTests
Change-Id: I38fbd6af7eb5707d76fb930b4d685e30b26f45de
Merged-In: I38fbd6af7eb5707d76fb930b4d685e30b26f45de
(cherry picked from commit 41df109aca81726554d2aedf4ebea6c98f663273)
2018-05-07 11:32:04 -07:00
Aurimas Liutikas
d6c9658d99 Migrate PrintSpooler to aapt2.
Test: make -j PrintSpooler
Change-Id: Iad4d4d477792f13fb92e3ee7f4f5fa781f3298c4
Merged-In: Iad4d4d477792f13fb92e3ee7f4f5fa781f3298c4
(cherry picked from commit 87f7ce4bd17b4d1cd0721b7b0d05f57ffdef8a0d)
2018-05-03 16:38:17 -07:00
Alan Viverette
2789e544f1 Migrate to AAPT2
Bug: 73128633
Test: make checkbuild
Change-Id: I4b6b73299d1cae61994c34ebb77ca587c5ee64ff
Merged-In: I4b6b73299d1cae61994c34ebb77ca587c5ee64ff
(cherry picked from commit e3264ba6cf7df5b33b10dd6a15ac5010c78bac6e)
2018-05-03 16:38:17 -07:00
Stanley Tng
8c0f800831 Disable Hearing Aid Profile for all platforms except Pixels
Add code to selectively disable Hearing Aid Profile depending on the
config.xml file.
Note: Cherry-picked from internal branch.

Bug: 78142728
Test: Manual Pairing on various Pixel phones
Change-Id: I8094f1a1665647b026eb9601e032fb7fbb816ec6
(cherry picked from commit a21efa58369b304e5ea818a3f8b1577f1fed3d02)
2018-04-30 08:54:47 -07:00
Erik Kline
6a1707a0e7 Fix carrier app CaptivePortalLoginActivity probes to bypass Private DNS
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 64133961
Bug: 77140445
Bug: 78548486

Change-Id: I48c60fd6711dcf5406fba62a3f88aea12183ff87
2018-04-26 13:17:14 +09:00
Erik Kline
848d842a3a Fix CaptivePortalLoginActivity probes to bypass Private DNS
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - manual testing on captive portal networks
Bug: 64133961
Bug: 77140445
Bug: 78548486

Change-Id: Idbc4d90eeec257b36c5f374d61dea4600a0f8ebb
2018-04-26 11:37:03 +09:00
Shuichi.Noguchi
d2067824c4 Fix the logic to get tv_pip_settings_class_name
Currently, Only the class which is started from "." can be
registered in PipManager. But some activities are not
following this and as the result, Pip is not displayed
in settings bounds even the name is registered in xml.

PipManager checks the class name not only it's started from ".",
but also any class name, then PipManager gets correct class name
even if it's not started from "."

Test: Launch PiP, the activity which is not started from ".".
      Then, open settings.

Change-Id: Iee29596aa8c1955d83338f6dd7a8dcdfccafc906
2018-04-19 14:17:04 +09:00
Treehugger Robot
3b5016598d Merge "Add Polish keycharactermap" 2018-04-04 22:10:19 +00:00
Treehugger Robot
a23007dd54 Merge "Hearing Aid: change get/set active device (3/3)" 2018-04-04 21:42:17 +00:00
Erik Kline
2140529d9b Support bypassing TLS in the framework
This change comprises the following parts:

    [1] android.net.dns.ResolvUtil, containing methods that encapsulate the
        use of the high bit in netids used in DNS resolution contexts.

    [2] Updates to captive portal apps to call the ResolvUtil method that
        enables DNS-over-TLS bypass for the captive portal app process.

Test: as follows
    - builds
    - flashes
    - boots
    - runtest frameworks-net passes
Bug: 64133961
Bug: 72345192

Change-Id: I2072c1f68d6978fa0d7e9d8693135a2c51bb0f87
2018-04-03 00:35:30 -07:00
Pavlin Radoslavov
c2c759842a Update Bluetooth codec related strings
The settings related to Bluetooth codec selection
are actually triggers. Updated the corresponding
strings to reflect that.

Bug: 67682722
Test: Manual - examined the result UI
      runtest systemui
      make -j40 RunSettingsRoboTests
      make -j40 RunSettingsLibRoboTests
Change-Id: I872414f7620931a67b028c2997b0740ae3a45986
Merged-In: I872414f7620931a67b028c2997b0740ae3a45986
(cherry picked from commit a80a65a11fc6fd6aa7f3dfb19516c3d15c512dfb)
2018-03-30 12:38:46 -07:00
Hansong Zhang
8d799f8340 Hearing Aid: change get/set active device (3/3)
* setActiveDevice() returns false in error case, e.g. when the device is
not connected
* add getActiveDevices() instead of isActiveDevice(), which returns a list
that must have two elements: left and right, or empty list on error

Test: manual
Bug: 69623109
Change-Id: I48f3388c56434d0c21e09bd8b794e58848cd8794
2018-03-29 17:54:24 -07:00
Lorenzo Colitti
be6d45fe92 Merge "Allow third party cookies in the captive portal login app." 2018-03-28 09:17:41 +00:00
Treehugger Robot
b52f49153c Merge changes I70eafe03,Ia44e16c5
* changes:
  Hearing Aid Profile: set and get activeDevice
  Move the setActiveDevice logic from Settings to SettingsLib (1/2)
2018-03-27 22:45:18 +00:00
Lorenzo Colitti
a039850cc3 Allow third party cookies in the captive portal login app.
Fix: 73909651
Test: Captive portal login app still works
Change-Id: I3ffda92e7d764ea9957df1a5408839cf10a26be5
Merged-In: I0174124cad9c108a26594b0ddd6162ca3ea6e68d
(cherry picked from commit c3c95bab8ec7f3ef4e7649b5d24ea6525a407c44)
2018-03-28 06:52:45 +09:00
Myles Watson
81bd065c55 Tell the user to toggle Bluetooth when enabling HCI logs
Bug: 67634644
Test: Manually inspect the new text in developer settings
Change-Id: Ic8b08c8d6d0c7727a03a265fb6b10a3c55fd96cb
2018-03-27 18:11:57 +00:00
Hansong Zhang
7ca303c3b8 Hearing Aid Profile: set and get activeDevice
Add setActiveDevice() for Hearing Aid Profile in SettingsLib

Bug: 69623109
Test: robolectric test and manual test
Change-Id: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
Merged-In: I70eafe030747053876e2ab8a125d5dd01c5e0eb9
(cherry picked from commit d7b359165968199e034bd46ca97526dbf719602d)
2018-03-23 12:27:33 -07:00
Hansong Zhang
d2cf3c39fe Move the setActiveDevice logic from Settings to SettingsLib (1/2)
Currently the Settings app handles the logic of setting active device;
however, this should be handled by SettingsLib so the logic can be shared.

Bug: 75984255
Test: robolectric test
Change-Id: Ia44e16c550d5b57c985e29e46e17044a895b495a
Merged-In: Ia44e16c550d5b57c985e29e46e17044a895b495a
(cherry picked from commit 6a416327e5b52d6bb78202bd05a86ab84cf2304e)
2018-03-23 12:26:51 -07:00
Chalard Jean
5b0c7c6403 Have the status bar listen to all macro-users VPN changes.
Bug: 73217368
Test: manual
      Using Datally on work profile. Before this, enabling the VPN
      does not show the key icon. After this it does.

Change-Id: I454eb8f3881a48af1b0187c2b14a2a399d3c2445
2018-03-22 13:25:09 +09:00
Bruno Martins
c154e19357 DndTile: Avoid yet another NPE during boot up phase
* Tile state update can only take place once mController
   is properly initialized.

Change-Id: Ia6c1d6dee7d3e396a5bb6910e03859a0c0cc94ae
2018-03-17 14:03:57 +00:00
Siarhei Vishniakou
33a465d81d Add Polish keycharactermap
Add Polish .kcm layout file. This will be used for connecting a physical
keyboard for Android and typing in Polish.

Bug: 13938356
Test: connect a keyboard to Pixel phone via OTG connector. Open Google
search and select "Polish" keyboard layout, type with keyboard.

Change-Id: I74bfc2bba7ca8b82b0de0202dbfc05d935b27c38
Signed-off-by: Siarhei Vishniakou <svv@google.com>
2018-03-15 11:37:03 -07:00
Chalard Jean
fc71acde3b Merge "Add the ability to refresh to the captive portal app." 2018-03-12 06:05:05 +00:00
Chris Tate
c294af5f94 Merge "Defer deleting a http cache" 2018-03-09 21:26:20 +00:00
Treehugger Robot
439286d185 Merge "SystemUI: Customize wifi indicator for China carriers" 2018-03-09 17:35:53 +00:00
Chalard Jean
8fa6ea3545 Add the ability to refresh to the captive portal app.
Bug: 69840796
Test: manual
      created a small app that brings up the captive portal app,
      checked that pulling down does show the refresh spinner,
      refresh the page, and hide the spinner when refreshed.
      Checked that it works multiple times in a row.

Change-Id: Ieefdaffa9325b0c5f1b02ab6052c29a381f3a4d4
2018-03-09 22:28:51 +09:00
Pengquan Meng
27c64aaf3c Merge "Telephony(MSIM): Default NW mode property for each slot" 2018-03-08 17:56:28 +00:00
Anton Hansson
be72e62c63 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I66b515d98d03264dbb893b7c55ba7bdddfb447a1
Merged-In: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
Merged-In: I938efe7a2359302cbf4d5d6f786f963044e1bbbd
Merged-In: I72ce7f1c6242ddf9a5b36075761f3f1f1138cea1
2018-03-07 15:10:39 +00:00
Pavlin Radoslavov
04bd18d644 Update the Bluetooth Active Device state in the Device Manager
The Bluetooth Active Device state should be updated for all
CachedBluetoothDevice entries.
This should be done inside CachedBluetoothDeviceManager in SettingsLib
instead of BluetoothDeviceUpdater in the Settings app.

Also:
 * Added a new CachedBluetoothDeviceManagerTest.java unit test
 * Added a new method CachedBluetoothDevice.isActiveDevice()
   for testing.

Bug: 72316092
Test: Manual - two headsets and switching the active device
      Unit tests - "make RunSettingsLibRoboTests -j 40"
Change-Id: Ic3fbf667c66ed2de8e5c3352bc1ffd829a9052cf
Merged-In: Ic3fbf667c66ed2de8e5c3352bc1ffd829a9052cf
(cherry picked from commit c285d559fa8f0d597e8d5f1c8176dbb187e2d6ac)
2018-03-06 23:24:13 +00:00
Treehugger Robot
2fa0f7964f Merge "Move SignalDrawable to SettingsLib so every can enjoy it" 2018-03-05 20:10:37 +00:00
Sandeep Gutta
9dc1a9c07a Telephony(MSIM): Default NW mode property for each slot
For dual SIM devices, add provision to configure different default
Network modes for each slot, using the existing system property to
configure this default network modes.

Bug: 28384694
Test: manual - Checked different default NW mode can be set
for each slot.
Change-Id: I72b11522cb51a425e28ddc407014387a20cb2cd7
2018-03-05 13:19:29 +00:00
Evan Laird
32245b31cc Move SignalDrawable to SettingsLib so every can enjoy it
Anyone with a dependecy on SettingsLib should be able to create and use
a platform SignalDrawable.

Test: runtest systemui; visual
Change-Id: I65caa2ac69cae52b6ad798937df3f3399ab406af
Merged-In: I65caa2ac69cae52b6ad798937df3f3399ab406af
Fixes: 72511183
2018-03-01 08:26:43 -08:00
Anton Hansson
a3e79fbb8c frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: Ibcffec873a693d1c792ca210fb597d2bf37e9068
Merged-In: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 17:15:21 +00:00
Hidehiko Tsuchiya
17d6768ee5 Defer deleting a http cache
Symptom:
StatementService was crashed due to the exception;
"java.lang.IllegalStateException: cache is closed"

Root cause:
The http cache is deleted at DirectStatementService#onDestroy
in main thread. If a worker thread is still alive and it tries to
access the cache, it fails with IllegalStateException.

Solution:
The request of deleting a cache was moved from the main thread to
worker. Now, the cache can be deleted safely.

Bug: 73911877
Change-Id: I61f4e62b00e35f4a272ef983758e61ef3bf2d180
2018-02-27 15:27:11 +09:00
Pavlin Radoslavov
155738ee1f Removed executable flag for Java source files
Test: Code compilation
Change-Id: Ibfb57c6af54ace94eb9f9915471738f2f09ca70a
2018-02-23 11:59:06 +00:00
Bruno Martins
d55e7d6fa8 WifiTile: Avoid NPE during boot phase
* Listening handling can only take place once mController
  is properly initialized.

Change-Id: Icd5003e67a725323a5445a936d5a38a3006c5431
2018-02-17 00:36:12 +01:00