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

Commit 102feefd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "fix the NPE problem when the button_bar_container layout is not config." into main

parents 70b0752e 98cb5d8d
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -684,15 +684,16 @@ public class IntentForwarderActivity extends Activity {
    }

    private void setMiniresolverPadding() {
        View buttonContainer = findViewById(R.id.button_bar_container);
        if (buttonContainer != null) {
            Insets systemWindowInsets =
                    getWindowManager().getCurrentWindowMetrics().getWindowInsets().getInsets(
                            WindowInsets.Type.systemBars());

        View buttonContainer = findViewById(R.id.button_bar_container);
            buttonContainer.setPadding(0, 0, 0,
                    systemWindowInsets.bottom + getResources().getDimensionPixelOffset(
                            R.dimen.resolver_button_bar_spacing));
        }
    }

    @VisibleForTesting
    protected Injector createInjector() {
+5 −2
Original line number Diff line number Diff line
@@ -929,8 +929,11 @@ public class ResolverActivity extends Activity implements

        if (shouldUseMiniResolver()) {
            View buttonContainer = findViewById(R.id.button_bar_container);
            if (buttonContainer != null) {
                buttonContainer.setPadding(0, 0, 0, mSystemWindowInsets.bottom
                    + getResources().getDimensionPixelOffset(R.dimen.resolver_button_bar_spacing));
                        + getResources().getDimensionPixelOffset(
                                R.dimen.resolver_button_bar_spacing));
            }
        }

        // Need extra padding so the list can fully scroll up