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

Commit 9db66a56 authored by Fan Zhang's avatar Fan Zhang
Browse files

Clean up before making all setting page render edge-to-edge

These classes are casting view to LinearLayout unnecessarily. Later we
might change the root view away from LinearLayout. The cast will cause
crash.

Bug: 132182711
Test: go through SUW.
Change-Id: Iea31882f8edea0c87ef8e95b4da9b6bffa8ea7d0
parent dcf21d4b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -84,8 +84,7 @@ public class EncryptionInterstitial extends SettingsActivity {
    @Override
    protected void onCreate(Bundle savedInstance) {
        super.onCreate(savedInstance);
        LinearLayout layout = (LinearLayout) findViewById(R.id.content_parent);
        layout.setFitsSystemWindows(false);
        findViewById(R.id.content_parent).setFitsSystemWindows(false);
    }

    public static class EncryptionInterstitialFragment extends InstrumentedFragment {
+0 −9
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.settings;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.LinearLayout;

/**
 * Setup Wizard's version of EncryptionInterstitial screen. It inherits the logic and basic
@@ -53,13 +51,6 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial {
        return SetupEncryptionInterstitialFragment.class.getName().equals(fragmentName);
    }

    @Override
    protected void onCreate(Bundle savedInstance) {
        super.onCreate(savedInstance);
        LinearLayout layout = (LinearLayout) findViewById(R.id.content_parent);
        layout.setFitsSystemWindows(false);
    }

    public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment {
    }
}
+5 −6
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
@@ -74,12 +73,12 @@ public class RedactionInterstitial extends SettingsActivity {
    @Override
    protected void onCreate(Bundle savedInstance) {
        super.onCreate(savedInstance);
        LinearLayout layout = (LinearLayout) findViewById(R.id.content_parent);
        layout.setFitsSystemWindows(false);
        findViewById(R.id.content_parent).setFitsSystemWindows(false);
    }

    /**
     * Create an intent for launching RedactionInterstitial.
     *
     * @return An intent to launch the activity is if is available, @null if the activity is not
     * available to be launched.
     */
+1 −2
Original line number Diff line number Diff line
@@ -175,8 +175,7 @@ public class ChooseLockPassword extends SettingsActivity {
        }

        setTitle(msg);
        LinearLayout layout = (LinearLayout) findViewById(R.id.content_parent);
        layout.setFitsSystemWindows(false);
        findViewById(R.id.content_parent).setFitsSystemWindows(false);
    }

    public static class ChooseLockPasswordFragment extends InstrumentedFragment
+1 −2
Original line number Diff line number Diff line
@@ -163,8 +163,7 @@ public class ChooseLockPattern extends SettingsActivity {
        }

        setTitle(msg);
        LinearLayout layout = (LinearLayout) findViewById(R.id.content_parent);
        layout.setFitsSystemWindows(false);
        findViewById(R.id.content_parent).setFitsSystemWindows(false);
    }

    @Override
Loading