Loading app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ android { defaultConfig { applicationId "foundation.e.camera" minSdkVersion 26 minSdkVersion 29 targetSdkVersion 34 //compileSdkVersion 31 // needed to support appcompat:1.4.0 (which we need for emoji policy support, and not yet ready to target SDK 30) Loading app/src/main/java/net/sourceforge/opencamera/MainActivity.java +17 −5 Original line number Diff line number Diff line Loading @@ -1504,7 +1504,10 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen for(Map.Entry<Integer, Bitmap> entry : preloaded_bitmap_resources.entrySet()) { if( MyDebug.LOG ) Log.d(TAG, "recycle: " + entry.getKey()); entry.getValue().recycle(); Bitmap recycleValue = entry.getValue(); if (recycleValue != null) { recycleValue.recycle(); } } preloaded_bitmap_resources.clear(); if( textToSpeech != null ) { Loading Loading @@ -5043,7 +5046,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen final String REVIEW_ACTION = "com.android.camera.action.REVIEW"; final String KEY_FROM_SNAPCAM = "from-snapcam"; boolean done = false; if( !is_raw ) { if( !is_raw || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) ) { // REVIEW_ACTION means we can view video files without autoplaying. // However, Google Photos at least has problems with going to a RAW photo (in RAW only mode), // unless we first pause and resume Open Camera. Loading @@ -5052,8 +5055,15 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen if( MyDebug.LOG ) Log.d(TAG, "try REVIEW_ACTION"); try { Intent intent = new Intent(REVIEW_ACTION, uri); Intent intent = new Intent(); intent.setData(uri); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { intent.setAction(REVIEW_ACTION); intent.putExtra(KEY_FROM_SNAPCAM, allowEdit); } else { intent.setAction(MediaStore.ACTION_REVIEW); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); } this.startActivity(intent); done = true; } Loading @@ -5066,7 +5076,9 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen Log.d(TAG, "try ACTION_VIEW"); try { Intent intent = new Intent(Intent.ACTION_VIEW, uri); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { intent.putExtra(KEY_FROM_SNAPCAM, allowEdit); } this.startActivity(intent); } catch(ActivityNotFoundException e) { Loading Loading
app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ android { defaultConfig { applicationId "foundation.e.camera" minSdkVersion 26 minSdkVersion 29 targetSdkVersion 34 //compileSdkVersion 31 // needed to support appcompat:1.4.0 (which we need for emoji policy support, and not yet ready to target SDK 30) Loading
app/src/main/java/net/sourceforge/opencamera/MainActivity.java +17 −5 Original line number Diff line number Diff line Loading @@ -1504,7 +1504,10 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen for(Map.Entry<Integer, Bitmap> entry : preloaded_bitmap_resources.entrySet()) { if( MyDebug.LOG ) Log.d(TAG, "recycle: " + entry.getKey()); entry.getValue().recycle(); Bitmap recycleValue = entry.getValue(); if (recycleValue != null) { recycleValue.recycle(); } } preloaded_bitmap_resources.clear(); if( textToSpeech != null ) { Loading Loading @@ -5043,7 +5046,7 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen final String REVIEW_ACTION = "com.android.camera.action.REVIEW"; final String KEY_FROM_SNAPCAM = "from-snapcam"; boolean done = false; if( !is_raw ) { if( !is_raw || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) ) { // REVIEW_ACTION means we can view video files without autoplaying. // However, Google Photos at least has problems with going to a RAW photo (in RAW only mode), // unless we first pause and resume Open Camera. Loading @@ -5052,8 +5055,15 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen if( MyDebug.LOG ) Log.d(TAG, "try REVIEW_ACTION"); try { Intent intent = new Intent(REVIEW_ACTION, uri); Intent intent = new Intent(); intent.setData(uri); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { intent.setAction(REVIEW_ACTION); intent.putExtra(KEY_FROM_SNAPCAM, allowEdit); } else { intent.setAction(MediaStore.ACTION_REVIEW); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); } this.startActivity(intent); done = true; } Loading @@ -5066,7 +5076,9 @@ public class MainActivity extends AppCompatActivity implements PreferenceFragmen Log.d(TAG, "try ACTION_VIEW"); try { Intent intent = new Intent(Intent.ACTION_VIEW, uri); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { intent.putExtra(KEY_FROM_SNAPCAM, allowEdit); } this.startActivity(intent); } catch(ActivityNotFoundException e) { Loading