Revert "Migrate to CompoundButton.OnCheckedChangeListener"

Revert submission 25147565-onSwitchChanged-CompoundButton

Reason for revert: breaking builds 

Bug:309601476

Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton

Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
This commit is contained in:
Sebastian Pickl
2023-11-07 13:26:36 +00:00
committed by Android (Google) Code Review
parent 71d1f021af
commit 8979681a8d
49 changed files with 188 additions and 174 deletions

View File

@@ -19,6 +19,7 @@ import android.app.settings.SettingsEnums
import android.content.Context
import android.os.Bundle
import android.telephony.SubscriptionManager
import android.widget.Switch
import com.android.settings.R
import com.android.settings.SettingsActivity
import com.android.settings.dashboard.DashboardFragment
@@ -50,7 +51,9 @@ class DataSaverSummary : DashboardFragment() {
switchBar = (activity as SettingsActivity).switchBar.apply {
setTitle(getString(R.string.data_saver_switch_title))
show()
addOnSwitchChangeListener { _, isChecked -> onSwitchChanged(isChecked) }
addOnSwitchChangeListener { _: Switch, isChecked: Boolean ->
onSwitchChanged(isChecked)
}
}
}
@@ -102,4 +105,4 @@ class DataSaverSummary : DashboardFragment() {
SubscriptionManager.INVALID_SUBSCRIPTION_ID)
}
}
}
}