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 Change-Id: Ie6f0d92a9ded82eaf3a0ac1122861f26639bc58a
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user