Merge "Fix focus close when select video in picker"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 764ab2d..fdc7635 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -24,7 +24,7 @@
 
     <original-package android:name="com.android.gallery3d" />
 
-    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="23"/>
+    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
 
     <permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER"
             android:protectionLevel="signatureOrSystem" />
@@ -42,13 +42,10 @@
     <uses-permission android:name="android.permission.WAKE_LOCK" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
-    <uses-permission android:name="android.permission.WRITE_APN_SETTINGS"/>
     <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
-    <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"/>
     <uses-permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER" />
     <uses-permission android:name="android.permission.BLUETOOTH" />
     <!-- add for guest to set system property -->
-    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
     <uses-permission android:name="android.permission.READ_PHONE_STATE" />
 
     <supports-screens android:smallScreens="false"
diff --git a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java
index 5d235ba..01061db 100644
--- a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java
+++ b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java
@@ -563,6 +563,7 @@
                 mMediaController.hide();
             }
             if (mOnCompletionListener != null) {
+                Log.d(TAG, "OnCompletion: " + mMediaPlayer.getMetrics());
                 mOnCompletionListener.onCompletion(mMediaPlayer);
             }
         }
@@ -799,6 +800,7 @@
             }
         }
         */
+        Log.d(TAG, "Suspend: " + mMediaPlayer.getMetrics());
         release(false);
     }