Commit 6cdb6525 authored by fallenstardust's avatar fallenstardust

从桌面图标进入mobile的后台保留Activity

parent 617349b1
......@@ -56,7 +56,6 @@
android:excludeFromRecents="false"
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:stateNotNeeded="true"
android:theme="@style/AppTheme"
......
......@@ -7,7 +7,6 @@ import android.widget.Toast;
import cn.garymb.ygomobile.AppsSettings;
import cn.garymb.ygomobile.YGOStarter;
import cn.garymb.ygomobile.lite.BuildConfig;
import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.home.MainActivity;
......@@ -24,6 +23,10 @@ public class LogoActivity extends BaseActivity {
finish();
return;
}
if (!isTaskRoot()) {
finish();
return;
}
}
......@@ -34,21 +37,21 @@ public class LogoActivity extends BaseActivity {
if (requestCode == REQUEST_PERMISSIONS && resultCode == PermissionsActivity.PERMISSIONS_DENIED) {
finish();
} else {
// if (BuildConfig.DEBUG) {
// startActivity(new Intent(LogoActivity.this, MainActivity.class));
// finish();
// } else {
handler = new Handler();
runnable = new Runnable() {
@Override
public void run() {
startActivity(new Intent(LogoActivity.this, MainActivity.class));
finish();
}
};
handler.postDelayed(runnable, 1000);
Toast.makeText(LogoActivity.this, R.string.logo_text, Toast.LENGTH_SHORT).show();
// }
// if (BuildConfig.DEBUG) {
// startActivity(new Intent(LogoActivity.this, MainActivity.class));
// finish();
// } else {
handler = new Handler();
runnable = new Runnable() {
@Override
public void run() {
startActivity(new Intent(LogoActivity.this, MainActivity.class));
finish();
}
};
handler.postDelayed(runnable, 1000);
Toast.makeText(LogoActivity.this, R.string.logo_text, Toast.LENGTH_SHORT).show();
// }
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment