DO NOT MERGE: Cherry-pick a bunch fixes to AOSP

Task affinity updates

- Remove task affinity for AppDrawOver Settings
- Remove task affinity for ConfigNotificationSettings

The task affinity is messing with the back stack for this activity when
launched externally

Fixes: 80281932
Fixes: 80290571
Test: manual

Disable uninstall update option for secondary users.

Fixes: 110249550
Test: manual

Suppress some gesture search when there is no hardware

Fixes: 110250839
Test: robotests

Check wifi password length by byte, not char.

Change-Id: Ic25ef766886507211c3de8764c1cffef2b27a025
Fixes: 79209073
Test: robotest
This commit is contained in:
Fan Zhang
2018-08-27 14:28:54 -07:00
parent fcaf926dc1
commit 07e55d97ca
7 changed files with 42 additions and 19 deletions

View File

@@ -27,6 +27,7 @@ import android.provider.Settings;
import android.text.TextUtils;
import com.android.settingslib.wrapper.PackageManagerWrapper;
import java.nio.charset.StandardCharsets;
public class WifiUtils {
@@ -40,7 +41,7 @@ public class WifiUtils {
if (TextUtils.isEmpty(ssid)) {
return false;
}
return ssid.length() > SSID_ASCII_MAX_LENGTH;
return ssid.getBytes(StandardCharsets.UTF_8).length > SSID_ASCII_MAX_LENGTH;
}
public static boolean isSSIDTooShort(String ssid) {
@@ -61,8 +62,9 @@ public class WifiUtils {
/**
* This method is a stripped and negated version of WifiConfigStore.canModifyNetwork.
*
* @param context Context of caller
* @param config The WiFi config.
* @param config The WiFi config.
* @return true if Settings cannot modify the config due to lockDown.
*/
public static boolean isNetworkLockedDown(Context context, WifiConfiguration config) {