OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge "Fix ownership of objects returned by VintfObject::Get*"
Yifan Hong [Tue, 5 Sep 2017 21:53:40 +0000 (21:53 +0000)]
Merge "Fix ownership of objects returned by VintfObject::Get*"
am: 2cdd1ce600

Change-Id: I770ff369d16000d7f1eed8a4472e57cbc9b1b99c

6 years agoMerge "Fix ownership of objects returned by VintfObject::Get*"
Yifan Hong [Tue, 5 Sep 2017 21:45:13 +0000 (21:45 +0000)]
Merge "Fix ownership of objects returned by VintfObject::Get*"

6 years agoMerge "ConnectivityService: improve wakelock logging"
Hugo Benichi [Tue, 5 Sep 2017 14:01:20 +0000 (14:01 +0000)]
Merge "ConnectivityService: improve wakelock logging"
am: d8f298365a

Change-Id: I85f8b34008416c920f85e1e5d923dd324dd89e5e

6 years agoMerge "ConnectivityService: improve wakelock logging"
Treehugger Robot [Tue, 5 Sep 2017 13:46:53 +0000 (13:46 +0000)]
Merge "ConnectivityService: improve wakelock logging"

6 years agoConnectivityService: improve wakelock logging
Hugo Benichi [Tue, 5 Sep 2017 04:25:07 +0000 (13:25 +0900)]
ConnectivityService: improve wakelock logging

This patch adds the following wakelock related counters to connectivity
service dumps included in bug reports:
 - total number of wakelok acquisitions and releases
 - total cumulative wakelock duration
 - longest time the lock was held

Bug: 65085354
Test: runtest frameworks-net, also manually dumped connectivity service
      and check new logging

Merged-In: I8f67750c2eea73abf3d44f7f6df484427a8ea3f9
Merged-In: I93c0eb7c8add966378647400e11e33765d952345
Merged-In: Iabe99993001e069b8a8077533bca1fa7fb2f59ba

(cherry picked from commit 26bcfa19d01758c86a8f43a5b39673cd5866d2f3)

Change-Id: I4d6bb43110916b440819813b478523546ac5570e

6 years agoMerge "Nat464Xlat: correct racefree teardown"
Hugo Benichi [Tue, 5 Sep 2017 12:30:08 +0000 (12:30 +0000)]
Merge "Nat464Xlat: correct racefree teardown"
am: e6793f2795

Change-Id: I8612db5e5050690db8cf41dd04944b4c22da340c

6 years agoMerge "Nat464Xlat: correct racefree teardown"
Hugo Benichi [Tue, 5 Sep 2017 12:12:02 +0000 (12:12 +0000)]
Merge "Nat464Xlat: correct racefree teardown"

6 years agoMerge "Switch tethering stats from the unix socket to binder."
Lorenzo Colitti [Tue, 5 Sep 2017 09:26:26 +0000 (09:26 +0000)]
Merge "Switch tethering stats from the unix socket to binder."
am: cbe8f09817

Change-Id: If1c8db9447cd066c9800b68c8255ee248125b536

6 years agoMerge "Switch tethering stats from the unix socket to binder."
Treehugger Robot [Tue, 5 Sep 2017 09:17:46 +0000 (09:17 +0000)]
Merge "Switch tethering stats from the unix socket to binder."

6 years agoNat464Xlat: correct racefree teardown
Hugo Benichi [Fri, 1 Sep 2017 01:23:32 +0000 (01:23 +0000)]
Nat464Xlat: correct racefree teardown

This patch relays the NetworkBaseObserver notifications about nat
464xlat stacked interfaces onto the ConnectivityService handler.

This allows to process interface up and down notifications in the
same thread context and eliminates several races:

  - NPE risk due to race between fixupLinkProperties called on
    ConnectivityService thread and interfaceRemoved called on
    NetworkManagementService thread.
  - stale LinkProperties pointer reads in both NetworkBaseObserver
    callbacks not called on ConnectivityService handler.
  - removes the race between stop() and interfaceRemoved().
  - removes superfluous LinkProperties notifications when stop() is
    called before the stacked interface goes up.

The teardown procedure logic common to stop() and interfaceRemoved() is
put into enterStoppedState() and enterIdleState().

This allows to distinguish and correctly handle the following teardown
scenarios:
 - an IPv4 appears -> ConnectivityService calls Nat464Xlat#stop()
                   -> Nat464Xlat calls stopClatd
                   -> clatd stops
                   -> if the stacked interface was up, it is removed
                   -> Nat464Xlat#interfaceRemoved() is triggered and
                      a LinkProperties update is sent.

 - network disconnects -> ConnectivityService calls Nat464Xlat#stop()
                       -> Nat464Xlat calls stopClatd
                       -> clatd stops
                       -> if the stacked interface was up, it is removed
                       -> Nat464Xlat#interfaceRemoved() is triggered and
                          a LinkProperties update is sent.

 - clatd crashes or exit -> Nat464Xlat#interfaceRemoved() is triggered
                         -> Nat464Xlat unregisters itself as a network
                            observer
                         -> ConnectivityService is updated about the
                            stacked interface missing, and restarts
                            Nat464Xlat if needed.

Note that the first two scenarios have two cases: stop() can be called
before the notification for the stacked interface going up (STARTED), or
after (RUNNING). In the first case, Nat464Xlat must unregister
immediately as a network observer to avoid leaks.

This patch also:
  - removes/simplifies comments related to the threading model which
    are no obsolete.
  - extract clatd management logic from ConnectivityService into
    NetworkAgentInfo
  - add new unit tests where there was none before.

Bug: 62918393
Bug: 62997041
Bug: 64571917
Bug: 65225023
Test: runtest frameworks-net
Change-Id: I27221a8a60fd9760b567ed322cc79228df877e56

6 years agoSwitch tethering stats from the unix socket to binder.
Lorenzo Colitti [Fri, 1 Sep 2017 08:12:34 +0000 (17:12 +0900)]
Switch tethering stats from the unix socket to binder.

Bug: 32163131
Bug: 64995262
Test: builds
Change-Id: I673d76a8b0981302b5f6a14e97999cd7676d83ed

6 years agoMerge "Refactor interface IP code into InterfaceController"
Erik Kline [Tue, 5 Sep 2017 01:33:06 +0000 (01:33 +0000)]
Merge "Refactor interface IP code into InterfaceController"
am: 9465abf8af

Change-Id: I2e5245a4c765eaf6ab81b06b3b7081743951c259

6 years agoMerge "Refactor interface IP code into InterfaceController"
Treehugger Robot [Tue, 5 Sep 2017 01:14:17 +0000 (01:14 +0000)]
Merge "Refactor interface IP code into InterfaceController"

6 years agoMerge "Network Service Discovery test: properly release resources"
Hugo Benichi [Mon, 4 Sep 2017 12:14:11 +0000 (12:14 +0000)]
Merge "Network Service Discovery test: properly release resources"
am: c9d24d203d

Change-Id: If34b3770a5c0fef65d124201e0ca1374cc6b1eca

6 years agoMerge "Network Service Discovery test: properly release resources"
Hugo Benichi [Mon, 4 Sep 2017 11:50:58 +0000 (11:50 +0000)]
Merge "Network Service Discovery test: properly release resources"

6 years agoMerge "Fix some broken tests in frameworks-net with native dependencies"
Hugo Benichi [Mon, 4 Sep 2017 05:13:43 +0000 (05:13 +0000)]
Merge "Fix some broken tests in frameworks-net with native dependencies"
am: 1fd2eb6276

Change-Id: I628ee4ac71a762c02f9fe0440db08125693efd3c

6 years agoMerge "Fix some broken tests in frameworks-net with native dependencies"
Treehugger Robot [Mon, 4 Sep 2017 04:58:16 +0000 (04:58 +0000)]
Merge "Fix some broken tests in frameworks-net with native dependencies"

6 years agoMerge "DO NOT MERGE: Fix ApfTest"
Hugo Benichi [Mon, 4 Sep 2017 03:57:37 +0000 (03:57 +0000)]
Merge "DO NOT MERGE: Fix ApfTest"
am: 05f0bfe33e  -s ours

Change-Id: If9eb248254cafc6ec4ce10fb5a402282b7e3512c

6 years agoMerge "DO NOT MERGE: Fix ApfTest"
Treehugger Robot [Mon, 4 Sep 2017 03:39:59 +0000 (03:39 +0000)]
Merge "DO NOT MERGE: Fix ApfTest"

6 years agoMerge "Record even more stats even more often"
Erik Kline [Mon, 4 Sep 2017 02:25:48 +0000 (02:25 +0000)]
Merge "Record even more stats even more often"
am: 72a708d623

Change-Id: I6a662cce3cf5394d392f7ff816f5eb6a71131484

6 years agoMerge "Record even more stats even more often"
Treehugger Robot [Mon, 4 Sep 2017 02:11:47 +0000 (02:11 +0000)]
Merge "Record even more stats even more often"

6 years agoFix some broken tests in frameworks-net with native dependencies
Hugo Benichi [Fri, 4 Aug 2017 03:12:25 +0000 (12:12 +0900)]
Fix some broken tests in frameworks-net with native dependencies

Exempt-From-Owner-Approval: Android.mk uses per-file permission to let
the build team modify it without dependeing on us. However because this
rule overrides the directory default owners, Android core networking is
not owner anymore. This exemption is necessary to let Android core
networking team fix their build file.

Test: All tests in runtest frameworks-net pass.
Merged-In: Ie0b8baa38ca39e92fbd698ebcead86dac0a67708

(cherry picked from commit 99e8ab6e46eec5dbd1b059b3732672d537b3cf34)

Change-Id: I4471a5cd7f20852645f3d94684cc5aeef3324162

6 years agoDO NOT MERGE: Fix ApfTest
Hugo Benichi [Thu, 1 Jun 2017 06:54:59 +0000 (15:54 +0900)]
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

6 years agoRecord even more stats even more often
Erik Kline [Thu, 31 Aug 2017 12:09:45 +0000 (21:09 +0900)]
Record even more stats even more often

Like kale, one can never have enough stats.  =)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131
Merged-In: I5d40eae488cab685be6a44849181c0286fe28fdb
Merged-In: I759e97f9a72d15a84036c3a56451b872143539c6
Change-Id: Ieb47c3beed50f21c2c858fe57438afd48cfdc662
(cherry picked from commit 1199a352fcb938a8dc7a34a2853c4fde7f5656f1)

6 years agoRefactor interface IP code into InterfaceController
Erik Kline [Sun, 3 Sep 2017 11:38:29 +0000 (20:38 +0900)]
Refactor interface IP code into InterfaceController

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
      (except for UidRange and APF tests that are missing libvndk)
    - regular WiFi STA mode attach works for IPv4-only, dualstack,
      and IPv6-only networks
    - tethering works with dualstack upstream and downstream
Bug: 62476366

Change-Id: Id807b3091b0b2935b01aeb3644245034312b4183

6 years agoNetwork Service Discovery test: properly release resources
Hugo Benichi [Mon, 31 Jul 2017 11:35:58 +0000 (20:35 +0900)]
Network Service Discovery test: properly release resources

Bug: 32561414
Bug: 62918393
Bug: 62044295
Test: runtest frameworks-net
Change-Id: If23993b5e391947ecbdc01677f0a643144794b2b

6 years agoMerge "Adds ERROR state to ImsConfig"
Brad Ebinger [Fri, 1 Sep 2017 21:37:49 +0000 (21:37 +0000)]
Merge "Adds ERROR state to ImsConfig"
am: 6391598412

Change-Id: I612aae570b12b1106f515d32bd8caa3843a3953e

6 years agoMerge "Remove PIN/PUK keyguard when SIM is removed/ready"
Brad Ebinger [Fri, 1 Sep 2017 21:31:19 +0000 (21:31 +0000)]
Merge "Remove PIN/PUK keyguard when SIM is removed/ready"
am: 43f9f0290c

Change-Id: I9e28e3975331a7af11747065761632a0566deb56

6 years agoMerge "Fixed default values for Bluetooth energy calculations"
Hansong Zhang [Fri, 1 Sep 2017 21:15:27 +0000 (21:15 +0000)]
Merge "Fixed default values for Bluetooth energy calculations"
am: 7c45962abd

Change-Id: I44390a58e2328a4bee47d6454492c76184f7098d

6 years agoMerge "Adds ERROR state to ImsConfig"
Brad Ebinger [Fri, 1 Sep 2017 21:06:55 +0000 (21:06 +0000)]
Merge "Adds ERROR state to ImsConfig"

6 years agoMerge "Remove PIN/PUK keyguard when SIM is removed/ready"
Brad Ebinger [Fri, 1 Sep 2017 21:06:27 +0000 (21:06 +0000)]
Merge "Remove PIN/PUK keyguard when SIM is removed/ready"

6 years agoMerge "Fixed default values for Bluetooth energy calculations"
Treehugger Robot [Fri, 1 Sep 2017 20:58:49 +0000 (20:58 +0000)]
Merge "Fixed default values for Bluetooth energy calculations"

6 years agoFixed default values for Bluetooth energy calculations
Hansong Zhang [Fri, 18 Aug 2017 22:03:56 +0000 (15:03 -0700)]
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)

6 years agoMerge "Fix typo in CarrierConfigManager javadoc."
Bin Chen [Fri, 1 Sep 2017 17:25:07 +0000 (17:25 +0000)]
Merge "Fix typo in CarrierConfigManager javadoc."
am: ea598a4f14

Change-Id: I663aab8773193681760b6ac0a241fde913e5d585

6 years agoAdds ERROR state to ImsConfig
Brad Ebinger [Fri, 25 Aug 2017 21:53:30 +0000 (14:53 -0700)]
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

6 years agoMerge "Fix typo in CarrierConfigManager javadoc."
Treehugger Robot [Fri, 1 Sep 2017 17:11:26 +0000 (17:11 +0000)]
Merge "Fix typo in CarrierConfigManager javadoc."

6 years agoRemove PIN/PUK keyguard when SIM is removed/ready
Brad Ebinger [Mon, 21 Aug 2017 21:58:52 +0000 (14:58 -0700)]
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

6 years agoMerge "Fix animation of settings button in RTL layout case"
Jason Monk [Fri, 1 Sep 2017 13:10:36 +0000 (13:10 +0000)]
Merge "Fix animation of settings button in RTL layout case"
am: cc3525748e

Change-Id: I112d770b8cf520755128d4fabd973762b2c5c4b1

6 years agoMerge "Fix animation of settings button in RTL layout case"
Jason Monk [Fri, 1 Sep 2017 12:56:56 +0000 (12:56 +0000)]
Merge "Fix animation of settings button in RTL layout case"

6 years agoFix typo in CarrierConfigManager javadoc.
Bin Chen [Fri, 1 Sep 2017 10:12:53 +0000 (18:12 +0800)]
Fix typo in CarrierConfigManager javadoc.

Change-Id: Ie9d2f7aa705b7895777dcfa27e6826babff64e29

6 years agoMerge "Add APF black list for ether-type"
Ahmed ElArabawy [Fri, 1 Sep 2017 06:28:51 +0000 (06:28 +0000)]
Merge "Add APF black list for ether-type"
am: c6b2e356b6

Change-Id: I2aca562191119dc26eb7bc5293956061e5f44827

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 agoFix animation of settings button in RTL layout case
Akira Oshimi [Thu, 3 Aug 2017 02:02:34 +0000 (11:02 +0900)]
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

6 years agoMerge "Remove unused methods from OMS"
Mårten Kongstad [Thu, 31 Aug 2017 21:51:02 +0000 (21:51 +0000)]
Merge "Remove unused methods from OMS"
am: fd5cdfc924

Change-Id: I97fc7e6400a8221c78cf4f94be0089037bcae929

6 years agoMerge changes I7218f17a,I96b7340a
Mårten Kongstad [Thu, 31 Aug 2017 21:44:25 +0000 (21:44 +0000)]
Merge changes I7218f17a,I96b7340a
am: 111c955d1d

Change-Id: I64cb964b751561e87115976866646b1db3858e14

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"
Mårten Kongstad [Thu, 31 Aug 2017 21:03:40 +0000 (21:03 +0000)]
Merge "OMS: fix listener callbacks triggered by changes to target package"
am: 637dbcbb6c

Change-Id: I14d16f460146ac49d89334e41409a90908f04671

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:57:19 +0000 (19:57 +0000)]
Merge "Whitelist free sms shortcode 76551 in Mexico for constlletion."
am: 4bddd5c44b

Change-Id: Ic2a1ae0ee1560870f01289925a978b9b11b860cc

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."
wuliang [Thu, 31 Aug 2017 16:54:54 +0000 (16:54 +0000)]
Merge "Test: Drag on the divider line."
am: 1fa3a60f05

Change-Id: I8c33a5bddf76f70eec8c21fe850887b51fdfaa74

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
Andreas Gampe [Thu, 31 Aug 2017 15:15:31 +0000 (15:15 +0000)]
Merge changes I49057737,I68e3096d
am: 50cf621704

Change-Id: Id66d91bc326461dc3cae4cbae03f3d060761ea7f

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:39:18 +0000 (14:39 +0000)]
Merge "Revert "Nat464Xlat: interface notification handler on ConnectivityService""
am: 1d66352b40

Change-Id: I691095ce56e30e2fada93bc5500453f13ac51403

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"
Erik Kline [Thu, 31 Aug 2017 03:30:55 +0000 (03:30 +0000)]
Merge "Shutdown more reliably"
am: 549c3d2e4f

Change-Id: I9ff7e6ee49bb88f9a63b269d57d5e91ed6ddec31

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 agoFix ownership of objects returned by VintfObject::Get*
Yifan Hong [Wed, 30 Aug 2017 17:20:02 +0000 (10:20 -0700)]
Fix ownership of objects returned by VintfObject::Get*

VintfObject::Get* returns a pointer that clients
can own.

Test: builds
Bug: 65166415
Change-Id: Ia3d3f5c00172dec462eb5e8ceeb7b0ba98bc6cfb

6 years agoMerge "IllegalArgumentException in MagnificationGestureHandler"
Edward Savage-Jones [Wed, 30 Aug 2017 20:57:27 +0000 (20:57 +0000)]
Merge "IllegalArgumentException in MagnificationGestureHandler"
am: 7aff46195e

Change-Id: I3822533c2d7d01c7d804cfd6ad914d36f5ef482f

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:36:36 +0000 (00:36 +0000)]
Merge "Fix errorprone build"
am: 3abddeca75  -s ours

Change-Id: I9eb51d858194869763c94260beeec05aac6578ee

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:40:47 +0000 (14:40 +0000)]
Merge "Fix QS user icon in guest mode"
am: 7d4e9b81b4

Change-Id: I144ab6fea2e9ece6f01004c03c85da72a8c069f2

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:54:14 +0000 (13:54 +0000)]
Merge "Adapt ICU 59 API update to Doclava changes."
am: e048261656

Change-Id: Iea671a7029e083bffee2bcaacfaa0df41f45c1cc

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:09:15 +0000 (08:09 +0000)]
Merge "Fix GATT client leakage when scan is throttled (1/2)"
am: 3cc1ad87f0

Change-Id: Ieda555f6f8bda35201327c6c6e0c97621b88671e

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:20:32 +0000 (05:20 +0000)]
Merge "Nat464Xlat: interface notification handler on ConnectivityService"
am: 91817b3129

Change-Id: I2f002cd197e2eeaaadadd747a6b33d264cd34433

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 agoMerge "Use guava 21.0"
Colin Cross [Tue, 29 Aug 2017 00:03:24 +0000 (00:03 +0000)]
Merge "Use guava 21.0"
am: edb2e0c722

Change-Id: Icf8873b268677a631659a7ee0f7816495f6acd38

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:49:50 +0000 (22:49 +0000)]
Merge "Nat464Xlat: internal state guards cleanup + state enum"
am: aee703e7e4

Change-Id: I188ac4c367db11cb33b67fe92df3a120e3c6fbce

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"
bokyung.kim [Mon, 28 Aug 2017 22:27:38 +0000 (22:27 +0000)]
Merge "Fixed mimetype error of PPT file"
am: 3c28e2b280

Change-Id: I24b9dcf6506c53e26b901f74442f64bb28198611

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"
xulicheng [Mon, 28 Aug 2017 19:58:06 +0000 (19:58 +0000)]
Merge "Ensure the generation is not changed before put value to cache"
am: 11ae580f81

Change-Id: I5bf2c557f6f46f1455204761a9045b8b90d7ea32

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."
Lorenzo Colitti [Mon, 28 Aug 2017 12:49:29 +0000 (12:49 +0000)]
Merge "Trivial change to test expectations."
am: c0d8300b32

Change-Id: I58155e3edb424ea6918a3d2bb8e284e61346765f

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 12:01:25 +0000 (12:01 +0000)]
Merge "Nat464Xlat: clat management cleanup"
am: 81b179cfdd

Change-Id: Ic3808a1afe48efac745b1b378fb12cc5678918ec

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"