Commit 23923a690e274c0e3d25d9c376a5d06334d5147c
1 parent
ba03f766
听云崩溃处理
Showing
2 changed files
with
8 additions
and
6 deletions
lib_media/src/main/AndroidManifest.xml
| ... | ... | @@ -11,7 +11,6 @@ |
| 11 | 11 | <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" /> |
| 12 | 12 | <uses-permission android:name="com.sec.android.provider.badge.permission.READ" /> |
| 13 | 13 | <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" /> |
| 14 | - | |
| 15 | 14 | <uses-feature android:name="android.hardware.camera" /> |
| 16 | 15 | <uses-feature android:name="android.hardware.camera.autofocus" /> |
| 17 | 16 | <application |
| ... | ... | @@ -28,7 +27,6 @@ |
| 28 | 27 | android:name="com.cnlive.media.ui.activity.RecordActivity" |
| 29 | 28 | android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout" |
| 30 | 29 | android:launchMode="singleTop" |
| 31 | - android:screenOrientation="portrait" | |
| 32 | 30 | android:theme="@style/FullActivityThemeStyle" |
| 33 | 31 | android:windowSoftInputMode="stateAlwaysHidden" /> |
| 34 | 32 | <activity | ... | ... |
lib_media/src/main/java/com/cnlive/media/ui/activity/RecordActivity.java
| ... | ... | @@ -222,12 +222,16 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent |
| 222 | 222 | @Override |
| 223 | 223 | public void onBackPressed() { |
| 224 | 224 | Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.pre_frame); |
| 225 | - if (currentFragment == null) super.onBackPressed(); | |
| 226 | - if (currentFragment instanceof RecordPreviewFragment) { | |
| 227 | - getSupportFragmentManager().popBackStack(); | |
| 228 | - } else { | |
| 225 | + if (currentFragment == null) { | |
| 229 | 226 | finish(); |
| 227 | + } else { | |
| 228 | + if (currentFragment instanceof RecordPreviewFragment) { | |
| 229 | + getSupportFragmentManager().popBackStack(); | |
| 230 | + } else { | |
| 231 | + finish(); | |
| 232 | + } | |
| 230 | 233 | } |
| 234 | + | |
| 231 | 235 | } |
| 232 | 236 | |
| 233 | 237 | ... | ... |