322859 Commits

Author SHA1 Message Date
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
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
Hugo Benichi
4f6f139869 Nat464Xlat: internal state guards cleanup + state enum
This patch does some cleanup of Nat464Xlat internal state guards
against the Nat464Xlat state Idle | Started | Running, which reduces
code nesting.

It also replaces introspection of internal state for distinguishing
between different stages in 464xlat lifecycle with an enum explicitly
introducing these three Idle | Started | Running states.

Bug: 62997041
Bug: 64571917
Test:  runtest frameworks-net
       manually connected to ipv6 network and went to test-ipv6.com
Change-Id: I6efc9fed2420ca488731a2b9b9c3c025b16eca10
2017-08-28 15:29:27 +09:00
Hugo Benichi
b577d65825 Nat464Xlat: clat management cleanup
This patch does some minor refactoring of clat starting/stopping code:
 - remove unused LinkProperties arguments in updateClat
 - remove unused Context argument in Nat464Xlat ctor
 - introduce ensureClatIsStarted and ensureClatIsStopped methods and
   simplify updateClat
 - add clatd to NetworkAgentInfo toString() method
 - clarify some comments

This changes prepare for moving BaseNetworkObserver callbacks to
ConnectivityService.

Bug: 62997041
Bug: 64571917
Test: runtest frameworks-net
      manually connected to IPv6 only network and went to test-ipv6.com
Change-Id: Idb204784614cfe700f73255a7a7b78c5e9ee6eca
2017-08-28 15:29:23 +09:00
Treehugger Robot
b5b1308f2f Merge "DeviceInfoUtils.java: support to show kernel version compiled with clang" 2017-08-26 00:24:23 +00:00
Lingjun Li
3652b9453f Whitelist free sms shortcode 76551 in Mexico for constlletion.
Constellation team has acquire a free shortcode 76551 in Mexico
for contellation MO verification. We don't want to scare people
by poping up the non-necessary warning dialog.
BUG: 65050702
Test: manual

Change-Id: Iab79032f31f99c80a750e02be0f1e6c32aa85363
2017-08-25 13:22:46 -07:00
Brad Ebinger
b3b09849bc Merge "Emergency redial implementation" 2017-08-25 20:05:53 +00:00
Colin Cross
3b0ea225ab Use guava 21.0
guava 20.0 is being removed.

Test: m -j checkbuild
Change-Id: I48ac4f641da3567985339c061dad5d60829aeee0
2017-08-25 11:27:46 -07:00
Shuo Qian
387ed22fef Merge "Add new error code in SmsManager" 2017-08-25 18:01:18 +00:00
Srikanth Chintala
fcb1501620 Emergency redial implementation
Define connection event to notify
Telecom/InCallUi about change in
account handle after redial and extra
for emergency phone handle.

Bug: 27059146
Change-Id: Ie72ab2901ec05d972204ed11f115a05b79173c1d
2017-08-25 10:08:56 -07:00
Mark Salyzyn
0172ce8dbf Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property" 2017-08-25 14:16:12 +00:00
Erik Kline
f57aeea077 switch to native_handle_create() for passing ownership
Test: builds
Bug: 29337859
Bug: 32163131
Bug: 64976634
Change-Id: Ifd064736c9fcb633b72e56e93b7baa5f4a5ff051
2017-08-24 18:33:35 -07:00
xulicheng
a5db9b42ea Ensure the generation is not changed before put value to cache
It may get old value from mValues, so check the generation
is not changed before update cache

Bug: https://issuetracker.google.com/issues/64995655
Test: Build
Change-Id: Ia7ae18baa269d0590e36f186e2f14b0bfbab3504
Signed-off-by: xulicheng <xulicheng@xiaomi.com>
2017-08-25 01:22:24 +00:00
Tyler Gunn
3b166fba8a Merge "Track conference start in system elapsed time." 2017-08-24 22:24:16 +00:00
sqian
85bb4b35f1 Add new error code in SmsManager
Design doc: https://docs.google.com/a/google.com/document/d
/1YPTNoM2Atjz8oISGAsRYlFVSA1NcYP8MbqYQIzLcJ9E/edit?usp=sharing

Test: compile/flash code; test locally
Bug: 34773406
Change-Id: I0b227e76048dd46d9c8023d37647db763e1e38e1
Merged-In: I0b227e76048dd46d9c8023d37647db763e1e38e1
2017-08-24 14:40:59 -07:00
Treehugger Robot
573948c49c Merge "Add new telephony disconnect causes for low battery scenario." 2017-08-24 21:33:55 +00:00
Treehugger Robot
838ab94a0f Merge changes from topic "bt-fix-checkstyle-errors"
* changes:
  Fix checkstyle errors (2/2)
  Fix checkstyle errors (1/2)
2017-08-24 21:25:49 +00:00
Tyler Gunn
69388170d7 Add new telephony disconnect causes for low battery scenario.
LOW_BATTERY is for disconnect mid-call due to low battery.
DIAL_LOW_BATTERY is for failure while dialing due to low battery.

Test: Manual.
Merged-In: Ife7a4ca5645b3fb42ab20effb4d8d4a8fef8116b
Change-Id: Ife7a4ca5645b3fb42ab20effb4d8d4a8fef8116b
Fixes: 63936576
2017-08-24 13:08:01 -07:00
Jack He
2992cd084c Fix checkstyle errors (2/2)
* Manual style corrections with IDE assistance
* Variable name refactors are done through IDE
* Corrected general style errors such as:
  - "final private var" -> "private final var"
  - "&&", "+", "||" should not be at the end of line
  - Non-static private variable should be like "mVar"
  - Private static variable should be like "sVar"
  - Code file should always end with newline
  - Inherited methods should be annotated with @Override
    and no @hide tags
  - Public methods should always have a JavaDoc entry
  - "int[] array" is preferred over "int array[]"
  - private methods should be accessed without "this."
    when there is no name collisions.
  - "boolean ? true : false" -> boolean
  - "boolean ? false : true" -> !boolean
  - "boolean == true" OR "boolean != false" -> boolean
  - "boolean != true" OR "boolean == false" -> !boolean

Bug: 63596319
Test: make checkbuild, no functional changes
Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
2017-08-24 19:09:58 +00:00
Jack He
a355e5efaf Fix checkstyle errors (1/2)
* Automatic style corrections through IDE

Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
2017-08-24 19:09:48 +00:00
Yongqin Liu
fa89b60167 DeviceInfoUtils.java: support to show kernel version compiled with clang
The kernel version displayed in settings is only shown correctly
when built with gcc, this change adds support for a kernel built
with clang.

Test: manually on hikey with following command:
adb shell am instrument -w -e class com.android.settings.DeviceInfoSettingsTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner

Change-Id: I9b7991681cb5abdf44e7d1d1bff84c7c866be2ed
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2017-08-24 19:19:09 +08:00
Treehugger Robot
b09cf3fbf1 Merge changes from topic "offload_cherrypick"
* changes:
  Send add/removeDownstream info to offload HAL
  Don't completely stop offload if setting data limit fails.
2017-08-24 05:18:23 +00:00