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

Commit 6513ace4 authored by Anna Galusza's avatar Anna Galusza Committed by android-build-merger
Browse files

Merge \\"Remove \\"Help & feedback\\" from toggle screen for accessibility...

Merge \\"Remove \\"Help & feedback\\" from toggle screen for accessibility services to prevent confusion when users are trying to submit feedback for a specific accessibility service (accessibility services can place their own \\"Help & feedabck\\" in their apks and route it appropriately). Bug: 29278252\\" into nyc-mr1-dev am: 78a01973
am: d2961ede

Change-Id: I4af859c7c06b58c82a3a20664f938abb88153289
parents 2aa57f5b d2961ede
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ import android.os.storage.StorageManager;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
@@ -79,6 +82,21 @@ public class ToggleAccessibilityServicePreferenceFragment
        return MetricsEvent.ACCESSIBILITY_SERVICE;
    }

    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater infalter) {
        // Do not call super. We don't want to see the "Help & feedback" option on this page so as
        // not to confuse users who think they might be able to send feedback about a specific
        // accessibility service from this page.

        // We still want to show the "Settings" menu.
        if (mSettingsTitle != null && mSettingsIntent != null) {
            MenuItem menuItem = menu.add(mSettingsTitle);
            menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
            menuItem.setIntent(mSettingsIntent);
        }

    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);