mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
AdvancedDisplay: Restore back button to the action bar
Change-Id: I7ae2d1ccbb0a55fc28c31d4791aaae1169b8221f
This commit is contained in:
parent
6deaa3b648
commit
f38167ac84
1 changed files with 14 additions and 0 deletions
|
@ -16,9 +16,11 @@
|
|||
|
||||
package org.lineageos.settings.device;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.v14.preference.PreferenceFragment;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import org.lineageos.settings.device.R;
|
||||
|
||||
|
@ -33,6 +35,9 @@ public class AdvancedDisplayFragment extends PreferenceFragment {
|
|||
addPreferencesFromResource(R.xml.screen_preferences);
|
||||
Resources res = getResources();
|
||||
|
||||
final ActionBar actionBar = getActivity().getActionBar();
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
/* mDNIe */
|
||||
mmDNIeScenario = (mDNIeScenario) findPreference(Constants.KEY_MDNIE_SCENARIO);
|
||||
mmDNIeScenario.setEnabled(
|
||||
|
@ -42,4 +47,13 @@ public class AdvancedDisplayFragment extends PreferenceFragment {
|
|||
mmDNIeNegative.setEnabled(
|
||||
FileUtils.isFileWritable(res.getString(R.string.mdnie_negative_sysfs_file)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
getActivity().onBackPressed();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue