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

Commit 082170e1 authored by Abhisek Devkota's avatar Abhisek Devkota Committed by Gerrit Code Review
Browse files

Merge "Settings: Add missing up navigation in menus" into cm-11.0

parents 248c4385 cc5dd3e7
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -738,7 +738,8 @@
        <activity android:name="SettingsLicenseActivity"
                android:label="@string/settings_license_activity_title"
                android:theme="@android:style/Theme.Holo.Panel"
                android:configChanges="orientation|screenSize">
                android:configChanges="orientation|screenSize"
                android:parentActivityName="Settings$DeviceInfoSettingsActivity">
            <intent-filter>
                <action android:name="android.settings.LICENSE" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -757,7 +758,8 @@

        <activity android:name="SettingsSafetyLegalActivity"
                android:label="@string/settings_safetylegal_activity_title"
                android:theme="@*android:style/Theme.Holo.Dialog.Alert">
                android:theme="@*android:style/Theme.Holo.Dialog.Alert"
                android:parentActivityName="Settings$DeviceInfoSettingsActivity">
            <intent-filter>
                <action android:name="android.settings.SAFETY" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -1176,7 +1178,8 @@
        <activity android:name=".deviceinfo.Status"
                android:label="@string/device_status_activity_title"
                android:theme="@android:style/Theme.Holo.DialogWhenLarge"
                android:process="com.android.phone">
                android:process="com.android.phone"
                android:parentActivityName="Settings$DeviceInfoSettingsActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -1660,7 +1663,8 @@
        <activity android:name="com.android.settings.accounts.ChooseAccountActivity"
            android:label="@string/header_add_an_account"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@android:style/Theme.Holo.DialogWhenLarge"/>
            android:theme="@android:style/Theme.Holo.DialogWhenLarge"
            android:parentActivityName="Settings"/>

        <activity android:name=".CryptKeeper"
                  android:immersive="true"
@@ -1747,7 +1751,8 @@

        <activity android:name=".profiles.WifiTriggers" />

        <activity android:name=".profiles.NFCProfileWriter" />
        <activity android:name=".profiles.NFCProfileWriter"
                android:parentActivityName="Settings$ProfilesSettingsActivity" />

        <activity android:name=".profiles.NFCProfileSelect" />

+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.settings;

import android.app.ActionBar;
import android.app.AlertDialog;
import android.content.Context;
import android.content.res.Configuration;
@@ -25,6 +26,7 @@ import android.os.SystemProperties;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.android.internal.app.AlertActivity;
@@ -46,6 +48,11 @@ public class SettingsSafetyLegalActivity extends AlertActivity
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ActionBar mActionBar = getActionBar();
        if (mActionBar != null) {
            mActionBar.setDisplayHomeAsUpEnabled(true);
        }

        String userSafetylegalUrl = SystemProperties.get(PROPERTY_LSAFETYLEGAL_URL);

        final Configuration configuration = getResources().getConfiguration();
@@ -86,6 +93,15 @@ public class SettingsSafetyLegalActivity extends AlertActivity
        setupAlert();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return false;
    }

    private void showErrorAndFinish(String url) {
        if (mErrorDialog == null) {
            mErrorDialog = new AlertDialog.Builder(this)
+16 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settings.accounts;

import android.accounts.AccountManager;
import android.accounts.AuthenticatorDescription;
import android.app.ActionBar;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -31,6 +32,7 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.util.Log;
import android.view.MenuItem;
import com.android.internal.util.CharSequences;
import com.android.settings.R;
import com.google.android.collect.Maps;
@@ -79,6 +81,11 @@ public class ChooseAccountActivity extends PreferenceActivity {
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        ActionBar mActionBar = getActionBar();
        if (mActionBar != null) {
            mActionBar.setDisplayHomeAsUpEnabled(true);
        }

        setContentView(R.layout.add_account_screen);
        addPreferencesFromResource(R.xml.add_account_settings);
        mAuthorities = getIntent().getStringArrayExtra(
@@ -95,6 +102,15 @@ public class ChooseAccountActivity extends PreferenceActivity {
        updateAuthDescriptions();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return false;
    }

    /**
     * Updates provider icons. Subclasses should call this in onCreate()
     * and update any UI that depends on AuthenticatorDescriptions in onAuthDescriptionsUpdated().
+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.settings.deviceinfo;

import android.app.ActionBar;
import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -42,6 +43,7 @@ import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.view.MenuItem;

import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
@@ -211,6 +213,11 @@ public class Status extends PreferenceActivity {
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        ActionBar mActionBar = getActionBar();
        if (mActionBar != null) {
            mActionBar.setDisplayHomeAsUpEnabled(true);
        }

        mHandler = new MyHandler(this);

        mTelephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
@@ -304,6 +311,15 @@ public class Status extends PreferenceActivity {
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return false;
    }

    @Override
    protected void onResume() {
        super.onResume();
+16 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settings.profiles;

import java.util.UUID;

import android.app.ActionBar;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.Profile;
@@ -29,6 +30,7 @@ import android.nfc.NfcAdapter;
import android.nfc.Tag;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.widget.Toast;

import com.android.settings.R;
@@ -61,6 +63,20 @@ public class NFCProfileWriter extends Activity {

        setContentView(R.layout.nfc_writer);
        setTitle(R.string.profile_write_nfc_tag);

        ActionBar mActionBar = getActionBar();
        if (mActionBar != null) {
            mActionBar.setDisplayHomeAsUpEnabled(true);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return false;
    }

    @Override