视频播放器增加人脸识别,当检测到人脸播放,否则暂停

1、在packages/apps/Gallery2/AndroidManifest.xml文件中增加

2、packages/apps/Gallery2/src/com/mediatek/gallery3d/util/PermissionHelper.java

--- a/alps/packages/apps/Gallery2/src/com/mediatek/gallery3d/util/PermissionHelper.java

+++ b/alps/packages/apps/Gallery2/src/com/mediatek/gallery3d/util/PermissionHelper.java

@@ -83,6 +83,7 @@ public class PermissionHelper {

         // get permissions needed in current scenario

         ArrayList permissionsNeeded = new ArrayList();

         permissionsNeeded.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);

+ permissionsNeeded.add(Manifest.permission.CAMERA);

         Uri uri = activity.getIntent().getData();

         if (uri != null && uri.toString().startsWith("content://mms")) {

             permissionsNeeded.add(Manifest.permission.READ_SMS);

 

你可能感兴趣的:(android,ROM定制)