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

Commit b22a8283 authored by Chandru S's avatar Chandru S Committed by Android (Google) Code Review
Browse files

Merge "Fix for the lock icon issue" into main

parents 530a44f4 3c9940c6
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -187,10 +187,6 @@ object DeviceEntryIconViewBinder {
                    launch("$TAG#fpIconView.viewModel") {
                        fgViewModel.viewModel.collect { viewModel ->
                            Log.d(TAG, "Updating device entry icon image state $viewModel")
                            fgIconView.setImageState(
                                view.getIconState(viewModel.type, viewModel.useAodVariant),
                                /* merge */ false,
                            )
                            if (viewModel.type.contentDescriptionResId != -1) {
                                fgIconView.contentDescription =
                                    fgIconView.resources.getString(
@@ -205,6 +201,14 @@ object DeviceEntryIconViewBinder {
                                viewModel.padding,
                                viewModel.padding,
                            )
                            // Set image state at the end after updating other view state. This
                            // method forces the ImageView to recompute the bounds of the drawable.
                            fgIconView.setImageState(
                                view.getIconState(viewModel.type, viewModel.useAodVariant),
                                /* merge */ false,
                            )
                            // Invalidate, just in case the padding changes just after icon changes
                            fgIconView.invalidate()
                        }
                    }
                }