Commit 23923a690e274c0e3d25d9c376a5d06334d5147c

Authored by 吴奎庆
1 parent ba03f766

听云崩溃处理

lib_media/src/main/AndroidManifest.xml
@@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
11 <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" /> 11 <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" />
12 <uses-permission android:name="com.sec.android.provider.badge.permission.READ" /> 12 <uses-permission android:name="com.sec.android.provider.badge.permission.READ" />
13 <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" /> 13 <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" />
14 -  
15 <uses-feature android:name="android.hardware.camera" /> 14 <uses-feature android:name="android.hardware.camera" />
16 <uses-feature android:name="android.hardware.camera.autofocus" /> 15 <uses-feature android:name="android.hardware.camera.autofocus" />
17 <application 16 <application
@@ -28,7 +27,6 @@ @@ -28,7 +27,6 @@
28 android:name="com.cnlive.media.ui.activity.RecordActivity" 27 android:name="com.cnlive.media.ui.activity.RecordActivity"
29 android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout" 28 android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
30 android:launchMode="singleTop" 29 android:launchMode="singleTop"
31 - android:screenOrientation="portrait"  
32 android:theme="@style/FullActivityThemeStyle" 30 android:theme="@style/FullActivityThemeStyle"
33 android:windowSoftInputMode="stateAlwaysHidden" /> 31 android:windowSoftInputMode="stateAlwaysHidden" />
34 <activity 32 <activity
lib_media/src/main/java/com/cnlive/media/ui/activity/RecordActivity.java
@@ -222,12 +222,16 @@ public class RecordActivity extends MvpBindingActivity&lt;RecordView, RecordPresent @@ -222,12 +222,16 @@ public class RecordActivity extends MvpBindingActivity&lt;RecordView, RecordPresent
222 @Override 222 @Override
223 public void onBackPressed() { 223 public void onBackPressed() {
224 Fragment currentFragment = getSupportFragmentManager().findFragmentById(R.id.pre_frame); 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 finish(); 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