Merge changes from topic 'wifi-aosp-master' into stage-aosp-master
* changes:
NetworkSelectionStatus: Fix copy constructor
Deprecate QNS network disable reason BAD_LINK
[NAN] API changes/fixes addressing apilint issues
[NAN] Add method to ConfigRequest to determine if non-default
[NAN] Simplify publish/subscribe configuration - merge match filters
[NAN] Udpate NAN API documentation, clean-up visibility
[NAN] Do not expose WifiManager.isNanSupported as new API
[NAN] Update finalize to check and warn user if resources not freed
[NAN] Fix bad merge use rethrowFromSystemServer
Add Log.wtf when transitionTo is used improperly
Ensure BSSIDs are correctly aged out in settings view
[NAN] Provide calling package name to service
Add WiFi toggle prompts - framework
Reenable the unit tests for StateMachine
Remove WiFi related methods from NetworkManagementService
Don't pull in external/junit through mockito
WifiConfiguration: Expose NetworkSelectionStatus strings
Add Bluetooth toggle prompts - framework
[NAN] Add LV utilities (TLV with T size of 0).
[NAN] Fix TlvElement member names - reflect public access.
TetherUtil: Use ConnectivityManager for tethering
[NAN] TLV utilities iterator - throw correct exception
[NAN] Modify arguments from "array, length" to "array"
[NAN] NAN System Api: RTT
Properly disable WiFi tethering
[NAN] Provide inteface MAC address to app.
[NAN] Add (T)LV validation testing
Add IPv6 tethering coordinator
Stop listening for WiFi interface status changes
[NAN] Add validity checks for service name
[NAN] Fix assumption about Strings containing single-byte characters.
[NAN] NAN data-path API: network specifier
DO NOT MERGE StateMachine: remove final from SendMessage
wifi: allow config of default+verbose ring buffers
Don't save the anonymous identity for EAP-SIM/AKA/AKA-Prime
Add a WifiScanner API to listener for ongoing scans
Fix invitation request from persistent GC
SettingsBackupAgent: Remove redundant size parameter
WifiConfiguration: Make NetworkSelectionStatus public
Use WifiManager for wifi backup/restore
Fix race conditions between Tethering and TetherInterfaceStateMachine
WifiManager: Add new API to restore old backup data
Tethering: Own WiFi tethering state and lifetime
IpConfigStore: Changes for parsing old wifi backup
WifiManager: Add new API's for backup/restore
XmlUtils: Add missing readThisByteArrayXml method
Use an ArrayMap instead of HashMap to track tether interfaces
Consolidate cleanup logic in TetherInterfaceSM.TetheredState
Annotate TetherInterfaceStateMachineTest for APCT
Rely on Tethering mutex for TetherInterfaceSM
Rename TetherInterfaceSM to TetherInterfaceStateMachine
[NAN] Add retry count for transmitting L2 NAN messages
Remove dead code from TetherInterfaceSM
Remove transient StartingState from TetherInterfaceSM
Expand test coverage of TetherInterfaceSM
Add demonstration unittest for TetherInterfaceSM
Extract TetherInterfaceSM to its own class.
Make Tethering.TetherInterfaceSM more self contained
WifiManager: add WIFI_MODE_NO_LOCKS_HELD
Create frameworks-base-testutils lib
Clean up class members in Tethering.TetherInterfaceSM
Move android.net.util.IpUtilsTest into a util/ directory
Fix trivial warnings in Tethering.java
Fix some trivial warnings in WifiP2pDevice.java
[NAN] Add support for NAN RTT.
[NAN] Remove OnNanDown notification from API
Remove unused method from NetworkManagementService
WifiConfiguration: Add new selection disable reasons
[NAN] Add type and nullability annotations. Update hide annotation.
[NAN] Add master switch to enable/disable usage of NAN APIs.
[NAN] Re-factor connect/config flow
[NAN] Refactor session lifecycle to clarify API & eliminate race conditions
[NAN] Removed NAN event registration - dispatch all callbacks.
[NAN] Consolidate publish/subscribe callback sets into single set
[NAN] Replace session callback configuration control
[NAN] Expose match style configuration as public API.
[NAN] API cleanup - rename FLAGS.
[NAN] Renamed listeners to callback per API guidelines
[NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config
NAN: Support multiple instantiation per UID - introduce a client ID.
diff --git a/core/java/android/net/network-policy-restrictions.md b/core/java/android/net/network-policy-restrictions.md
index fe13f7a..63ce1a2 100644
--- a/core/java/android/net/network-policy-restrictions.md
+++ b/core/java/android/net/network-policy-restrictions.md
@@ -29,8 +29,8 @@
| **DS** | *WL* | ok | blk | ok | ok |
| **ON** | *!WL* | blk | blk | blk | blk |
| | *BL* | blk | blk | blk | blk |
-| **DS** | *WL* | blk | ok | ok | ok |
-| **OFF** | *!WL* | blk | ok | ok | ok |
+| **DS** | *WL* | blk | blk | ok | ok |
+| **OFF** | *!WL* | blk | blk | ok | ok |
| | *BL* | blk | blk | blk | blk |
diff --git a/libs/hwui/tests/common/TestUtils.h b/libs/hwui/tests/common/TestUtils.h
index 4536bef..a48469c 100644
--- a/libs/hwui/tests/common/TestUtils.h
+++ b/libs/hwui/tests/common/TestUtils.h
@@ -48,10 +48,10 @@
EXPECT_TRUE(TestUtils::matricesAreApproxEqual(a, b))
#define EXPECT_RECT_APPROX_EQ(a, b) \
- EXPECT_TRUE(MathUtils::areEqual(a.left, b.left) \
- && MathUtils::areEqual(a.top, b.top) \
- && MathUtils::areEqual(a.right, b.right) \
- && MathUtils::areEqual(a.bottom, b.bottom));
+ EXPECT_TRUE(MathUtils::areEqual((a).left, (b).left) \
+ && MathUtils::areEqual((a).top, (b).top) \
+ && MathUtils::areEqual((a).right, (b).right) \
+ && MathUtils::areEqual((a).bottom, (b).bottom));
#define EXPECT_CLIP_RECT(expRect, clipStatePtr) \
EXPECT_NE(nullptr, (clipStatePtr)) << "Op is unclipped"; \
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java
index a6350fe..5c46ca0 100644
--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java
+++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java
@@ -323,9 +323,8 @@
*/
public static boolean isRestoreconNeeded(File file) {
try {
- final byte[] buf = new byte[20];
- final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH, buf);
- if ((len == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) {
+ final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SEAPP_HASH);
+ if ((buf.length == 20) && Arrays.equals(SEAPP_CONTEXTS_HASH, buf)) {
return false;
}
} catch (ErrnoException e) {
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index d8a1c77..4faa506 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -2958,9 +2958,8 @@
*/
private static int getSerialNumber(File file) throws IOException {
try {
- final byte[] buf = new byte[256];
- final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf);
- final String serial = new String(buf, 0, len);
+ final byte[] buf = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL);
+ final String serial = new String(buf);
try {
return Integer.parseInt(serial);
} catch (NumberFormatException e) {
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk
index 2a490d1..04f46d9 100644
--- a/tools/aapt/Android.mk
+++ b/tools/aapt/Android.mk
@@ -61,7 +61,7 @@
liblog \
libcutils \
libexpat \
- libziparchive-host \
+ libziparchive \
libbase
aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\"
diff --git a/tools/aapt2/Android.mk b/tools/aapt2/Android.mk
index be2f88d..2e5fbdc 100644
--- a/tools/aapt2/Android.mk
+++ b/tools/aapt2/Android.mk
@@ -126,7 +126,7 @@
liblog \
libcutils \
libexpat \
- libziparchive-host \
+ libziparchive \
libpng \
libbase \
libprotobuf-cpp-lite
diff --git a/tools/split-select/Android.mk b/tools/split-select/Android.mk
index 863abae..199fafa 100644
--- a/tools/split-select/Android.mk
+++ b/tools/split-select/Android.mk
@@ -51,7 +51,7 @@
liblog \
libcutils \
libexpat \
- libziparchive-host \
+ libziparchive \
libbase
cFlags := -Wall -Werror