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

Commit b2c5221c authored by Colin Cross's avatar Colin Cross Committed by Gerrit Code Review
Browse files

Merge "Fix kotlin nullable errors in frameworks/base" into main

parents f3d43d21 45b07a2d
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -137,15 +137,13 @@ class Quare(val width: Int, val height: Int, val depth: Int) : Parcelable {
        return 0
    }

    override fun writeToParcel(p: Parcel?, flags: Int) {
        p?.let {
    override fun writeToParcel(p: Parcel, flags: Int) {
        p.writeInt(width)
        p.writeInt(height)
        p.writeInt(depth)
        p.writeIntArray(data)
        p.writeIntArray(user)
    }
    }

    companion object CREATOR : Parcelable.Creator<Quare> {
        override fun createFromParcel(p: Parcel?): Quare {
+3 −3
Original line number Diff line number Diff line
@@ -60,8 +60,8 @@ class QuaresActivity : Activity() {

        setContentView(R.layout.activity_quares)

        grid = findViewById(R.id.grid)
        label = findViewById(R.id.label)
        grid = requireViewById(R.id.grid)
        label = requireViewById(R.id.label)

        if (savedInstanceState != null) {
            Log.v(TAG, "restoring puzzle from state")
@@ -135,7 +135,7 @@ class QuaresActivity : Activity() {
        if (q.check()) {
            val dp = resources.displayMetrics.density

            val label: Button = findViewById(R.id.label)
            val label: Button = requireViewById(R.id.label)
            label.text = resName.replace(Regex("^.*/"), "")
            val drawable = icon?.loadDrawable(this)?.also {
                it.setBounds(0, 0, (32 * dp).toInt(), (32 * dp).toInt())
+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int)
        return batteryLevel
    }

    override fun onBoundsChange(bounds: Rect?) {
    override fun onBoundsChange(bounds: Rect) {
        super.onBoundsChange(bounds)
        updateSize()
    }
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class PeerDeviceSystemAttestationVerificationTest {
    @Before
    fun setup() {
        rule.getScenario().onActivity {
            avm = it.getSystemService(AttestationVerificationManager::class.java)
            avm = it.getSystemService(AttestationVerificationManager::class.java)!!
            activity = it
        }
        invalidAttestationByteArray = TEST_ATTESTATION_CERT_FILENAME.fromPEMFileToByteArray()
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ class SystemAttestationVerificationTest {
    @Before
    fun setup() {
        rule.getScenario().onActivity {
            avm = it.getSystemService(AttestationVerificationManager::class.java)
            avm = it.getSystemService(AttestationVerificationManager::class.java)!!
            activity = it
            androidKeystore = KeyStore.getInstance(ANDROID_KEYSTORE).apply { load(null) }
        }
Loading