diff options
Diffstat (limited to 'packages/SystemUI/src')
7 files changed, 137 insertions, 35 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AnnotationLinkSpan.java b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AnnotationLinkSpan.java index d8e80fe99331..0d7551ff66e9 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AnnotationLinkSpan.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/AnnotationLinkSpan.java @@ -30,7 +30,7 @@ import java.util.Optional; /** * A span that turns the text wrapped by annotation tag into the clickable link text. */ -class AnnotationLinkSpan extends ClickableSpan { +public class AnnotationLinkSpan extends ClickableSpan { private final Optional<View.OnClickListener> mClickListener; private AnnotationLinkSpan(View.OnClickListener listener) { @@ -50,7 +50,7 @@ class AnnotationLinkSpan extends ClickableSpan { * @param linkInfos used to attach the click action into the corresponding span * @return the text attached with the span */ - static CharSequence linkify(CharSequence text, LinkInfo... linkInfos) { + public static CharSequence linkify(CharSequence text, LinkInfo... linkInfos) { final SpannableString msg = new SpannableString(text); final Annotation[] spans = msg.getSpans(/* queryStart= */ 0, msg.length(), Annotation.class); @@ -78,12 +78,12 @@ class AnnotationLinkSpan extends ClickableSpan { /** * Data class to store the annotation and the click action. */ - static class LinkInfo { - static final String DEFAULT_ANNOTATION = "link"; + public static class LinkInfo { + public static final String DEFAULT_ANNOTATION = "link"; private final Optional<String> mAnnotation; private final Optional<View.OnClickListener> mListener; - LinkInfo(@NonNull String annotation, View.OnClickListener listener) { + public LinkInfo(@NonNull String annotation, View.OnClickListener listener) { mAnnotation = Optional.of(annotation); mListener = Optional.ofNullable(listener); } diff --git a/packages/SystemUI/src/com/android/systemui/classifier/BrightLineFalsingManager.java b/packages/SystemUI/src/com/android/systemui/classifier/BrightLineFalsingManager.java index 37a6cfaabb5e..0a9329845b23 100644 --- a/packages/SystemUI/src/com/android/systemui/classifier/BrightLineFalsingManager.java +++ b/packages/SystemUI/src/com/android/systemui/classifier/BrightLineFalsingManager.java @@ -330,7 +330,7 @@ public class BrightLineFalsingManager implements FalsingManager { || mTestHarness || mDataProvider.isJustUnlockedWithFace() || mDataProvider.isDocked() - || mAccessibilityManager.isEnabled(); + || mAccessibilityManager.isTouchExplorationEnabled(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java index da7b389fbd36..058f37a2ef38 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java @@ -36,6 +36,7 @@ import com.android.systemui.doze.dagger.DozeScope; import com.android.systemui.doze.dagger.WrappedService; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.statusbar.phone.DozeParameters; +import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController; import com.android.systemui.util.sensors.AsyncSensorManager; import java.io.PrintWriter; @@ -55,6 +56,16 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi "com.android.systemui.doze.AOD_BRIGHTNESS"; protected static final String BRIGHTNESS_BUCKET = "brightness_bucket"; + /** + * Just before the screen times out from user inactivity, DisplayPowerController dims the screen + * brightness to the lower of {@link #mScreenBrightnessDim}, or the current brightness minus + * DisplayPowerController#SCREEN_DIM_MINIMUM_REDUCTION_FLOAT. + * + * This value is 0.04f * 255, which converts SCREEN_DIM_MINIMUM_REDUCTION_FLOAT to the integer + * brightness values used by doze. + */ + private static final int SCREEN_DIM_MINIMUM_REDUCTION_INT = 10; + private final Context mContext; private final DozeMachine.Service mDozeService; private final DozeHost mDozeHost; @@ -82,6 +93,8 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi */ private int mDebugBrightnessBucket = -1; + private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; + @Inject public DozeScreenBrightness(Context context, @WrappedService DozeMachine.Service service, AsyncSensorManager sensorManager, @@ -89,7 +102,8 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi AlwaysOnDisplayPolicy alwaysOnDisplayPolicy, WakefulnessLifecycle wakefulnessLifecycle, DozeParameters dozeParameters, - DockManager dockManager) { + DockManager dockManager, + UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) { mContext = context; mDozeService = service; mSensorManager = sensorManager; @@ -99,6 +113,7 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi mDozeHost = host; mHandler = handler; mDockManager = dockManager; + mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; mDefaultDozeBrightness = alwaysOnDisplayPolicy.defaultDozeBrightness; mScreenBrightnessDim = alwaysOnDisplayPolicy.dimBrightness; @@ -148,14 +163,15 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi } } - private void updateBrightnessAndReady(boolean force) { + public void updateBrightnessAndReady(boolean force) { if (force || mRegistered || mDebugBrightnessBucket != -1) { int sensorValue = mDebugBrightnessBucket == -1 ? mLastSensorValue : mDebugBrightnessBucket; int brightness = computeBrightness(sensorValue); boolean brightnessReady = brightness > 0; if (brightnessReady) { - mDozeService.setDozeScreenBrightness(clampToUserSetting(brightness)); + mDozeService.setDozeScreenBrightness( + clampToDimBrightnessForScreenOff(clampToUserSetting(brightness))); } int scrimOpacity = -1; @@ -207,13 +223,21 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi /** * Clamp the brightness to the dim brightness value used by PowerManagerService just before the * device times out and goes to sleep, if we are sleeping from a timeout. This ensures that we - * don't raise the brightness back to the user setting before playing the screen off animation. + * don't raise the brightness back to the user setting before or during the screen off + * animation. */ private int clampToDimBrightnessForScreenOff(int brightness) { - if (mDozeParameters.shouldControlUnlockedScreenOff() + if (mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying() && mWakefulnessLifecycle.getLastSleepReason() == PowerManager.GO_TO_SLEEP_REASON_TIMEOUT) { - return Math.min(mScreenBrightnessDim, brightness); + return Math.max( + PowerManager.BRIGHTNESS_OFF, + // Use the lower of either the dim brightness, or the current brightness reduced + // by the minimum dim amount. This is the same logic used in + // DisplayPowerController#updatePowerState to apply a minimum dim amount. + Math.min( + brightness - SCREEN_DIM_MINIMUM_REDUCTION_INT, + mScreenBrightnessDim)); } else { return brightness; } diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenState.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenState.java index 8f1486b0c7cb..038be48b53ee 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenState.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenState.java @@ -77,6 +77,7 @@ public class DozeScreenState implements DozeMachine.Part { private final Provider<UdfpsController> mUdfpsControllerProvider; @Nullable private UdfpsController mUdfpsController; private final DozeLog mDozeLog; + private final DozeScreenBrightness mDozeScreenBrightness; private int mPendingScreenState = Display.STATE_UNKNOWN; private SettableWakeLock mWakeLock; @@ -90,7 +91,8 @@ public class DozeScreenState implements DozeMachine.Part { WakeLock wakeLock, AuthController authController, Provider<UdfpsController> udfpsControllerProvider, - DozeLog dozeLog) { + DozeLog dozeLog, + DozeScreenBrightness dozeScreenBrightness) { mDozeService = service; mHandler = handler; mParameters = parameters; @@ -99,6 +101,7 @@ public class DozeScreenState implements DozeMachine.Part { mAuthController = authController; mUdfpsControllerProvider = udfpsControllerProvider; mDozeLog = dozeLog; + mDozeScreenBrightness = dozeScreenBrightness; updateUdfpsController(); if (mUdfpsController == null) { @@ -204,6 +207,12 @@ public class DozeScreenState implements DozeMachine.Part { if (screenState != Display.STATE_UNKNOWN) { if (DEBUG) Log.d(TAG, "setDozeScreenState(" + screenState + ")"); mDozeService.setDozeScreenState(screenState); + if (screenState == Display.STATE_DOZE) { + // If we're entering doze, update the doze screen brightness. We might have been + // clamping it to the dim brightness during the screen off animation, and we should + // now change it to the brightness we actually want according to the sensor. + mDozeScreenBrightness.updateBrightnessAndReady(false /* force */); + } mPendingScreenState = Display.STATE_UNKNOWN; mWakeLock.setAcquired(false); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java index dc54e1b52f2e..583626273c29 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java @@ -36,6 +36,7 @@ import android.telephony.TelephonyDisplayInfo; import android.telephony.TelephonyManager; import android.text.Html; import android.text.TextUtils; +import android.text.method.LinkMovementMethod; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; @@ -63,12 +64,15 @@ import com.android.internal.logging.UiEvent; import com.android.internal.logging.UiEventLogger; import com.android.systemui.Prefs; import com.android.systemui.R; +import com.android.systemui.accessibility.floatingmenu.AnnotationLinkSpan; import com.android.systemui.dagger.SysUISingleton; +import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.wifitrackerlib.WifiEntry; import java.util.List; +import java.util.concurrent.Executor; /** * Dialog for showing mobile network, connected Wi-Fi network and Wi-Fi networks. @@ -82,6 +86,7 @@ public class InternetDialog extends SystemUIDialog implements static final long PROGRESS_DELAY_MS = 2000L; private final Handler mHandler; + private final Executor mBackgroundExecutor; private final LinearLayoutManager mLayoutManager; @VisibleForTesting @@ -110,6 +115,8 @@ public class InternetDialog extends SystemUIDialog implements private LinearLayout mTurnWifiOnLayout; private LinearLayout mEthernetLayout; private TextView mWifiToggleTitleText; + private LinearLayout mWifiScanNotifyLayout; + private TextView mWifiScanNotifyText; private LinearLayout mSeeAllLayout; private RecyclerView mWifiRecyclerView; private ImageView mConnectedWifiIcon; @@ -154,13 +161,14 @@ public class InternetDialog extends SystemUIDialog implements public InternetDialog(Context context, InternetDialogFactory internetDialogFactory, InternetDialogController internetDialogController, boolean canConfigMobileData, boolean canConfigWifi, boolean aboveStatusBar, UiEventLogger uiEventLogger, - @Main Handler handler) { + @Main Handler handler, @Background Executor executor) { super(context, R.style.Theme_SystemUI_Dialog_Internet); if (DEBUG) { Log.d(TAG, "Init InternetDialog"); } mContext = context; mHandler = handler; + mBackgroundExecutor = executor; mInternetDialogFactory = internetDialogFactory; mInternetDialogController = internetDialogController; mSubscriptionManager = mInternetDialogController.getSubscriptionManager(); @@ -220,6 +228,8 @@ public class InternetDialog extends SystemUIDialog implements mMobileNetworkLayout = mDialogView.requireViewById(R.id.mobile_network_layout); mTurnWifiOnLayout = mDialogView.requireViewById(R.id.turn_on_wifi_layout); mWifiToggleTitleText = mDialogView.requireViewById(R.id.wifi_toggle_title); + mWifiScanNotifyLayout = mDialogView.requireViewById(R.id.wifi_scan_notify_layout); + mWifiScanNotifyText = mDialogView.requireViewById(R.id.wifi_scan_notify_text); mConnectedWifListLayout = mDialogView.requireViewById(R.id.wifi_connected_layout); mConnectedWifiIcon = mDialogView.requireViewById(R.id.wifi_connected_icon); mConnectedWifiTitleText = mDialogView.requireViewById(R.id.wifi_connected_title); @@ -293,7 +303,13 @@ public class InternetDialog extends SystemUIDialog implements dismiss(); } - void updateDialog() { + /** + * Update the internet dialog when receiving the callback. + * + * @param shouldUpdateMobileNetwork {@code true} for update the mobile network layout, + * otherwise {@code false}. + */ + void updateDialog(boolean shouldUpdateMobileNetwork) { if (DEBUG) { Log.d(TAG, "updateDialog"); } @@ -303,8 +319,10 @@ public class InternetDialog extends SystemUIDialog implements mInternetDialogSubTitle.setText(getSubtitleText()); } updateEthernet(); - setMobileDataLayout(mInternetDialogController.activeNetworkIsCellular() - || mInternetDialogController.isCarrierNetworkActive()); + if (shouldUpdateMobileNetwork) { + setMobileDataLayout(mInternetDialogController.activeNetworkIsCellular() + || mInternetDialogController.isCarrierNetworkActive()); + } if (!mCanConfigWifi) { return; @@ -313,8 +331,10 @@ public class InternetDialog extends SystemUIDialog implements showProgressBar(); final boolean isDeviceLocked = mInternetDialogController.isDeviceLocked(); final boolean isWifiEnabled = mWifiManager.isWifiEnabled(); + final boolean isWifiScanEnabled = mWifiManager.isScanAlwaysAvailable(); updateWifiToggle(isWifiEnabled, isDeviceLocked); updateConnectedWifi(isWifiEnabled, isDeviceLocked); + updateWifiScanNotify(isWifiEnabled, isWifiScanEnabled, isDeviceLocked); final int visibility = (isDeviceLocked || !isWifiEnabled || mWifiEntriesCount <= 0) ? View.GONE : View.VISIBLE; @@ -371,7 +391,13 @@ public class InternetDialog extends SystemUIDialog implements } else { mMobileSummaryText.setVisibility(View.GONE); } - mSignalIcon.setImageDrawable(getSignalStrengthDrawable()); + + mBackgroundExecutor.execute(() -> { + Drawable drawable = getSignalStrengthDrawable(); + mHandler.post(() -> { + mSignalIcon.setImageDrawable(drawable); + }); + }); mMobileTitleText.setTextAppearance(isCarrierNetworkConnected ? R.style.TextAppearance_InternetDialog_Active : R.style.TextAppearance_InternetDialog); @@ -411,6 +437,24 @@ public class InternetDialog extends SystemUIDialog implements mContext.getColor(R.color.connected_network_primary_color)); } + @MainThread + private void updateWifiScanNotify(boolean isWifiEnabled, boolean isWifiScanEnabled, + boolean isDeviceLocked) { + if (isWifiEnabled || !isWifiScanEnabled || isDeviceLocked) { + mWifiScanNotifyLayout.setVisibility(View.GONE); + return; + } + if (TextUtils.isEmpty(mWifiScanNotifyText.getText())) { + final AnnotationLinkSpan.LinkInfo linkInfo = new AnnotationLinkSpan.LinkInfo( + AnnotationLinkSpan.LinkInfo.DEFAULT_ANNOTATION, + v -> mInternetDialogController.launchWifiScanningSetting()); + mWifiScanNotifyText.setText(AnnotationLinkSpan.linkify( + getContext().getText(R.string.wifi_scan_notify_message), linkInfo)); + mWifiScanNotifyText.setMovementMethod(LinkMovementMethod.getInstance()); + } + mWifiScanNotifyLayout.setVisibility(View.VISIBLE); + } + void onClickConnectedWifi() { if (mConnectedWifiEntry == null) { return; @@ -508,52 +552,57 @@ public class InternetDialog extends SystemUIDialog implements @Override public void onRefreshCarrierInfo() { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override public void onSimStateChanged() { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override @WorkerThread public void onCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities) { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override @WorkerThread public void onLost(Network network) { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override public void onSubscriptionsChanged(int defaultDataSubId) { mDefaultDataSubId = defaultDataSubId; mTelephonyManager = mTelephonyManager.createForSubscriptionId(mDefaultDataSubId); - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); + } + + @Override + public void onUserMobileDataStateChanged(boolean enabled) { + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override public void onServiceStateChanged(ServiceState serviceState) { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override @WorkerThread public void onDataConnectionStateChanged(int state, int networkType) { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override public void onSignalStrengthsChanged(SignalStrength signalStrength) { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override public void onDisplayInfoChanged(TelephonyDisplayInfo telephonyDisplayInfo) { - mHandler.post(() -> updateDialog()); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @Override @@ -565,7 +614,7 @@ public class InternetDialog extends SystemUIDialog implements mAdapter.setWifiEntries(wifiEntries, mWifiEntriesCount); mHandler.post(() -> { mAdapter.notifyDataSetChanged(); - updateDialog(); + updateDialog(false /* shouldUpdateMobileNetwork */); }); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java index aaba5efc92f6..90d83aeb0f94 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java @@ -103,6 +103,8 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, private static final String TAG = "InternetDialogController"; private static final String ACTION_NETWORK_PROVIDER_SETTINGS = "android.settings.NETWORK_PROVIDER_SETTINGS"; + private static final String ACTION_WIFI_SCANNING_SETTINGS = + "android.settings.WIFI_SCANNING_SETTINGS"; private static final String EXTRA_CHOSEN_WIFI_ENTRY_KEY = "key_chosen_wifientry_key"; public static final Drawable EMPTY_DRAWABLE = new ColorDrawable(Color.TRANSPARENT); public static final int NO_CELL_DATA_TYPE_ICON = 0; @@ -147,6 +149,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, private ConnectivityManager.NetworkCallback mConnectivityManagerNetworkCallback; private WindowManager mWindowManager; private ToastFactory mToastFactory; + private SignalDrawable mSignalDrawable; @VisibleForTesting static final float TOAST_PARAMS_HORIZONTAL_WEIGHT = 1.0f; @@ -223,6 +226,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, mConnectivityManagerNetworkCallback = new DataConnectivityListener(); mWindowManager = windowManager; mToastFactory = toastFactory; + mSignalDrawable = new SignalDrawable(mContext); } void onStart(@NonNull InternetDialogCallback callback, boolean canConfigWifi) { @@ -429,10 +433,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, Drawable getSignalStrengthIcon(Context context, int level, int numLevels, int iconType, boolean cutOut) { - Log.d(TAG, "getSignalStrengthIcon"); - final SignalDrawable signalDrawable = new SignalDrawable(context); - signalDrawable.setLevel( - SignalDrawable.getState(level, numLevels, cutOut)); + mSignalDrawable.setLevel(SignalDrawable.getState(level, numLevels, cutOut)); // Make the network type drawable final Drawable networkDrawable = @@ -441,7 +442,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, : context.getResources().getDrawable(iconType, context.getTheme()); // Overlay the two drawables - final Drawable[] layers = {networkDrawable, signalDrawable}; + final Drawable[] layers = {networkDrawable, mSignalDrawable}; final int iconSize = context.getResources().getDimensionPixelSize(R.dimen.signal_strength_icon_size); @@ -603,6 +604,13 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, } } + void launchWifiScanningSetting() { + mCallback.dismissDialog(); + final Intent intent = new Intent(ACTION_WIFI_SCANNING_SETTINGS); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + mActivityStarter.postStartActivityDismissingKeyguard(intent, 0); + } + void connectCarrierNetwork() { final MergedCarrierEntry mergedCarrierEntry = mAccessPointController.getMergedCarrierEntry(); @@ -883,7 +891,8 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, TelephonyCallback.DataConnectionStateListener, TelephonyCallback.DisplayInfoListener, TelephonyCallback.ServiceStateListener, - TelephonyCallback.SignalStrengthsListener { + TelephonyCallback.SignalStrengthsListener, + TelephonyCallback.UserMobileDataStateListener { @Override public void onServiceStateChanged(@NonNull ServiceState serviceState) { @@ -905,6 +914,11 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, mTelephonyDisplayInfo = telephonyDisplayInfo; mCallback.onDisplayInfoChanged(telephonyDisplayInfo); } + + @Override + public void onUserMobileDataStateChanged(boolean enabled) { + mCallback.onUserMobileDataStateChanged(enabled); + } } private class InternetOnSubscriptionChangedListener @@ -1009,6 +1023,8 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback, void onSignalStrengthsChanged(SignalStrength signalStrength); + void onUserMobileDataStateChanged(boolean enabled); + void onDisplayInfoChanged(TelephonyDisplayInfo telephonyDisplayInfo); void dismissDialog(); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogFactory.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogFactory.kt index 11c6980678b1..ea5df17bca58 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogFactory.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogFactory.kt @@ -20,7 +20,9 @@ import android.os.Handler import android.util.Log import com.android.internal.logging.UiEventLogger import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main +import java.util.concurrent.Executor import javax.inject.Inject private const val TAG = "InternetDialogFactory" @@ -32,6 +34,7 @@ private val DEBUG = Log.isLoggable(TAG, Log.DEBUG) @SysUISingleton class InternetDialogFactory @Inject constructor( @Main private val handler: Handler, + @Background private val executor: Executor, private val internetDialogController: InternetDialogController, private val context: Context, private val uiEventLogger: UiEventLogger @@ -49,7 +52,8 @@ class InternetDialogFactory @Inject constructor( return } else { internetDialog = InternetDialog(context, this, internetDialogController, - canConfigMobileData, canConfigWifi, aboveStatusBar, uiEventLogger, handler) + canConfigMobileData, canConfigWifi, aboveStatusBar, uiEventLogger, handler, + executor) internetDialog?.show() } } |