PartsActivity: Always include back button in the action bar
* Back in N, we had top-level settings which would show the
hamburger menu instead of the back button.
Since this has now changed in O, add the back button to all
the activities.
Change-Id: I1b89f90b741e6b8b78b2c267732cbdf9225192f0
diff --git a/src/org/lineageos/lineageparts/PartsActivity.java b/src/org/lineageos/lineageparts/PartsActivity.java
index 6622e4e..a1d510c 100644
--- a/src/org/lineageos/lineageparts/PartsActivity.java
+++ b/src/org/lineageos/lineageparts/PartsActivity.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
+ * 2017 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -60,8 +61,6 @@
private CharSequence mInitialTitle;
- private boolean mHomeAsUp = true;
-
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
@@ -103,7 +102,6 @@
// Alias mode
info = PartsList.get(this).getPartInfoForClass(
getIntent().getComponent().getClassName());
- mHomeAsUp = false;
}
if (info == null) {
throw new UnsupportedOperationException(
@@ -121,7 +119,7 @@
switchToFragment(fragmentClass, initialArgs, -1, mInitialTitle);
- getActionBar().setDisplayHomeAsUpEnabled(mHomeAsUp);
+ getActionBar().setDisplayHomeAsUpEnabled(true);
}
@Override
@@ -174,7 +172,7 @@
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == android.R.id.home && mHomeAsUp) {
+ if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}