diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4f3caed4285..bd04d89eeb2 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -103,7 +103,8 @@
-
+
+
diff --git a/src/com/android/settings/TetherSettings.java b/src/com/android/settings/TetherSettings.java
index ac758dccc35..0325842c26c 100644
--- a/src/com/android/settings/TetherSettings.java
+++ b/src/com/android/settings/TetherSettings.java
@@ -29,7 +29,6 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.pm.PackageManager;
import android.hardware.usb.UsbManager;
import android.net.ConnectivityManager;
import android.net.EthernetManager;
@@ -449,25 +448,6 @@ public class TetherSettings extends RestrictedSettingsFragment
}
}
- public static boolean isProvisioningNeededButUnavailable(Context context) {
- return (TetherUtil.isProvisioningNeeded(context)
- && !isIntentAvailable(context));
- }
-
- private static boolean isIntentAvailable(Context context) {
- String[] provisionApp = context.getResources().getStringArray(
- com.android.internal.R.array.config_mobile_hotspot_provision_app);
- if (provisionApp.length < 2) {
- return false;
- }
- final PackageManager packageManager = context.getPackageManager();
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.setClassName(provisionApp[0], provisionApp[1]);
-
- return (packageManager.queryIntentActivities(intent,
- PackageManager.MATCH_DEFAULT_ONLY).size() > 0);
- }
-
private void startTethering(int choice) {
if (choice == TETHERING_BLUETOOTH) {
// Turn on Bluetooth first.
diff --git a/src/com/android/settings/gestures/BackGestureIndicatorView.java b/src/com/android/settings/gestures/BackGestureIndicatorView.java
index 9d0e74387d4..c60afd003d3 100644
--- a/src/com/android/settings/gestures/BackGestureIndicatorView.java
+++ b/src/com/android/settings/gestures/BackGestureIndicatorView.java
@@ -92,9 +92,7 @@ public class BackGestureIndicatorView extends LinearLayout {
int copiedFlags = (parentWindowAttributes.flags
& WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT,
- WindowManager.LayoutParams.TYPE_APPLICATION,
+ WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
| WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
diff --git a/src/com/android/settings/network/AllInOneTetherPreferenceController.java b/src/com/android/settings/network/AllInOneTetherPreferenceController.java
index 595e31bab09..8180d5a6ef7 100644
--- a/src/com/android/settings/network/AllInOneTetherPreferenceController.java
+++ b/src/com/android/settings/network/AllInOneTetherPreferenceController.java
@@ -37,10 +37,8 @@ import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.Lifecycle.Event;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;
-import androidx.preference.PreferenceScreen;
import com.android.settings.R;
-import com.android.settings.TetherSettings;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.core.FeatureFlags;
import com.android.settings.widget.MasterSwitchController;
@@ -95,16 +93,6 @@ public class AllInOneTetherPreferenceController extends BasePreferenceController
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
}
- @Override
- public void displayPreference(PreferenceScreen screen) {
- super.displayPreference(screen);
- mPreference = screen.findPreference(mPreferenceKey);
- if (mPreference != null && !mAdminDisallowedTetherConfig) {
- // Grey out if provisioning is not available.
- mPreference.setEnabled(!TetherSettings.isProvisioningNeededButUnavailable(mContext));
- }
- }
-
@Override
public int getAvailabilityStatus() {
if (!TetherUtil.isTetherAvailable(mContext)
diff --git a/src/com/android/settings/network/TetherPreferenceController.java b/src/com/android/settings/network/TetherPreferenceController.java
index d18d897393e..24095442161 100644
--- a/src/com/android/settings/network/TetherPreferenceController.java
+++ b/src/com/android/settings/network/TetherPreferenceController.java
@@ -40,7 +40,6 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
-import com.android.settings.TetherSettings;
import com.android.settings.core.FeatureFlags;
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.TetherUtil;
@@ -108,9 +107,6 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
if (mPreference != null && !mAdminDisallowedTetherConfig) {
mPreference.setTitle(
com.android.settingslib.Utils.getTetheringLabel(mConnectivityManager));
-
- // Grey out if provisioning is not available.
- mPreference.setEnabled(!TetherSettings.isProvisioningNeededButUnavailable(mContext));
}
}
diff --git a/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java b/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java
index 1a8ac1df8f5..76a8c5f9749 100644
--- a/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java
+++ b/src/com/android/settings/wifi/details2/WifiNetworkDetailsFragment2.java
@@ -142,8 +142,10 @@ public class WifiNetworkDetailsFragment2 extends DashboardFragment implements
getContext().getSystemService(Context.USER_SERVICE);
final int profileOwnerUserId = Utils.getManagedProfileId(
um, UserHandle.myUserId());
- admin = new EnforcedAdmin(dpm.getProfileOwnerAsUser(profileOwnerUserId),
- null, UserHandle.of(profileOwnerUserId));
+ if (profileOwnerUserId != UserHandle.USER_NULL) {
+ admin = new EnforcedAdmin(dpm.getProfileOwnerAsUser(profileOwnerUserId),
+ null, UserHandle.of(profileOwnerUserId));
+ }
}
RestrictedLockUtils.sendShowAdminSupportDetailsIntent(getContext(), admin);
} else {