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

Commit a290b2aa authored by Anthony Lee's avatar Anthony Lee
Browse files

Remove overflow menu for quick responses.

The existing overflow menu's only option to "Reset default app"
was supposed to reset the quick responses but it makes sense to
remove the menu instead of fixing the functionality at this
point in time.

Bug: 18567283
Change-Id: Ia4b2b56423666d456708602df5820d18ab3df6f5
parent 0b4e8a27
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 Google Inc.

     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.
-->

<!-- Menu for Respond-via-Message settings screen. -->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/respond_via_message_reset"
          android:title="@string/respond_via_sms_menu_reset_default_activity" />
</menu>
+0 −3
Original line number Diff line number Diff line
@@ -68,9 +68,6 @@
    <string name="respond_via_sms_setting_summary"></string>
    <!-- Dialog title when changing a string for the "Respond via SMS" feature. [CHAR LIMIT=30] -->
    <string name="respond_via_sms_edittext_dialog_title">Quick response</string>
    <!-- Menu option in  "Respond via SMS" that allows user to reset the default
         activity used to handle "Respond via SMS" [CHAR LIMIT=30] -->
    <string name="respond_via_sms_menu_reset_default_activity">Reset default app</string>

    <!-- "Respond via SMS": Confirmation message shown after sending
        a text response. [CHAR LIMIT=40] -->
+0 −18
Original line number Diff line number Diff line
@@ -33,9 +33,6 @@ import android.view.MenuItem;
 * Helper class to manage the "Respond via SMS Message" feature for incoming calls.
 */
public class RespondViaSmsSettings {
    private static final String KEY_PREFERRED_PACKAGE = "preferred_package_pref";
    private static final String KEY_INSTANT_TEXT_DEFAULT_COMPONENT = "instant_text_def_component";

    // TODO: This class is newly copied into Telecom (com.android.server.telecom) from it previous
    // location in Telephony (com.android.phone). User's preferences stored in the old location
    // will be lost. We need code here to migrate KLP -> LMP settings values.
@@ -124,26 +121,11 @@ public class RespondViaSmsSettings {
            switch (itemId) {
                case android.R.id.home:
                    goUpToTopLevelSetting(this);
                    return true;
                case R.id.respond_via_message_reset:
                    // Reset the preferences settings
                    SharedPreferences prefs = getSharedPreferences(
                            QuickResponseUtils.SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);
                    SharedPreferences.Editor editor = prefs.edit();
                    editor.remove(KEY_INSTANT_TEXT_DEFAULT_COMPONENT);
                    editor.apply();

                    return true;
                default:
            }
            return super.onOptionsItemSelected(item);
        }

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            getMenuInflater().inflate(R.menu.respond_via_message_settings_menu, menu);
            return super.onCreateOptionsMenu(menu);
        }
    }

    /**