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

Commit f18a55da authored by Jason Monk's avatar Jason Monk
Browse files

SettingsLib Drawer: Listen to theme about actionbar

Show it or not based on windowNoTitle.

Bug: 25567755
Change-Id: Ie1a6b79eb87dcc101bd76785df7c5330acc54603
parent 6dc9114e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settingslib.drawer;
import android.annotation.LayoutRes;
import android.annotation.Nullable;
import android.app.Activity;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.v4.widget.DrawerLayout;
import android.util.Pair;
@@ -54,6 +55,13 @@ public class SettingsDrawerActivity extends Activity {
            return;
        }
        Toolbar toolbar = (Toolbar) findViewById(R.id.action_bar);
        TypedArray theme = getTheme().obtainStyledAttributes(android.R.styleable.Theme);
        if (theme.getBoolean(android.R.styleable.Theme_windowNoTitle, false)) {
            toolbar.setVisibility(View.GONE);
            mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
            mDrawerLayout = null;
            return;
        }
        setActionBar(toolbar);
        mDrawerAdapter = new SettingsDrawerAdapter(this);
        ListView listView = (ListView) findViewById(R.id.left_drawer);