Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Revert commit (1baac24) partly
Browse files Browse the repository at this point in the history
Remove chinese phone info pop up message.
  • Loading branch information
Unknown committed Nov 14, 2017
1 parent 30ef8a7 commit ef6573d
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions app/src/main/java/de/pscom/pietsmiet/view/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public void onHidden(FloatingActionButton fab) {

if (SettingsHelper.boolAppFirstRun) {
displayNotificationSelection();
displayChinesePhoneWarning(this);

// Set AppFirstRun to false //todo maybe position this in OnDestroy / OnPause, because of logic
SettingsHelper.boolAppFirstRun = false;
Expand Down Expand Up @@ -187,27 +186,6 @@ private void displayNotificationSelection() {
builder.create().show();
}


private static void displayChinesePhoneWarning(Context context) {
String manufacturer = Build.MANUFACTURER.toLowerCase(Locale.ENGLISH).replace(" ", "");
String message = null;
if (manufacturer.contains("vivo") || manufacturer.contains("oppo") || manufacturer.contains("zte")) {
message = context.getString(R.string.dialog_chinese_phone_general, context.getString(R.string.dialog_chinese_phone_other));
} else if (manufacturer.contains("xiaomi")) {
message = context.getString(R.string.dialog_chinese_phone_general, context.getString(R.string.dialog_chinese_phone_xiaomi));
} else if (manufacturer.contains("oneplus")) {
message = context.getString(R.string.dialog_chinese_phone_general, context.getString(R.string.dialog_chinese_phone_oneplus));
}
if (message != null) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(message)
.setNeutralButton(R.string.close, (dialog, id) -> {
});
builder.create().show();
}

}

@Override
public void onDestroy() {
super.onDestroy();
Expand Down

0 comments on commit ef6573d

Please sign in to comment.