diff options
author | Brint E. Kriebel <bekit@cyngn.com> | 2014-11-18 13:51:15 -0800 |
---|---|---|
committer | Brint E. Kriebel <bekit@cyngn.com> | 2014-11-18 13:51:15 -0800 |
commit | 7d9951cf09c9015fad0f0599fcff3468b9d19247 (patch) | |
tree | 3cfa708e946bb4144f7a2a42c40f9cbc54af1506 | |
parent | 4e46e3d91f00a7de396827a09511062d458d3b47 (diff) | |
parent | 714e933e0f4b6407381ee0bc1cc50761690f65d5 (diff) | |
download | android_packages_apps_Email-shipping/cm-11.0.tar.gz android_packages_apps_Email-shipping/cm-11.0.tar.bz2 android_packages_apps_Email-shipping/cm-11.0.zip |
Merge branch 'cm-11.0' into stable/cm-11.0cm-11.0-XNPH05Q-tomato-9828f8e9ccstable/cm-11.0-XNF8Yshipping/cm-11.0
-rw-r--r-- | res/values/cm_config.xml | 22 | ||||
-rw-r--r-- | src/com/android/email/activity/setup/AccountSetupBasics.java | 2 | ||||
-rw-r--r-- | src/com/android/email/activity/setup/SetupData.java | 9 |
3 files changed, 33 insertions, 0 deletions
diff --git a/res/values/cm_config.xml b/res/values/cm_config.xml new file mode 100644 index 000000000..36cdf3bb8 --- /dev/null +++ b/res/values/cm_config.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2014 The CyanogenMod Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Default signature for accounts. --> + <string name="config_default_signature" translatable="false"></string> + +</resources> diff --git a/src/com/android/email/activity/setup/AccountSetupBasics.java b/src/com/android/email/activity/setup/AccountSetupBasics.java index 21d761d32..aa2207658 100644 --- a/src/com/android/email/activity/setup/AccountSetupBasics.java +++ b/src/com/android/email/activity/setup/AccountSetupBasics.java @@ -194,12 +194,14 @@ public class AccountSetupBasics extends AccountSetupActivity if (ServiceProxy.getIntentStringForEmailPackage( this, ACTION_CREATE_ACCOUNT).equals(action)) { mSetupData = new SetupData(SetupData.FLOW_MODE_FORCE_CREATE); + mSetupData.setDefaultSignature(this); } else { final int intentFlowMode = intent.getIntExtra(EXTRA_FLOW_MODE, SetupData.FLOW_MODE_UNSPECIFIED); if (intentFlowMode != SetupData.FLOW_MODE_UNSPECIFIED) { mSetupData = new SetupData(intentFlowMode, intent.getStringExtra(EXTRA_FLOW_ACCOUNT_TYPE)); + mSetupData.setDefaultSignature(this); } } diff --git a/src/com/android/email/activity/setup/SetupData.java b/src/com/android/email/activity/setup/SetupData.java index fc680dbbe..9150b191f 100644 --- a/src/com/android/email/activity/setup/SetupData.java +++ b/src/com/android/email/activity/setup/SetupData.java @@ -17,12 +17,15 @@ package com.android.email.activity.setup; import android.accounts.AccountAuthenticatorResponse; +import android.content.Context; +import android.content.res.Resources; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import com.android.emailcommon.provider.Account; import com.android.emailcommon.provider.Policy; +import com.android.email.R; public class SetupData implements Parcelable { // The "extra" name for the Bundle saved with SetupData @@ -228,4 +231,10 @@ public class SetupData implements Parcelable { sb.append(mPolicy == null ? "none" : "exists"); return sb.toString(); } + + public void setDefaultSignature(Context context) { + Resources res = context.getResources(); + mAccount.setSignature(res.getString(R.string.config_default_signature)); + } + } |