Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48e7c054 authored by Adnan Begovic's avatar Adnan Begovic Committed by Android (Google) Code Review
Browse files

Merge "fwb: Remove dead code for show weather toggle." into main

parents 82bb17c5 de5e57bb
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -6953,9 +6953,6 @@
        an app is not changed during subsequent reboots.  -->
    <bool name="config_stopSystemPackagesByDefault">true</bool>

    <!-- Whether to show weather on the lock screen by default. -->
    <bool name="config_lockscreenWeatherEnabledByDefault">false</bool>

    <!-- Whether we should persist the brightness value in nits for the default display even if
         the underlying display device changes. -->
    <bool name="config_persistBrightnessNitsForDefaultDisplay">false</bool>
+0 −3
Original line number Diff line number Diff line
@@ -5225,9 +5225,6 @@
  <java-symbol type="bool" name="config_hotspotNetworksEnabledForService"/>
  <java-symbol type="bool" name="config_knownNetworksEnabledForService"/>

  <!-- Whether to show weather on the lockscreen by default. -->
  <java-symbol type="bool" name="config_lockscreenWeatherEnabledByDefault" />

  <!-- For keyboard notification -->
  <java-symbol type="string" name="keyboard_layout_notification_selected_title"/>
  <java-symbol type="string" name="keyboard_layout_notification_one_selected_message"/>
+1 −5
Original line number Diff line number Diff line
@@ -51,10 +51,6 @@ constructor(
) : KeyguardSmartspaceRepository {
    private val _bcSmartspaceVisibility: MutableStateFlow<Int> = MutableStateFlow(View.GONE)
    override val bcSmartspaceVisibility: StateFlow<Int> = _bcSmartspaceVisibility.asStateFlow()
    val defaultValue =
        context.resources.getBoolean(
            com.android.internal.R.bool.config_lockscreenWeatherEnabledByDefault
        )
    override val isWeatherEnabled: StateFlow<Boolean> =
        secureSettings
            .observerFlow(
@@ -76,7 +72,7 @@ constructor(
    private fun getLockscreenWeatherEnabled(): Boolean {
        return secureSettings.getIntForUser(
            Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED,
            if (defaultValue) 1 else 0,
            1,
            userTracker.userId
        ) == 1
    }
+1 −3
Original line number Diff line number Diff line
@@ -310,11 +310,9 @@ constructor(

    fun isWeatherEnabled(): Boolean {
       execution.assertIsMainThread()
       val defaultValue = context.getResources().getBoolean(
               com.android.internal.R.bool.config_lockscreenWeatherEnabledByDefault)
       val showWeather = secureSettings.getIntForUser(
           LOCK_SCREEN_WEATHER_ENABLED,
           if (defaultValue) 1 else 0,
           1,
           userTracker.userId) == 1
       return showWeather
    }