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

Commit 56f6509a authored by Todd Volkert's avatar Todd Volkert
Browse files

Only show the header on non-television ui modes.

b/22005468

Change-Id: Ia6d83596e0b5cc5d005d4322062e38dedede8d14
parent 51cb4381
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.packageinstaller.permission.ui;

import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.preference.PreferenceFragment;
@@ -42,9 +43,12 @@ public abstract class SettingsWithHeader extends PreferenceFragment implements O
            Bundle savedInstanceState) {
        LinearLayout contentParent =
                (LinearLayout) super.onCreateView(inflater, container, savedInstanceState);
        int uiMode = getResources().getConfiguration().uiMode;
        if ((uiMode & Configuration.UI_MODE_TYPE_MASK) != Configuration.UI_MODE_TYPE_TELEVISION) {
            mHeader = inflater.inflate(R.layout.header, contentParent, false);
            contentParent.addView(mHeader, 0);
            updateHeader();
        }

        return contentParent;
    }