aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/WelcomeActivity.java42
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java7
5 files changed, 1 insertions, 51 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java
index 03258712e..2bb9dfd9d 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java
@@ -13,7 +13,6 @@ import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
-import android.support.v4.app.ActivityCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
diff --git a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
index bca5ee183..ffa9018ec 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowFullscreenMessageActivity.java
@@ -12,7 +12,6 @@ import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
-import android.view.Window;
import android.view.WindowManager;
import android.webkit.MimeTypeMap;
import android.widget.ImageButton;
diff --git a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
index 3bfecddfa..1eac42936 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
@@ -1,7 +1,6 @@
package de.pixart.messenger.ui;
import android.Manifest;
-import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
diff --git a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
index 1297f0fd2..b28a7f414 100644
--- a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
@@ -7,11 +7,9 @@ import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
-import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
-import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
@@ -30,7 +28,6 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
-import java.util.List;
import javax.crypto.NoSuchPaddingException;
@@ -248,33 +245,7 @@ public class WelcomeActivity extends Activity {
Log.d(Config.LOGTAG, "Delete temp file from " + TempFile.toString());
TempFile.delete();
}
-
- Log.d(Config.LOGTAG, "New Features - Uninstall old version of Pix-Art Messenger");
- if (isPackageInstalled("eu.siacs.conversations")) {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setMessage(R.string.uninstall_app_text)
- .setPositiveButton(R.string.uninstall, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialogInterface, int i) {
- //start the deinstallation of old version
- if (isPackageInstalled("eu.siacs.conversations")) {
- Uri packageURI_VR = Uri.parse("package:eu.siacs.conversations");
- Intent uninstallIntent_VR = new Intent(Intent.ACTION_UNINSTALL_PACKAGE, packageURI_VR);
- if (uninstallIntent_VR.resolveActivity(getPackageManager()) != null) {
- startActivity(uninstallIntent_VR);
- }
- }
- }
- })
- .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialogInterface, int i) {
- Log.d(Config.LOGTAG, "New Features - Uninstall cancled");
- restart();
- }
- });
- builder.create().show();
- } else {
- restart();
- }
+ restart();
}
private void restart() {
@@ -287,17 +258,6 @@ public class WelcomeActivity extends Activity {
System.exit(0);
}
- private boolean isPackageInstalled(String targetPackage) {
- List<ApplicationInfo> packages;
- PackageManager pm;
- pm = getPackageManager();
- packages = pm.getInstalledApplications(0);
- for (ApplicationInfo packageInfo : packages) {
- if (packageInfo.packageName.equals(targetPackage)) return true;
- }
- return false;
- }
-
public boolean hasStoragePermission(int requestCode) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index 051b660bd..6503cbb41 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -7,10 +7,7 @@ import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
-import android.app.Notification;
-import android.app.NotificationManager;
import android.app.PendingIntent;
-import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.ClipboardManager;
@@ -22,7 +19,6 @@ import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
-import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
@@ -44,7 +40,6 @@ import android.os.IBinder;
import android.os.PowerManager;
import android.os.SystemClock;
import android.preference.PreferenceManager;
-import android.support.v4.app.NotificationCompat;
import android.text.InputType;
import android.util.DisplayMetrics;
import android.util.Log;
@@ -99,8 +94,6 @@ import de.pixart.messenger.xmpp.OnUpdateBlocklist;
import de.pixart.messenger.xmpp.jid.InvalidJidException;
import de.pixart.messenger.xmpp.jid.Jid;
-import static de.pixart.messenger.services.NotificationService.NOTIFICATION_ID;
-
public abstract class XmppActivity extends Activity {
protected static final int REQUEST_ANNOUNCE_PGP = 0x0101;