mirror of https://github.com/M66B/FairEmail.git
Redme Note warning
This commit is contained in:
parent
c9bb6fe07b
commit
330ffaa7f2
|
@ -247,7 +247,6 @@ import java.util.function.Consumer;
|
|||
import javax.mail.Address;
|
||||
import javax.mail.MessageRemovedException;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Part;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
|
@ -4526,12 +4525,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
// Restart spinner
|
||||
swipeRefresh.resetRefreshing();
|
||||
|
||||
if (!checkDoze())
|
||||
if (!checkReporting())
|
||||
if (!checkReview())
|
||||
if (!checkFingerprint())
|
||||
if (!checkGmail())
|
||||
checkOutlook();
|
||||
if (!checkRedmiNote())
|
||||
if (!checkDoze())
|
||||
if (!checkReporting())
|
||||
if (!checkReview())
|
||||
if (!checkFingerprint())
|
||||
if (!checkGmail())
|
||||
checkOutlook();
|
||||
|
||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
||||
onSharedPreferenceChanged(prefs, "pro");
|
||||
|
@ -4641,6 +4641,30 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
grpAirplane.setVisibility(on ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
private boolean checkRedmiNote() {
|
||||
if (!Helper.isRedmiNote())
|
||||
return false;
|
||||
|
||||
final Context context = getContext();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean redmi_note = prefs.getBoolean("redmi_note", true);
|
||||
if (!redmi_note)
|
||||
return false;
|
||||
|
||||
final Snackbar snackbar = Snackbar.make(view, R.string.app_data_loss, Snackbar.LENGTH_INDEFINITE)
|
||||
.setGestureInsetBottomIgnored(true);
|
||||
snackbar.setAction(R.string.title_info, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
prefs.edit().putBoolean("redmi_note", false).apply();
|
||||
Helper.view(v.getContext(), Uri.parse("https://github.com/M66B/FairEmail/blob/master/FAQ.md#redmi"), false);
|
||||
}
|
||||
});
|
||||
snackbar.show();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean checkDoze() {
|
||||
if (viewType != AdapterMessage.ViewType.UNIFIED)
|
||||
return false;
|
||||
|
|
|
@ -242,7 +242,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
"gmail_checked",
|
||||
"eml_auto_confirm",
|
||||
"open_with_pkg", "open_with_tabs",
|
||||
"gmail_checked", "outlook_checked"
|
||||
"gmail_checked", "outlook_checked",
|
||||
"redmi_note"
|
||||
};
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1224,6 +1224,16 @@ public class Helper {
|
|||
return "Xiaomi".equalsIgnoreCase(Build.MANUFACTURER);
|
||||
}
|
||||
|
||||
static boolean isRedmiNote() {
|
||||
// Manufacturer: Xiaomi
|
||||
// Model: Redmi Note 8 Pro
|
||||
// Model: Redmi Note 10S
|
||||
return isXiaomi() &&
|
||||
!TextUtils.isEmpty(Build.MODEL) &&
|
||||
Build.MODEL.toLowerCase(Locale.ROOT).contains("redmi") &&
|
||||
Build.MODEL.toLowerCase(Locale.ROOT).contains("note");
|
||||
}
|
||||
|
||||
static boolean isMeizu() {
|
||||
return "Meizu".equalsIgnoreCase(Build.MANUFACTURER);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<string name="app_limitations">For example, messages are reformatted by default to remove unsafe elements and to improve readability, and opening links needs to be confirmed for safety. Both can be disabled if desired.</string>
|
||||
<string name="app_eula" translatable="false">THIS SOFTWARE IS PROVIDED BY THE AUTHOR \'\'AS IS\'\' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</string>
|
||||
<string name="app_unsupported">Bugs in the Android version of this particular device cause crashes</string>
|
||||
<string name="app_data_loss">All data may be lost</string>
|
||||
<string name="app_continue">Continue anyway</string>
|
||||
<string name="app_exit">Go \'back\' again to exit</string>
|
||||
<string name="app_cake">Insufficient storage space left</string>
|
||||
|
|
Loading…
Reference in New Issue