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:
@@ -67,6 +67,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Dashboard fragment to display application information from Settings. This activity presents
|
||||
* extended information associated with a package like code, data, total size, permissions
|
||||
@@ -350,8 +351,10 @@ public class AppInfoDashboardFragment extends DashboardFragment
|
||||
final MenuItem uninstallUpdatesItem = menu.findItem(UNINSTALL_UPDATES);
|
||||
final boolean uninstallUpdateDisabled = getContext().getResources().getBoolean(
|
||||
R.bool.config_disable_uninstall_update);
|
||||
uninstallUpdatesItem.setVisible(
|
||||
mUpdatedSysApp && !mAppsControlDisallowedBySystem && !uninstallUpdateDisabled);
|
||||
uninstallUpdatesItem.setVisible(mUserManager.isAdminUser()
|
||||
&& mUpdatedSysApp
|
||||
&& !mAppsControlDisallowedBySystem
|
||||
&& !uninstallUpdateDisabled);
|
||||
if (uninstallUpdatesItem.isVisible()) {
|
||||
RestrictedLockUtils.setMenuItemAsDisabledByAdmin(getActivity(),
|
||||
uninstallUpdatesItem, mAppsControlDisallowedAdmin);
|
||||
|
@@ -70,5 +70,10 @@ public class SwipeToNotificationSettings extends DashboardFragment {
|
||||
sir.xmlResId = R.xml.swipe_to_notification_settings;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return SwipeToNotificationPreferenceController.isAvailable(context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user