From c0a4e64933a45952af92164c1a81a1fae89f2686 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Mon, 4 Apr 2016 18:16:39 +0800 Subject: [PATCH] added incompatible message for shitty devices --- twidere/build.gradle | 4 +- .../twidere/util/TwidereBugReporter.java | 10 +++++ twidere/src/main/AndroidManifest.xml | 4 ++ .../activity/IncompatibleAlertActivity.java | 41 +++++++++++++++++++ .../twidere/activity/MainActivity.java | 10 ++++- .../org/mariotaku/twidere/util/Utils.java | 11 +++++ .../layout/activity_device_incompatible.xml | 31 ++++++++++++++ twidere/src/main/res/values/strings.xml | 2 + 8 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 twidere/src/main/java/org/mariotaku/twidere/activity/IncompatibleAlertActivity.java create mode 100644 twidere/src/main/res/layout/activity_device_incompatible.xml diff --git a/twidere/build.gradle b/twidere/build.gradle index 21775ebbd..51defd498 100644 --- a/twidere/build.gradle +++ b/twidere/build.gradle @@ -21,8 +21,8 @@ android { applicationId "org.mariotaku.twidere" minSdkVersion 14 targetSdkVersion 23 - versionCode 183 - versionName "3.1.3.2" + versionCode 184 + versionName "3.1.3.3" multiDexEnabled true generatedDensities = [] diff --git a/twidere/src/google/java/org/mariotaku/twidere/util/TwidereBugReporter.java b/twidere/src/google/java/org/mariotaku/twidere/util/TwidereBugReporter.java index 63dfd9405..d0477512a 100644 --- a/twidere/src/google/java/org/mariotaku/twidere/util/TwidereBugReporter.java +++ b/twidere/src/google/java/org/mariotaku/twidere/util/TwidereBugReporter.java @@ -20,10 +20,12 @@ package org.mariotaku.twidere.util; import android.app.Application; +import android.os.Build; import android.support.annotation.NonNull; import com.crashlytics.android.Crashlytics; +import org.mariotaku.twidere.BuildConfig; import org.mariotaku.twidere.Constants; import io.fabric.sdk.android.Fabric; @@ -46,6 +48,14 @@ public class TwidereBugReporter extends BugReporter implements Constants { @Override protected void initImpl(final Application application) { Fabric.with(application, new Crashlytics()); + Crashlytics.setBool("debug", BuildConfig.DEBUG); + Crashlytics.setString("build.brand", Build.BRAND); + Crashlytics.setString("build.device", Build.DEVICE); + Crashlytics.setString("build.display", Build.DISPLAY); + Crashlytics.setString("build.hardware", Build.HARDWARE); + Crashlytics.setString("build.manufacturer", Build.MANUFACTURER); + Crashlytics.setString("build.model", Build.MODEL); + Crashlytics.setString("build.product", Build.PRODUCT); } } diff --git a/twidere/src/main/AndroidManifest.xml b/twidere/src/main/AndroidManifest.xml index 4d54f74ba..314baeb81 100644 --- a/twidere/src/main/AndroidManifest.xml +++ b/twidere/src/main/AndroidManifest.xml @@ -447,6 +447,10 @@ android:label="@string/crop_image" android:theme="@style/Theme.Twidere.NoActionBar" android:windowSoftInputMode="adjustResize"/> + + + + + + + + + + + + \ No newline at end of file diff --git a/twidere/src/main/res/values/strings.xml b/twidere/src/main/res/values/strings.xml index f9302f940..ee089242f 100644 --- a/twidere/src/main/res/values/strings.xml +++ b/twidere/src/main/res/values/strings.xml @@ -792,4 +792,6 @@ Group Your coarse location Countrywide + Incompatible device + This device is not compatible with Twidere, upgrade to latest Android OS is recommended.\nYou can send information below to help me add report this issue to device manufacturer. \ No newline at end of file