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

Commit 877f5203 authored by Michael Chan's avatar Michael Chan Committed by Android (Google) Code Review
Browse files

Merge "Add quick response when email guests in notification" into jb-dev

parents 4cb1eb75 e98dca7e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -158,6 +158,10 @@
        <activity android:name=".alerts.AlertActivity" android:launchMode="singleInstance"
             android:theme="@android:style/Theme.Holo.Dialog" android:excludeFromRecents="true" />

        <activity android:name=".alerts.QuickResponseActivity" android:launchMode="singleInstance"
             android:theme="@android:style/Theme.Holo.Dialog" android:excludeFromRecents="true"
             android:label="@string/quick_response_dialog_title" />

        <receiver android:name=".alerts.AlertReceiver">
            <intent-filter>
                <action android:name="android.intent.action.EVENT_REMINDER" />
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android 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.
-->

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceListItemSmall"
    android:gravity="center_vertical"
    android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
    android:paddingRight="?android:attr/listPreferredItemPaddingRight"
    android:minHeight="60dp"
    android:maxLines="2"
    android:ellipsize="end"
/>
+24 −1
Original line number Diff line number Diff line
@@ -290,6 +290,29 @@
    <!-- The is shown in the email subject as the prefix appended to the event title -->
    <string translatable="false" name="email_subject_prefix">Re:\u0020</string>

    <!-- Title of the quick response item in Settings [CHAR LIMIT=18]-->
    <string name="quick_response_settings">Quick responses</string>
    <!-- Summary of the quick response item in Settings [CHAR LIMIT=18]-->
    <string name="quick_response_settings_summary">Edit default responses when emailing guests</string>
    <!-- Title of the quick response screen in Settings->Quick Response [CHAR LIMIT=18]-->
    <string name="quick_response_settings_title">Edit quick responses</string>
    <!-- Title of the quick response item in Settings [CHAR LIMIT=18]-->
    <string name="quick_response_settings_edit_title">Quick response</string>

    <!-- Title of the dialog prompting the user choose a response when emailing guests  [CHAR LIMIT=none]-->
    <string name="quick_response_dialog_title">Choose quick response</string>
    <!-- Error to user when an email program can't be found[CHAR LIMIT=none]-->
    <string name="quick_response_email_failed">Failed to find an email program</string>
    <!-- The is shown in the email subject as the prefix appended to the event title [CHAR LIMIT=none]-->
    <string-array name="quick_response_defaults">
        <item>Running just a couple of minutes late.</item>
        <item>Be there in about 10 minutes.</item>
        <item>Go ahead and start without me.</item>
        <item>Sorry, I can\'t make it. We\'ll have to reschedule.</item>
        </string-array>
    <!-- Option to create a custom response instead of using defaults [CHAR LIMIT=none] -->
    <string name="quick_response_custom_msg">Custom message\u2026</string>

    <!-- Event Info strings-->
    <!-- Time Zone Label [CHAR LIMIT=12]-->

+7 −1
Original line number Diff line number Diff line
@@ -86,6 +86,12 @@
            android:entries="@array/preferences_default_reminder_labels"
            android:entryValues="@array/preferences_default_reminder_values"
            android:dialogTitle="@string/preferences_default_reminder_dialog" />

        <PreferenceScreen
            android:key="preferences_quick_responses"
            android:fragment="com.android.calendar.QuickResponseSettings"
            android:title="@string/quick_response_settings"
            android:summary="@string/quick_response_settings_summary" />
     </PreferenceCategory>

</PreferenceScreen>
+8 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.provider.CalendarContract.Calendars;
import android.provider.Settings;
import android.text.format.DateUtils;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import java.util.List;
@@ -38,6 +37,7 @@ public class CalendarSettingsActivity extends PreferenceActivity {
    private static final int CHECK_ACCOUNTS_DELAY = 3000;
    private Account[] mAccounts;
    private Handler mHandler = new Handler();
    private boolean mHideMenuButtons = false;

    @Override
    public void onBuildHeaders(List<Header> target) {
@@ -89,8 +89,9 @@ public class CalendarSettingsActivity extends PreferenceActivity {

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.settings_title_bar, menu);
        if (!mHideMenuButtons) {
            getMenuInflater().inflate(R.menu.settings_title_bar, menu);
        }
        getActionBar()
                .setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP, ActionBar.DISPLAY_HOME_AS_UP);
        return true;
@@ -121,4 +122,8 @@ public class CalendarSettingsActivity extends PreferenceActivity {
            }
        }
    };

    public void hideMenuButtons() {
        mHideMenuButtons = true;
    }
}
Loading