mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
onNewIntent(Intent) method has been added to ZLAndroidActivity
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1094 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
7bebf46226
commit
c481502332
5 changed files with 16 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
|||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<application android:name="org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication" android:icon="@drawable/fbreader" android:label="FBReader">
|
||||
<activity android:name=".library.BugReportActivity" android:label="FBReader crash" android:configChanges="orientation|keyboardHidden"/>
|
||||
<activity android:name="org.geometerplus.android.fbreader.FBReader" android:icon="@drawable/fbreader" android:label="FBReader" android:configChanges="orientation|keyboardHidden">
|
||||
<activity android:name="org.geometerplus.android.fbreader.FBReader" android:launchMode="singleTask" android:icon="@drawable/fbreader" android:label="FBReader" android:configChanges="orientation|keyboardHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<application android:name="org.geometerplus.zlibrary.ui.android.library.ZLAndroidApplication" android:icon="@drawable/fbreader" android:label="FBReader">
|
||||
<activity android:name=".library.BugReportActivity" android:label="FBReader crash" android:configChanges="orientation|keyboardHidden"/>
|
||||
<activity android:name="org.geometerplus.android.fbreader.FBReader" android:icon="@drawable/fbreader" android:label="FBReader" android:configChanges="orientation|keyboardHidden">
|
||||
<activity android:name="org.geometerplus.android.fbreader.FBReader" android:launchMode="singleTask" android:icon="@drawable/fbreader" android:label="FBReader" android:configChanges="orientation|keyboardHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
@ -146,11 +146,11 @@ public class BookDownloader extends Activity {
|
|||
|
||||
private void runFBReader(final File file) {
|
||||
finish();
|
||||
final Activity oldActivity = org.geometerplus.android.fbreader.FBReader.Instance;
|
||||
/*final Activity oldActivity = org.geometerplus.android.fbreader.FBReader.Instance;
|
||||
if (oldActivity != null) {
|
||||
oldActivity.finish();
|
||||
}
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromFile(file), this, FBReader.class));
|
||||
}*/
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromFile(file), this, FBReader.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
|
||||
}
|
||||
|
||||
private void startFileDownload(final String uriString, final File file) {
|
||||
|
|
|
@ -62,6 +62,7 @@ public class FBReader extends ZLAndroidActivity {
|
|||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
System.err.println("FBREADER -- ON CREATE");
|
||||
/*
|
||||
android.telephony.TelephonyManager tele =
|
||||
(android.telephony.TelephonyManager)getSystemService(TELEPHONY_SERVICE);
|
||||
|
@ -83,6 +84,7 @@ public class FBReader extends ZLAndroidActivity {
|
|||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
System.err.println("FBREADER -- ON START");
|
||||
final ZLAndroidApplication application = ZLAndroidApplication.Instance();
|
||||
|
||||
final int fullScreenFlag =
|
||||
|
@ -119,6 +121,7 @@ public class FBReader extends ZLAndroidActivity {
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
System.err.println("FBREADER -- ON RESUME");
|
||||
if (myPanel.ControlPanel != null) {
|
||||
myPanel.ControlPanel.setVisibility(myPanel.Visible ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
@ -134,6 +137,7 @@ public class FBReader extends ZLAndroidActivity {
|
|||
|
||||
@Override
|
||||
public void onPause() {
|
||||
System.err.println("FBREADER -- ON PAUSE");
|
||||
if (myWakeLock != null) {
|
||||
myWakeLock.release();
|
||||
}
|
||||
|
@ -145,6 +149,7 @@ public class FBReader extends ZLAndroidActivity {
|
|||
|
||||
@Override
|
||||
public void onStop() {
|
||||
System.err.println("FBREADER -- ON STOP");
|
||||
if (myPanel.ControlPanel != null) {
|
||||
myPanel.ControlPanel.hide(false);
|
||||
myPanel.ControlPanel = null;
|
||||
|
|
|
@ -73,6 +73,12 @@ public abstract class ZLAndroidActivity extends Activity {
|
|||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
System.err.println("FBREADER -- ON NEW INTENT");
|
||||
}
|
||||
|
||||
private static ZLAndroidLibrary getLibrary() {
|
||||
return (ZLAndroidLibrary)ZLAndroidLibrary.Instance();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue