322879 Commits

Author SHA1 Message Date
Hugo Benichi
10c913331e DO NOT MERGE: Fix ApfTest
libutils is now depending on libvndksupport. So any client that
statically links to libutils needs to link against libvndksupport as
well.

Bug: 32561414
Test: ApfTest works
Merged-In: Id99792baa1c0a7a61c4056f83f33d25e0bea143e

(cherry picked from commit 9a2041ee836be925e93dd820f11686aa378dd92d)

Change-Id: I8808e668230ff7076403ff29cf48c12cbc36f78a
2017-09-04 11:03:47 +09:00
Brad Ebinger
6391598412 Merge "Adds ERROR state to ImsConfig" 2017-09-01 21:06:55 +00:00
Brad Ebinger
43f9f0290c Merge "Remove PIN/PUK keyguard when SIM is removed/ready" 2017-09-01 21:06:27 +00:00
Treehugger Robot
7c45962abd Merge "Fixed default values for Bluetooth energy calculations" 2017-09-01 20:58:49 +00:00
Hansong Zhang
aeff6bf056 Fixed default values for Bluetooth energy calculations
There are values used for Bluetooth energy calculations in the
configuration file. The values were set to 1, 2, 3, 4 and ends up giving
some very wrong energy calculations. They are now set to 0 by default.

Bug: 64662990

Test: manual
Change-Id: I2be2a19f50e2e56d7dadb9ff23b9827520d4d1ea
(cherry picked from commit 3e6eb50e35f4d0fb8db774bed17a46effbc65671)
2017-09-01 19:13:28 +00:00
Brad Ebinger
df99d59284 Adds ERROR state to ImsConfig
Adds the ERROR return state for bool provisioning values
so that we can throw an Exception in some cases.

Bug: 64540800
Test: Manual
Merged-In: Id412c0be939da6240a66a942730fd18badabb6c6
Change-Id: I0b79837c694d245999031ec65783857e114b7c75
2017-09-01 10:16:26 -07:00
Treehugger Robot
ea598a4f14 Merge "Fix typo in CarrierConfigManager javadoc." 2017-09-01 17:11:26 +00:00
Brad Ebinger
4cd3bdcfa3 Remove PIN/PUK keyguard when SIM is removed/ready
1) If the PIN/PUK keyguard comes up for a locked
SIM, it can not be removed by removing the
affected SIM. It can only be removed by
rebooting the device or entering a bogus PIN.

This change automatically clears the keyguard
when when the locked SIM is removed. It will
be shown again if the locked SIM is re-entered.

2) If the device is PUK locked and the code
**05*PUK*new pin* new Pin# is entered in the
emergency dialer, it will unlock the SIM.
By listening to the READY state, we can remove
the keyguard when the SIM is unlocked by
other means.

Bug: 64469515
Bug: 64044132
Test: Manual
Merged-In: I7b576ee7e38f141075cae094e3d1f74b7145d53f
Change-Id: I9507f80edcd4c04dfa0cc3b48a25e619aafa9eb3
2017-09-01 10:04:37 -07:00
Jason Monk
cc3525748e Merge "Fix animation of settings button in RTL layout case" 2017-09-01 12:56:56 +00:00
Bin Chen
503513de9e Fix typo in CarrierConfigManager javadoc.
Change-Id: Ie9d2f7aa705b7895777dcfa27e6826babff64e29
2017-09-01 18:20:20 +08:00
Treehugger Robot
c6b2e356b6 Merge "Add APF black list for ether-type" 2017-09-01 06:19:11 +00:00
Ahmed ElArabawy
fd424169a1 Add APF black list for ether-type
Add a configurable black for protocols which packets are to be dropped
by APF. This enales an OEM to configure the APF to filter out un-needed
packets from reaching the host

Bug: 62415182
Test: runtest frameworks-net

Merged-In: I86335a0f854d5e83a2b2767978cd69b2cc25c2f8

Signed-off-by: Ahmed ElArabawy <arabawy@google.com>

(cherry picked from commit caffbe127726c6a9ab5dd023a9b09cfa43eac617)

Change-Id: I15a758d18464d73d24ba8364a867904bb3cd3b34
2017-09-01 14:03:58 +09:00
Akira Oshimi
5cb7cd1300 Fix animation of settings button in RTL layout case
The settings button overlaps with the expand indicator
in RTL layout case when rotating the device to landscape mode.
To fix this issue, the animation of settings button
in RTL layout case should be changed.

Fixes: 65228478
Test: manual - set a BiDi language and open Notification panel.

Change-Id: I008b33ebcdf074639a291e7d30d3343654a2ea37
2017-09-01 02:26:53 +00:00
Treehugger Robot
fd5cdfc924 Merge "Remove unused methods from OMS" 2017-08-31 21:31:31 +00:00
Treehugger Robot
111c955d1d Merge changes I7218f17a,I96b7340a
* changes:
  ResourcesManager: correct @NonNull -> @Nullable
  AAPT2: Allow <overlay> in AndroidManifest.xml
2017-08-31 21:27:42 +00:00
Treehugger Robot
637dbcbb6c Merge "OMS: fix listener callbacks triggered by changes to target package" 2017-08-31 20:51:38 +00:00
lingjunl
4bddd5c44b Merge "Whitelist free sms shortcode 76551 in Mexico for constlletion." 2017-08-31 19:46:39 +00:00
Treehugger Robot
1fa3a60f05 Merge "Test: Drag on the divider line." 2017-08-31 16:43:44 +00:00
Treehugger Robot
50cf621704 Merge changes I49057737,I68e3096d
* changes:
  Frameworks: Clean up SystemProperties
  Frameworks: Add warning to SystemProperties.get
2017-08-31 15:01:37 +00:00
Hugo Benichi
1d66352b40 Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService"" 2017-08-31 14:31:24 +00:00
Hugo Benichi
50d46a43e3 Revert "Nat464Xlat: interface notification handler on ConnectivityService"
This reverts commit 771d5c2f0126ba692897c9716f4098ae6e3a870c due to b/65225023.

Change-Id: I6ca3780afb8d47b77219d6b5a06760042f684c4b
2017-08-31 14:29:51 +00:00
Mårten Kongstad
e8850e61c3 Remove unused methods from OMS
Remove the unused methods

  - IdmapManager.isDangerous(PackageInfo, int)
  - IdmapManager.isDangerous(String)

The concept of a dangerous overlay is currently not used, so remove any
trace of it.

Test: builds
Change-Id: I79ea00c05c0ee113733c20e982ae8f517bbbbd11
2017-08-31 14:50:10 +02:00
Mårten Kongstad
7a242216a9 ResourcesManager: correct @NonNull -> @Nullable
To clear all overlay packages, the caller of
ResourcesManager#applyNewResourceDirsLocked will pass in null as the
second argument. Fix typo where the argument's annotation misspelled
@Nullable as @NonNull.

Change-Id: I7218f17ac8f121924e722d3e00d3ebdc4d6f3382
2017-08-31 14:50:10 +02:00
Mårten Kongstad
f08ad98acb OMS: fix listener callbacks triggered by changes to target package
The OverlayManagerListener connected to the OverlayManagerServiceImpl
should be notified when and only when the overlay settings have been
modified. The pattern used to fulfill this contract as a result of a
change to a target package is as follows:

    if (updateAllOverlaysForTarget(...)) {
        mListener.onOverlaysChanged(...);
    }

Fix two violations of this pattern:

  - The listener was always notified
  - The listener was never notified

Test: manual
Change-Id: Id24a439e2eaaf976e8c7d650af36d58632cfb4ba
2017-08-31 14:50:10 +02:00
Mårten Kongstad
c903d2e7cd AAPT2: Allow <overlay> in AndroidManifest.xml
Test: libaapt2_tests
Test: manual (build an overlay package)
Change-Id: I96b7340a53a7d4f1ca022065674fbf5bdaa273f2
2017-08-31 14:50:10 +02:00
Treehugger Robot
549c3d2e4f Merge "Shutdown more reliably" 2017-08-31 03:11:51 +00:00
Andreas Gampe
a90534b551 Frameworks: Clean up SystemProperties
Clean up SystemProperties.java. Add annotations.

Clean up SystemProperties.cpp. Refactor for proper C++11.
Make sure C-string key construction is properly reused. Use
android::base functionality for actual reading.

Fix the test script to refer to the right location. Add some
test coverage.

(cherry picked from commit 2e6b9cb56320a86f0c33da890f667e5c76c8285d)

Test: m
Test: frameworks/base/core/tests/systemproperties/run_core_systemproperties_test.sh --rebuild
Merged-In: I490577370da985f600fb1117e3c818d3f68bad5f
Change-Id: I490577370da985f600fb1117e3c818d3f68bad5f
2017-08-30 18:37:48 -07:00
Andreas Gampe
33aea8d40e Frameworks: Add warning to SystemProperties.get
Add a warning that calling get() is unsafe when the system property
may not contain a valid UTF-encoded string.

(cherry picked from commit 6bf1cff1dd8cad0d2c6eb4f2cef28a97270e46b2)

Bug: 63177684
Test: m
Merged-In: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
Change-Id: I68e3096d770a32fe204be5c130a3ada9d3db7c0b
2017-08-30 18:37:48 -07:00
Treehugger Robot
7aff46195e Merge "IllegalArgumentException in MagnificationGestureHandler" 2017-08-30 20:40:54 +00:00
Erik Kline
afe7935991 Shutdown more reliably
Also: collapse largely unused VDBG/DBG into just DBG.

Test: as follows
    - built
    - flashed
    - booted
    - runtest framworks-net passes
Bug: 64914645
Change-Id: Ifbb6b1ce18c52c9cb58c89b9661248a155f7b4a8
2017-08-30 17:19:53 +09:00
Colin Cross
3abddeca75 Merge "Fix errorprone build" 2017-08-30 00:25:36 +00:00
Colin Cross
46a435a378 Fix errorprone build
Fixes:
frameworks/base/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java:149: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
    public void testNoSettingsValueDefaultDisabledDoesNotStart() throws Exception {
                ^
    (see http://errorprone.info/bugpattern/JUnit4TestNotRun)
  Did you mean '@Test'?
frameworks/base/tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java:170: error: [JUnit4TestNotRun] Test method will not be run; please add @Test annotation
    public void testNoSettingsValueDefaultEnabledDoesStart() throws Exception {
                ^
    (see http://errorprone.info/bugpattern/JUnit4TestNotRun)
  Did you mean '@Test'?

Bug: 64489631
Test: m -j RUN_ERROR_PRONE=true javac-check
Merged-In: Ib32489d07778465134bca52c589baddbd78ab129
Change-Id: I41dfdf87529e532df385617fa05c7006a7a14c86
2017-08-29 12:54:11 -07:00
Jason Monk
7d4e9b81b4 Merge "Fix QS user icon in guest mode" 2017-08-29 14:25:12 +00:00
Joachim Sauer
e048261656 Merge "Adapt ICU 59 API update to Doclava changes." 2017-08-29 13:42:26 +00:00
Akari Tsuneta
23fdba10d2 Fix QS user icon in guest mode
When the profile is updated in guest mode, the user icon in QS footer
is not displayed correctly. To fix this issue, the tinting of
guest icon is applied only when the drawable is not UserIconDrawable.

Fixes: 65148947
Test: manual - switch to guest and update the profile.

Change-Id: I9690e9fd286703a25ee08d877c3dd7f4729e2b31
2017-08-29 10:32:32 +00:00
Joachim Sauer
e447d9f0fb Adapt ICU 59 API update to Doclava changes.
Add methods that were missing from the previous API update because the
update-api version used for that had different behaviour from the
current one.

Specifically overrides for methods that differ only in sychronization
are now considered API-worthy and weren't before (b/62576297).

All methods added in this commit are methods that exist in the base
class without synchronization and are synchronized in the class they are
now being added in.

Bug: 64807220
Test: m checkapi
Change-Id: I9bf1b3d02e6a8f04b93ec36c0adffb7eedad3ad3
Merged-In: Iff584fb72dc8d651f9482b573f4b8cec89840ca6
2017-08-29 11:26:29 +01:00
Jakub Pawlowski
3cc1ad87f0 Merge "Fix GATT client leakage when scan is throttled (1/2)" 2017-08-29 08:00:55 +00:00
Hugo Benichi
91817b3129 Merge "Nat464Xlat: interface notification handler on ConnectivityService" 2017-08-29 05:08:00 +00:00
Hugo Benichi
771d5c2f01 Nat464Xlat: interface notification handler on ConnectivityService
This patch adds a layer of asynchonicity to the NetworkBaseObserver
callbacks implemented by Nat464Xlat in order to allow these callbacks
to run on the main ConnectivityService handler.

This allows to run interfaceLinkStateChanged and interfaceRemoved
callbacks in the same thread context as other Nat464Xlat methods and
solves the following issues:
  - NPE risk due to race between fixupLinkProperties called on the
    ConnectivityService thread and interfaceRemoved called as a
    callback by NetworkManagementService.
  - stale LinkProperties reads in both callbacks not called on
    ConnectivityService handler.
  - removes the race between stop() and interfaceRemoved().

This patch also:
  - removes/simplifies comments related to the threading
    model which are no obsolete.
  - extract clatd management logic from ConnectivityService into
    NetworkAgentInfo

Bug: 62997041
Bug: 64571917
Test:  runtest frameworks-net
       manually connected to ipv6 network and went to test-ipv6.com
Change-Id: I889d98e47423ff3d4746d6ed8015b265286e7c52
2017-08-29 08:55:18 +09:00
Colin Cross
edb2e0c722 Merge "Use guava 21.0" 2017-08-28 23:50:52 +00:00
Hugo Benichi
aee703e7e4 Merge "Nat464Xlat: internal state guards cleanup + state enum" 2017-08-28 22:30:27 +00:00
Treehugger Robot
3c28e2b280 Merge "Fixed mimetype error of PPT file" 2017-08-28 22:12:37 +00:00
bokyung.kim
9806330b52 Fixed mimetype error of PPT file
Change mimetype of PPT file to match MS specification.
(MimeUtils.java matched the MS specification)

Test: Check mimetype of DB after saving PPT file.

Change-Id: Ie559499ae39bc527fcc656ba37f28845af209e6c
Signed-off-by: bokyung.kim <bokyung.kim@lge.com>
2017-08-28 13:16:35 -07:00
Treehugger Robot
11ae580f81 Merge "Ensure the generation is not changed before put value to cache" 2017-08-28 19:42:11 +00:00
Jakub Pawlowski
ee02e1ce77 Fix GATT client leakage when scan is throttled (1/2)
Currently, scan throttling happens after client is registered, but
before the scan is started. This might lead to scan client being leaked.
This patch fixed that by moving check before client registration.

Bug: 64887233
Test: manual
Change-Id: I22ae624a0c51110cb69679f796926e3b2b36d0ac
2017-08-28 18:09:03 +00:00
Edward Savage-Jones
4d318287ba IllegalArgumentException in MagnificationGestureHandler
When enabling the magnifier feature it is possible to trigger
a system crash.

Problem:
On ACTION_DOWN a MESSAGE_ON_ACTION_TAP_AND_HOLD is sent to the
handler with a delay based on long-press timeout.  If the user
then removes their finger while outside of the magnification area,
(ACTION_UP) this message is not removed.  Then when the message
is handled on long-press timeout, it puts the state into
STATE_VIEWPORT_DRAGGING.  If the user then taps the screen again
it is handled by the StateViewportDraggingHandler resulting in:

 IllegalArgumentException: Unexpected event type: ACTION_DOWN

and a system server crash.

Bug: 65101895
Test: Manual:
1. Enable "Magnify with button" from accessibility settings
2. Tap accessibility button on the right navbar
3. Touch & hold bottom part of application area
4. Quickly drag down to the navbar and release
5. Touch anywhere
With this patch it should not crash

Change-Id: I7df8d2185f6db9d148d24d2b155cb357b3637a71
2017-08-28 15:26:31 +00:00
Treehugger Robot
c0d8300b32 Merge "Trivial change to test expectations." 2017-08-28 12:39:29 +00:00
Hugo Benichi
81b179cfdd Merge "Nat464Xlat: clat management cleanup" 2017-08-28 11:47:08 +00:00
Lorenzo Colitti
f612b609db Trivial change to test expectations.
(cherry picked from commit 0fee732ca579bbc4320ade35f238bdfa1aa500f5)

Bug: 32163131
Test: runtest frameworks-net
Change-Id: Iec8af5191b4da495e47ef97d70a03a5d2e75cfe2
2017-08-28 18:58:13 +09:00
Lorenzo Colitti
5fe8e51904 Merge "switch to native_handle_create() for passing ownership" 2017-08-28 08:02:19 +00:00