Android S长按文件或视频或编辑中文字或输入框中文字不会弹出分享菜单
1.删除文件管理的分享图标和右上角设置里面的分享
packages/apps/DocumentsUI/res/menu/action_mode_menu.xml
<!---rm filemanager share icon
<item
android:id="@+id/action_menu_share"
android:icon="@drawable/ic_menu_share"
android:title="@string/menu_share"
android:showAsAction="always" />
-->
/packages/apps/DocumentsUI/res/menu/file_context_menu.xml
<!--rm filemanager share icon
<item
android:id="@+id/dir_menu_share"
android:title="@string/menu_share" />
-->
/packages/apps/DocumentsUI/src/com/android/documentsui/MenuManager.java
public void updateActionMenu(Menu menu, SelectionDetails selection) {
updateOpenWith(menu.findItem(R.id.action_menu_open_with), selection);
updateDelete(menu.findItem(R.id.action_menu_delete), selection);
//updateShare(menu.findItem(R.id.action_menu_share), selection);//*/rm@VisibleForTesting
public void updateContextMenuForFiles(Menu menu, SelectionDetails selectionDetails) {
assert selectionDetails != null;//MenuItem share = menu.findItem(R.id.dir_menu_share);//*/rm dir share
MenuItem open = menu.findItem(R.id.dir_menu_open);
MenuItem openWith = menu.findItem(R.id.dir_menu_open_with);
MenuItem rename = menu.findItem(R.id.dir_menu_rename);
MenuItem viewInOwner = menu.findItem(R.id.dir_menu_view_in_owner);//updateShare(share, selectionDetails);//*/rm dir share
updateOpenInContextMenu(open, selectionDetails);
updateOpenWith(openWith, selectionDetails);
updateRename(rename, selectionDetails);
updateViewInOwner(viewInOwner, selectionDetails);updateContextMenu(menu, selectionDetails);
}
packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
/*/
case R.id.action_menu_share:
case R.id.dir_menu_share:
mActions.shareSelectedDocuments();
return true;
//*/
2.删除图库分享图标和右上角的整个设置,包括分享
/vendor/mediatek/proprietary/packages/apps/Gallery2/res/menu/albumset.xml
<!--rm
<item android:id="@+id/action_select"
android:title="@string/select_album"
android:showAsAction="never" />
-->
<!--
<item android:id="@+id/action_manage_offline"
android:title="@string/make_available_offline"
android:showAsAction="never" />
<item android:id="@+id/action_sync_picasa_albums"
android:title="@string/sync_picasa_albums"
android:showAsAction="never" />
<item android:id="@+id/action_settings"
android:title="@string/settings"
android:showAsAction="never" />
-->/vendor/mediatek/proprietary/packages/apps/Gallery2/res/menu/movie.xml
<!--rm action_share
<item android:id="@+id/action_share"
android:icon="@drawable/ic_menu_share_holo_light"
android:title="@string/share"
android:enabled&#