OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge "Add APF black list for ether-type"
Treehugger Robot [Fri, 1 Sep 2017 06:19:11 +0000 (06:19 +0000)]
Merge "Add APF black list for ether-type"

6 years agoAdd APF black list for ether-type
Ahmed ElArabawy [Wed, 2 Aug 2017 20:31:05 +0000 (13:31 -0700)]
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

6 years agoMerge "Remove unused methods from OMS"
Treehugger Robot [Thu, 31 Aug 2017 21:31:31 +0000 (21:31 +0000)]
Merge "Remove unused methods from OMS"

6 years agoMerge changes I7218f17a,I96b7340a
Treehugger Robot [Thu, 31 Aug 2017 21:27:42 +0000 (21:27 +0000)]
Merge changes I7218f17a,I96b7340a

* changes:
  ResourcesManager: correct @NonNull -> @Nullable
  AAPT2: Allow <overlay> in AndroidManifest.xml

6 years agoMerge "OMS: fix listener callbacks triggered by changes to target package"
Treehugger Robot [Thu, 31 Aug 2017 20:51:38 +0000 (20:51 +0000)]
Merge "OMS: fix listener callbacks triggered by changes to target package"

6 years agoMerge "Whitelist free sms shortcode 76551 in Mexico for constlletion."
lingjunl [Thu, 31 Aug 2017 19:46:39 +0000 (19:46 +0000)]
Merge "Whitelist free sms shortcode 76551 in Mexico for constlletion."

6 years agoMerge "Test: Drag on the divider line."
Treehugger Robot [Thu, 31 Aug 2017 16:43:44 +0000 (16:43 +0000)]
Merge "Test: Drag on the divider line."

6 years agoMerge changes I49057737,I68e3096d
Treehugger Robot [Thu, 31 Aug 2017 15:01:37 +0000 (15:01 +0000)]
Merge changes I49057737,I68e3096d

* changes:
  Frameworks: Clean up SystemProperties
  Frameworks: Add warning to SystemProperties.get

6 years agoMerge "Revert "Nat464Xlat: interface notification handler on ConnectivityService""
Hugo Benichi [Thu, 31 Aug 2017 14:31:24 +0000 (14:31 +0000)]
Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService""

6 years agoRevert "Nat464Xlat: interface notification handler on ConnectivityService"
Hugo Benichi [Thu, 31 Aug 2017 14:29:51 +0000 (14:29 +0000)]
Revert "Nat464Xlat: interface notification handler on ConnectivityService"

This reverts commit 771d5c2f0126ba692897c9716f4098ae6e3a870c due to b/65225023.

Change-Id: I6ca3780afb8d47b77219d6b5a06760042f684c4b

6 years agoRemove unused methods from OMS
Mårten Kongstad [Thu, 26 Jan 2017 08:54:21 +0000 (09:54 +0100)]
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

6 years agoResourcesManager: correct @NonNull -> @Nullable
Mårten Kongstad [Fri, 28 Apr 2017 11:10:11 +0000 (13:10 +0200)]
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

6 years agoOMS: fix listener callbacks triggered by changes to target package
Mårten Kongstad [Mon, 26 Jun 2017 13:26:32 +0000 (15:26 +0200)]
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

6 years agoAAPT2: Allow <overlay> in AndroidManifest.xml
Mårten Kongstad [Thu, 8 Dec 2016 23:23:41 +0000 (00:23 +0100)]
AAPT2: Allow <overlay> in AndroidManifest.xml

Test: libaapt2_tests
Test: manual (build an overlay package)
Change-Id: I96b7340a53a7d4f1ca022065674fbf5bdaa273f2

6 years agoMerge "Shutdown more reliably"
Treehugger Robot [Thu, 31 Aug 2017 03:11:51 +0000 (03:11 +0000)]
Merge "Shutdown more reliably"

6 years agoFrameworks: Clean up SystemProperties
Andreas Gampe [Sat, 29 Jul 2017 21:14:39 +0000 (14:14 -0700)]
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

6 years agoFrameworks: Add warning to SystemProperties.get
Andreas Gampe [Sat, 29 Jul 2017 01:20:37 +0000 (18:20 -0700)]
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

6 years agoMerge "IllegalArgumentException in MagnificationGestureHandler"
Treehugger Robot [Wed, 30 Aug 2017 20:40:54 +0000 (20:40 +0000)]
Merge "IllegalArgumentException in MagnificationGestureHandler"

6 years agoShutdown more reliably
Erik Kline [Wed, 30 Aug 2017 06:37:20 +0000 (15:37 +0900)]
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

6 years agoMerge "Fix errorprone build"
Colin Cross [Wed, 30 Aug 2017 00:25:36 +0000 (00:25 +0000)]
Merge "Fix errorprone build"

6 years agoFix errorprone build
Colin Cross [Tue, 29 Aug 2017 19:18:55 +0000 (12:18 -0700)]
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

6 years agoMerge "Fix QS user icon in guest mode"
Jason Monk [Tue, 29 Aug 2017 14:25:12 +0000 (14:25 +0000)]
Merge "Fix QS user icon in guest mode"

6 years agoMerge "Adapt ICU 59 API update to Doclava changes."
Joachim Sauer [Tue, 29 Aug 2017 13:42:26 +0000 (13:42 +0000)]
Merge "Adapt ICU 59 API update to Doclava changes."

6 years agoFix QS user icon in guest mode
Akari Tsuneta [Thu, 10 Aug 2017 11:51:44 +0000 (20:51 +0900)]
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

6 years agoAdapt ICU 59 API update to Doclava changes.
Joachim Sauer [Tue, 29 Aug 2017 10:26:29 +0000 (11:26 +0100)]
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

6 years agoMerge "Fix GATT client leakage when scan is throttled (1/2)"
Jakub Pawlowski [Tue, 29 Aug 2017 08:00:55 +0000 (08:00 +0000)]
Merge "Fix GATT client leakage when scan is throttled (1/2)"

6 years agoMerge "Nat464Xlat: interface notification handler on ConnectivityService"
Hugo Benichi [Tue, 29 Aug 2017 05:08:00 +0000 (05:08 +0000)]
Merge "Nat464Xlat: interface notification handler on ConnectivityService"

6 years agoNat464Xlat: interface notification handler on ConnectivityService
Hugo Benichi [Wed, 5 Jul 2017 02:08:48 +0000 (11:08 +0900)]
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

6 years agoMerge "Use guava 21.0"
Colin Cross [Mon, 28 Aug 2017 23:50:52 +0000 (23:50 +0000)]
Merge "Use guava 21.0"

6 years agoMerge "Nat464Xlat: internal state guards cleanup + state enum"
Hugo Benichi [Mon, 28 Aug 2017 22:30:27 +0000 (22:30 +0000)]
Merge "Nat464Xlat: internal state guards cleanup + state enum"

6 years agoMerge "Fixed mimetype error of PPT file"
Treehugger Robot [Mon, 28 Aug 2017 22:12:37 +0000 (22:12 +0000)]
Merge "Fixed mimetype error of PPT file"

6 years agoFixed mimetype error of PPT file
bokyung.kim [Wed, 26 Jul 2017 01:18:39 +0000 (10:18 +0900)]
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>
6 years agoMerge "Ensure the generation is not changed before put value to cache"
Treehugger Robot [Mon, 28 Aug 2017 19:42:11 +0000 (19:42 +0000)]
Merge "Ensure the generation is not changed before put value to cache"

6 years agoFix GATT client leakage when scan is throttled (1/2)
Jakub Pawlowski [Mon, 28 Aug 2017 11:12:49 +0000 (04:12 -0700)]
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

6 years agoIllegalArgumentException in MagnificationGestureHandler
Edward Savage-Jones [Mon, 28 Aug 2017 08:44:18 +0000 (10:44 +0200)]
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

6 years agoMerge "Trivial change to test expectations."
Treehugger Robot [Mon, 28 Aug 2017 12:39:29 +0000 (12:39 +0000)]
Merge "Trivial change to test expectations."

6 years agoMerge "Nat464Xlat: clat management cleanup"
Hugo Benichi [Mon, 28 Aug 2017 11:47:08 +0000 (11:47 +0000)]
Merge "Nat464Xlat: clat management cleanup"

6 years agoTrivial change to test expectations.
Lorenzo Colitti [Thu, 24 Aug 2017 03:40:07 +0000 (12:40 +0900)]
Trivial change to test expectations.

(cherry picked from commit 0fee732ca579bbc4320ade35f238bdfa1aa500f5)

Bug: 32163131
Test: runtest frameworks-net
Change-Id: Iec8af5191b4da495e47ef97d70a03a5d2e75cfe2

6 years agoMerge "switch to native_handle_create() for passing ownership"
Lorenzo Colitti [Mon, 28 Aug 2017 08:02:19 +0000 (08:02 +0000)]
Merge "switch to native_handle_create() for passing ownership"

6 years agoNat464Xlat: internal state guards cleanup + state enum
Hugo Benichi [Thu, 29 Jun 2017 05:04:13 +0000 (14:04 +0900)]
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

6 years agoNat464Xlat: clat management cleanup
Hugo Benichi [Tue, 27 Jun 2017 06:13:20 +0000 (15:13 +0900)]
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

6 years agoMerge "DeviceInfoUtils.java: support to show kernel version compiled with clang"
Treehugger Robot [Sat, 26 Aug 2017 00:24:23 +0000 (00:24 +0000)]
Merge "DeviceInfoUtils.java: support to show kernel version compiled with clang"

6 years agoWhitelist free sms shortcode 76551 in Mexico for constlletion.
Lingjun Li [Fri, 25 Aug 2017 20:16:16 +0000 (13:16 -0700)]
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

6 years agoMerge "Emergency redial implementation"
Brad Ebinger [Fri, 25 Aug 2017 20:05:53 +0000 (20:05 +0000)]
Merge "Emergency redial implementation"

6 years agoUse guava 21.0
Colin Cross [Fri, 25 Aug 2017 18:27:46 +0000 (11:27 -0700)]
Use guava 21.0

guava 20.0 is being removed.

Test: m -j checkbuild
Change-Id: I48ac4f641da3567985339c061dad5d60829aeee0

6 years agoMerge "Add new error code in SmsManager"
Shuo Qian [Fri, 25 Aug 2017 18:01:18 +0000 (18:01 +0000)]
Merge "Add new error code in SmsManager"

6 years agoEmergency redial implementation
Srikanth Chintala [Thu, 4 May 2017 15:28:34 +0000 (20:58 +0530)]
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

6 years agoMerge "Switch /data/misc/reboot/last_reboot_reason to persistent property"
Mark Salyzyn [Fri, 25 Aug 2017 14:16:12 +0000 (14:16 +0000)]
Merge "Switch /data/misc/reboot/last_reboot_reason to persistent property"

6 years agoswitch to native_handle_create() for passing ownership
Erik Kline [Thu, 24 Aug 2017 05:21:57 +0000 (22:21 -0700)]
switch to native_handle_create() for passing ownership

Test: builds
Bug: 29337859
Bug: 32163131
Bug: 64976634
Change-Id: Ifd064736c9fcb633b72e56e93b7baa5f4a5ff051

6 years agoEnsure the generation is not changed before put value to cache
xulicheng [Thu, 24 Aug 2017 03:29:03 +0000 (11:29 +0800)]
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>
6 years agoMerge "Track conference start in system elapsed time."
Tyler Gunn [Thu, 24 Aug 2017 22:24:16 +0000 (22:24 +0000)]
Merge "Track conference start in system elapsed time."

6 years agoAdd new error code in SmsManager
sqian [Wed, 9 Aug 2017 22:28:41 +0000 (15:28 -0700)]
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

6 years agoMerge "Add new telephony disconnect causes for low battery scenario."
Treehugger Robot [Thu, 24 Aug 2017 21:33:55 +0000 (21:33 +0000)]
Merge "Add new telephony disconnect causes for low battery scenario."

6 years agoMerge changes from topic "bt-fix-checkstyle-errors"
Treehugger Robot [Thu, 24 Aug 2017 21:25:49 +0000 (21:25 +0000)]
Merge changes from topic "bt-fix-checkstyle-errors"

* changes:
  Fix checkstyle errors (2/2)
  Fix checkstyle errors (1/2)

6 years agoAdd new telephony disconnect causes for low battery scenario.
Tyler Gunn [Tue, 22 Aug 2017 18:13:05 +0000 (11:13 -0700)]
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

6 years agoFix checkstyle errors (2/2)
Jack He [Wed, 23 Aug 2017 04:21:23 +0000 (21:21 -0700)]
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

6 years agoFix checkstyle errors (1/2)
Jack He [Tue, 22 Aug 2017 23:06:54 +0000 (16:06 -0700)]
Fix checkstyle errors (1/2)

* Automatic style corrections through IDE

Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7

6 years agoDeviceInfoUtils.java: support to show kernel version compiled with clang
Yongqin Liu [Thu, 8 Jun 2017 08:15:29 +0000 (16:15 +0800)]
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>
6 years agoMerge changes from topic "offload_cherrypick"
Treehugger Robot [Thu, 24 Aug 2017 05:18:23 +0000 (05:18 +0000)]
Merge changes from topic "offload_cherrypick"

* changes:
  Send add/removeDownstream info to offload HAL
  Don't completely stop offload if setting data limit fails.

6 years agoSend add/removeDownstream info to offload HAL
Erik Kline [Thu, 6 Jul 2017 10:49:35 +0000 (19:49 +0900)]
Send add/removeDownstream info to offload HAL

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passed
Bug: 29337859
Bug: 32163131

Merged-In: I0cb81ac054fc2bf6c8b8bfe658e9404a15091d7a
Merged-In: I7abcdcc2d7d967179c47081a6db2b417164891f3
Change-Id: I6c59aa7cb80b54f376f294b24c1409710c553d74
(cherry picked from commit ed962a84122ab950a103fbbc0bf911f61b6b9500)

6 years agoDon't completely stop offload if setting data limit fails.
Lorenzo Colitti [Mon, 21 Aug 2017 03:34:50 +0000 (12:34 +0900)]
Don't completely stop offload if setting data limit fails.

Currently, if setting a data limit fails, we completely stop
offload in order to avoid data overages. However, the next thing
we do is try to fetch the stats and crash, because once offload
is stopped all our local state is cleared.

Fix this by fetching stats before we stop offload.

Bug: 29337859
Bug: 32163131
Bug: 64867836
Test: OffloadControllerTest passes
Test: no crash when disabling wifi tethering with BT tethering active
Merged-In: I7fc47e60b2da5f39c26fb22c1325618f9948dd38
Merged-In: I464dd2a6d1996b1cfb8bbf82b6ee453fd0747569
Change-Id: I260f5450f8b67f055983af68fb23a5f3cfc0bc69
(cherry picked from commit d743601a002ac12c02da58e92ebd0544ab0b77ea)

6 years agoMerge "Make NetworkManagementServiceTest pass again."
Hugo Benichi [Thu, 24 Aug 2017 03:36:20 +0000 (03:36 +0000)]
Merge "Make NetworkManagementServiceTest pass again."

6 years agoMerge "Tethering offload stats updates are eventually consistent"
Hugo Benichi [Thu, 24 Aug 2017 02:37:03 +0000 (02:37 +0000)]
Merge "Tethering offload stats updates are eventually consistent"

6 years agoMerge "Embms adjustments for 7/28"
Hall Liu [Wed, 23 Aug 2017 20:18:15 +0000 (20:18 +0000)]
Merge "Embms adjustments for 7/28"

6 years agoEmbms adjustments for 7/28
Hall Liu [Thu, 27 Jul 2017 22:33:31 +0000 (15:33 -0700)]
Embms adjustments for 7/28

* Move some vendor intents and extras into a VendorIntents class
* Add a download result RESULT_IO_ERROR
* Add documentation noting that repeated calls to
setTempFileRootDirectory will not throw an error if the parameter is the
same.
* Add getTempFileRootDirectory method for app
* Hide AIDL classes from the public/system API surfaces for download
* Remove size and md5hash from FileInfo

Change-Id: I8c968a7d68db2588ee550167ed2693fe89c5925a

6 years agoMerge "Embms API adjustments for 7/21"
Hall Liu [Wed, 23 Aug 2017 16:37:50 +0000 (16:37 +0000)]
Merge "Embms API adjustments for 7/21"

6 years agoTethering offload stats updates are eventually consistent
Hugo Benichi [Tue, 22 Aug 2017 04:57:41 +0000 (13:57 +0900)]
Tethering offload stats updates are eventually consistent

This patch removes the call to runWithScissors() in
OffloadController#getTetherStats() that was causing a deadlock when
NetworkStatsService would be polled for stats in certain threading
contexts.

Instead of trying to query the tethering offload HAL synchronously all
the time, this patch:
 - changes getTetherStats() to only call into the offload HAL when it
   detects that it is called on the same thread as the Tethering handler
   thread.
 - changes the map of interface to accumulated tethering forwarded stats
   to be concurrent.

This makes stats reading from getTetherStats() eventually consistent.
From the point of view of getTetherStats(), it preserves the guarantees
that tethering stats are monotonically increasing, and also guarantees
no tearing between rx bytes and tx bytes.

Bug: 29337859
Bug: 32163131
Bug: 64771555
Test: runtest frameworks-net
Merged-In: Ibcd351ad0225ef146b00a807833f76d2a886f6c1
Merged-In: I61786d61fe1422e429c0dd9eadaff6f02eb850e7
Merged-In: I999d1d1bf72e7ab02c5d17f37aad00bc711d3fc5

(cherry pick from commit eb5e465edd78bea26289f779b635c7e94d934854)

Change-Id: I28646b962cee8c8a6efd66059f84873c02ac5810

6 years agoMake NetworkManagementServiceTest pass again.
Lorenzo Colitti [Mon, 10 Jul 2017 17:29:28 +0000 (02:29 +0900)]
Make NetworkManagementServiceTest pass again.

1. Mock the service manager so that NMS can fetch mock versions
   of INetd and IBatteryStats.
2. Call LocalServices.removeServiceForTest to avoid a duplicate
   service registration error. // check this
3. Change the timeout from 100ms to 200ms, as otherwise the tests
   that check for IfaceClass fail.
4. Convert NetworkManagementServiceTest to JUnit 4.
5. Move NetworkManagementServiceTest to tests/net

Bug: 29337859
Bug: 32163131
Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: Ic7371b427b35809ccd446addf35c9d8ae99ccfd3

6 years agoEmbms API adjustments for 7/21
Hall Liu [Thu, 20 Jul 2017 22:32:51 +0000 (15:32 -0700)]
Embms API adjustments for 7/21

* Enforce that only one instance of each manager can be active.
* Add a death receipient for both managers to notify the app of binder
death
* Add documentation informing the app that it may not call create()
multiple times
* Fix a collision in streaming state reason codes
* Add documentation in DownloadRequest to indicate which methods should
be called by the middleware.

Change-Id: Ie15283b5c34fee736e8023dbd4f889c2ca95299e

6 years agoMerge "Enable Checkstyle for "repo upload" for more projects."
Treehugger Robot [Tue, 22 Aug 2017 22:19:28 +0000 (22:19 +0000)]
Merge "Enable Checkstyle for "repo upload" for more projects."

6 years agoEnable Checkstyle for "repo upload" for more projects.
Aurimas Liutikas [Fri, 28 Apr 2017 21:30:26 +0000 (14:30 -0700)]
Enable Checkstyle for "repo upload" for more projects.

This CL enables Checkstyle for the following directories:
- core/java/android/
- core/tests/coretests/src/android/

Bug: 34746646
Test: None
Change-Id: Ib8b3f198000be19e9a7a61aa5abd61d827454eba
(cherry picked from commit e5abb866a56582ffc705c261a2cab20c2331e6a3)

6 years agoTrack conference start in system elapsed time.
Tyler Gunn [Fri, 4 Aug 2017 16:27:26 +0000 (09:27 -0700)]
Track conference start in system elapsed time.

This is important so that Telecom can track the duration of the call,
which is tracked using wall clock time.

Test: Manual, unit test
Bug: 64068300
Change-Id: If642d282cd8134060acf6ffe8d81215c394d800c

6 years agoSwitch /data/misc/reboot/last_reboot_reason to persistent property
Mark Salyzyn [Tue, 15 Aug 2017 14:53:47 +0000 (07:53 -0700)]
Switch /data/misc/reboot/last_reboot_reason to persistent property

Switch from /data/misc/reboot/last_reboot_reason to persistent
Android property persist.sys.boot.reason for indicating why the
device is rebooted or shutdown.

persist.sys.boot.reason has a standard as outlined in b/63736262 and
the associated investigation. Made adjustments to the values so that
we did not create a problem even before we started. Compliance is
part of the tests in boot_reason_test.sh.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 64687998
Change-Id: Iba69acf2105f4446411d86cdb8097a1755a20f15

6 years agoMerge "Make dun APNs as read-only by default."
Treehugger Robot [Tue, 22 Aug 2017 19:52:22 +0000 (19:52 +0000)]
Merge "Make dun APNs as read-only by default."

6 years agoMake dun APNs as read-only by default.
Amit Mahajan [Wed, 17 May 2017 22:36:30 +0000 (15:36 -0700)]
Make dun APNs as read-only by default.

Test: Verified tethering manually for T-Mo and AT&T
Bug: 38186417
Change-Id: Iae2beede0e20810cba4d96f897756896adf77b30

6 years agoMerge "Remove TTS symbols from NDK stub library."
Treehugger Robot [Tue, 22 Aug 2017 18:03:10 +0000 (18:03 +0000)]
Merge "Remove TTS symbols from NDK stub library."

6 years agoMerge "Fix lint errors in the streaming API"
Hall Liu [Tue, 22 Aug 2017 17:55:06 +0000 (17:55 +0000)]
Merge "Fix lint errors in the streaming API"

6 years agoMerge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs"
Tobias Thierer [Tue, 22 Aug 2017 15:00:24 +0000 (15:00 +0000)]
Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs"
am: be87c9ca58

Change-Id: I79db2f0dc0870f71ec21397545e2e6abb5c7142b

6 years agoMerge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs"
Tobias Thierer [Tue, 22 Aug 2017 14:07:16 +0000 (14:07 +0000)]
Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs"

6 years agoRemove TTS symbols from NDK stub library.
Dan Albert [Tue, 22 Aug 2017 07:15:25 +0000 (00:15 -0700)]
Remove TTS symbols from NDK stub library.

These haven't actually existed in libandroid for some time. We can't
fix the past, so just remove the API from the NDK.

Test: make checkbuild
Bug: http://b/64572149
Change-Id: Ic68e81c63e738e6d341bcae6178cdcc080326da4

6 years agoMerge "Fix transitioning between non-accept strict policies."
Lorenzo Colitti [Tue, 22 Aug 2017 06:42:19 +0000 (06:42 +0000)]
Merge "Fix transitioning between non-accept strict policies."
am: bef2c91bb5

Change-Id: Iacf9f43f88ac77cb2a6094348cf52107f7ef0817

6 years agoMerge "Fix transitioning between non-accept strict policies."
Treehugger Robot [Tue, 22 Aug 2017 06:28:30 +0000 (06:28 +0000)]
Merge "Fix transitioning between non-accept strict policies."

6 years agoMerge "IpManager: use InitialConfiguration for provisioning"
Hugo Benichi [Mon, 21 Aug 2017 12:08:28 +0000 (12:08 +0000)]
Merge "IpManager: use InitialConfiguration for provisioning"
am: 5b218bdc8e

Change-Id: I131589680b68222e4fda4e9165ac2f50894ee28e

6 years agoMerge "IpManager: use InitialConfiguration for provisioning"
Hugo Benichi [Mon, 21 Aug 2017 11:53:24 +0000 (11:53 +0000)]
Merge "IpManager: use InitialConfiguration for provisioning"

6 years agoIpManager: use InitialConfiguration for provisioning
Hugo Benichi [Tue, 8 Aug 2017 04:08:06 +0000 (13:08 +0900)]
IpManager: use InitialConfiguration for provisioning

This patch changes IpManager to take into account static provisioning
information specified in the InitialConfiguration for IPv6 static
configuration.

When a valid InitialConfiguration with IPv6 content is specified,
IpManager will do the following things:

- at start(), it will push the IPv6 addresses in the config to netd
- it will observe all addresses be notified via Netlink
- when all addresses are there, it will patch in the associated IPv6
  routes in the config, so that they get passed to ConnectivityService
  through the usual mechanism

The logic triggering onProvisioningSuccess is also changed to take into
account InitialConfiguration: when all addresses and all routes in the
config are seen the provisioning is successful.

Bug: 62988545
Test: runtest frameworks-net, with newly added tests
Change-Id: I77ed7c576c4b198de7a4726be70c78b74689e98b

6 years agoFix transitioning between non-accept strict policies.
Lorenzo Colitti [Sun, 20 Aug 2017 02:54:57 +0000 (11:54 +0900)]
Fix transitioning between non-accept strict policies.

https://android-review.googlesource.com/438278/ attempted
to fix changing between two non-accept StrictMode policies (which
is not supported by netd) by ensuring that if neither the old nor
the new policy were accept, we'd first set an accept policy.

Unfortunately, while this is what the comment says, what the
code actually does is send the new policy twice. Fix the code to
match the comment and the intent of the CL.

While I'm at it, also move applyUidCleartextNetworkPolicy into
the synchronized block, so multiple concurrent calls to
setUidCleartextNetworkPolicy don't result in NMS state going out
of sync with netd state.

Bug: 28362720
Test: builds
Change-Id: I8d876ba0786c4d6325d26a84378fc6afcf47ab84

6 years agoMerge changes I325b13d5,I89719fe7
Lorenzo Colitti [Sat, 19 Aug 2017 03:15:08 +0000 (03:15 +0000)]
Merge changes I325b13d5,I89719fe7
am: 23868e9c09

Change-Id: Iaced543ab17ea87c8f701975764d957bc1b17fc7

6 years agoMerge changes I325b13d5,I89719fe7
Treehugger Robot [Sat, 19 Aug 2017 03:05:14 +0000 (03:05 +0000)]
Merge changes I325b13d5,I89719fe7

* changes:
  Add tether offload traffic to interface stats as well.
  Tell the system when tethering offload hits a limit.

6 years agoTest: Drag on the divider line.
wuliang [Fri, 18 Aug 2017 14:28:46 +0000 (22:28 +0800)]
Test: Drag on the divider line.

Fix Bug:SystemUI will crash when draging the divider line in qstile edit panel.

Patch solution:The divider line can not be dragged.
When the divider is selected, step in onSelectedChanged, mTiles.get(position) will return null object.Then SystemUI will crash

Change-Id: I40b948a8fac2964df7891086a701159a4c0f513d

6 years agoAdd tether offload traffic to interface stats as well.
Lorenzo Colitti [Thu, 17 Aug 2017 10:23:08 +0000 (19:23 +0900)]
Add tether offload traffic to interface stats as well.

Currently, we only count add tethering traffic to per-UID
stats, but not to total data usage (i.e., dev and XT stats). This
is correct for software tethering, because all software forwarded
packets are already included in interface counters, but it is
incorrect for hardware offload, because such packets do not
increment interface counters.

To fix this:
1. Add an argument to ITetheringStatsProvider#getTetherStats to
   indicate whether per-UID stats are requested. For clarity,
   define integer constants STATS_PER_IFACE and STATS_PER_UID
   to represent these operations.
2. Make NetdTetheringStatsProvider return stats only if per-UID
   stats are requested. (Otherwise tethering traffic would be
   double-counted).
3. Make OffloadController's stats provider return the same
   stats regardless of whether per-UID stats were requested or
   not.
4. Make NetworkStatsService add non-per-UID tethering stats to
   the dev and XT snapshots. The per-UID snapshots were already
   correctly adding in per-UID stats.

(cherry picked from commit 5356a35c3bcfcdf2d184c620af6bfbf9bddf35c5)

Bug: 29337859
Bug: 32163131
Test: runtest frameworks-net
Test: runtest frameworks-telephony
Change-Id: I325b13d50e88841dfb0db4c35e7e27f163ee72fe
Merged-In: I4e8e923d68dce1a4a68608dbd6c75a91165aa4ee

6 years agoFix lint errors in the streaming API
Hall Liu [Fri, 4 Aug 2017 01:26:39 +0000 (18:26 -0700)]
Fix lint errors in the streaming API

Fix the errors that cropped up when trying to upload the unhide CL in
MR1.

Bug: 30981736
Test: manual, with testapps
Change-Id: If4a9a5533a235a8cc56762ab7a9e32ec89440f1d

6 years agoTell the system when tethering offload hits a limit.
Lorenzo Colitti [Tue, 15 Aug 2017 10:25:51 +0000 (19:25 +0900)]
Tell the system when tethering offload hits a limit.

Add a new tetherLimitReached method to INetworkManagementService,
and call it when the HAL notifies OffloadController because the
limit has been reached.

Bug: 29337859
Bug: 32163131
Test: builds
Test: OffloadControllerTest passes

(cherry picked from commit d66cf56ba662f10f2da1d0f844116632ad0a0dbb)

Change-Id: I89719fe7ec8bfd3c85d6cdca9c0d449aea86ef9d
Merged-In: I026e6aa9e7b371f316c0d97c3cf5e78abc1f5263

6 years agoMerge "Really allow NetworkAgent immutable updates to NetworkCapabilities"
Hugo Benichi [Fri, 18 Aug 2017 11:59:02 +0000 (11:59 +0000)]
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities"
am: cb3c24e36b

Change-Id: Ifbdd005576b3f0fbf278ecec81ce3e4308c6276d

6 years agoMerge "Really allow NetworkAgent immutable updates to NetworkCapabilities"
Hugo Benichi [Fri, 18 Aug 2017 11:45:39 +0000 (11:45 +0000)]
Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities"

6 years agoresolve merge conflicts of d5cb58c693de to stage-aosp-master
Jack Yu [Fri, 18 Aug 2017 06:20:41 +0000 (23:20 -0700)]
resolve merge conflicts of d5cb58c693de to stage-aosp-master

Test: I solemnly swear I did not test this conflict resolution.

Merged-In: Ifc35306711dde39eb521dc015da931f4d5f2bf06
Change-Id: I9494087c5a90bccc4326c173bf6395996da357af

6 years agoMerge "Reduced the retry after disconnect delay"
Treehugger Robot [Fri, 18 Aug 2017 05:52:16 +0000 (05:52 +0000)]
Merge "Reduced the retry after disconnect delay"

6 years agoReally allow NetworkAgent immutable updates to NetworkCapabilities
Hugo Benichi [Fri, 18 Aug 2017 05:41:22 +0000 (14:41 +0900)]
Really allow NetworkAgent immutable updates to NetworkCapabilities

This patch completes commit bae105a5ccd11430bab14721d1325e2303a673da to
really allow updates of immutable capabilities to NetworkCapabilities of
NetworkAgents by using satisfiedByImmutableNetworkCapabilities instead
satisfiedByNetworkCapabilities.

Bug: 64125969
Test: runtest frameworks-net
Change-Id: I9beeb623792f0ee31abcd4ba9d0ba2451304fb2e

6 years agoReduced the retry after disconnect delay
Jack Yu [Wed, 16 Aug 2017 21:26:56 +0000 (14:26 -0700)]
Reduced the retry after disconnect delay

Reduced the delay from 20 seconds to 10 seconds. And created
a separate delay configuration for it.

Test: Manual
bug: 63633916
Merged-In: Ifc35306711dde39eb521dc015da931f4d5f2bf06
Change-Id: Ifc35306711dde39eb521dc015da931f4d5f2bf06
(cherry picked from commit 5523dc55d808998af4402431265e085e62bf6dd1)

6 years agoImport translations. DO NOT MERGE
Bill Yi [Fri, 18 Aug 2017 00:49:23 +0000 (17:49 -0700)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64086495
Change-Id: I1d90eea9e876253b9ca99b4507e9e34b5ea9819e

6 years agoMerge "Bluetooth: Don't throw exception when stopAdvertisingSet fails"
Jakub Pawlowski [Thu, 17 Aug 2017 23:06:14 +0000 (23:06 +0000)]
Merge "Bluetooth: Don't throw exception when stopAdvertisingSet fails"
am: b7cbb2fe49

Change-Id: I5ccf67621134fe1ba9204e2a8f3502ffacef0315