am f96bffa6: Suppress important notice when its title message is empty
* commit 'f96bffa69e5fa01b0bf53fb3af8c8b3539852322': Suppress important notice when its title message is emptymain
commit
785e59613e
|
@ -20,6 +20,7 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.provider.Settings.SettingNotFoundException;
|
import android.provider.Settings.SettingNotFoundException;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.inputmethod.latin.InputAttributes;
|
import com.android.inputmethod.latin.InputAttributes;
|
||||||
|
@ -82,7 +83,17 @@ public final class ImportantNoticeUtils {
|
||||||
if (inputAttributes == null || inputAttributes.mIsPasswordField) {
|
if (inputAttributes == null || inputAttributes.mIsPasswordField) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return hasNewImportantNotice(context) && !isInSystemSetupWizard(context);
|
if (isInSystemSetupWizard(context)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasNewImportantNotice(context)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final String importantNoticeTitle = getNextImportantNoticeTitle(context);
|
||||||
|
if (TextUtils.isEmpty(importantNoticeTitle)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateLastImportantNoticeVersion(final Context context) {
|
public static void updateLastImportantNoticeVersion(final Context context) {
|
||||||
|
|
Loading…
Reference in New Issue