summaryrefslogtreecommitdiff
path: root/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java')
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 1778e3597f88..6ca7b4dcf778 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -136,8 +136,6 @@ public class LibreOfficeMainActivity extends Activity {
LayerView layerView = (LayerView) findViewById(R.id.layer_view);
mLayerController.setView(layerView);
mLayerController.setLayerClient(mLayerClient);
-
- LOKitShell.sendEvent(LOEventFactory.load(mInputFile));
}
@Override
@@ -156,11 +154,13 @@ public class LibreOfficeMainActivity extends Activity {
protected void onStart() {
Log.i(LOGTAG, "onStart..");
super.onStart();
+ LOKitShell.sendEvent(LOEventFactory.load(mInputFile));
}
@Override
protected void onStop() {
Log.i(LOGTAG, "onStop..");
+ LOKitShell.sendEvent(LOEventFactory.close());
super.onStop();
}
@@ -199,21 +199,19 @@ public class LibreOfficeMainActivity extends Activity {
builder.setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() {
@Override
- public void onClick(View view) {
- Intent intent = new Intent(view.getContext(), LibreOfficeMainActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- intent.setData(Uri.parse("file:///assets/license.txt"));
- startActivity(intent);
+ public void onClick(DialogInterface dialog, int id) {
+ LOKitShell.sendEvent(LOEventFactory.close());
+ LOKitShell.sendEvent(LOEventFactory.load("/assets/license.txt"));
+ dialog.dismiss();
}
});
builder.setPositiveButton(R.string.about_notice, new DialogInterface.OnClickListener() {
@Override
- public void onClick(View view) {
- Intent intent = new Intent(view.getContext(), LibreOfficeMainActivity.class);
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- intent.setData(Uri.parse("file:///assets/notice.txt"));
- startActivity(intent);
+ public void onClick(DialogInterface dialog, int id) {
+ LOKitShell.sendEvent(LOEventFactory.close());
+ LOKitShell.sendEvent(LOEventFactory.load("/assets/notice.txt"));
+ dialog.dismiss();
}
});