Prevent NPE
If two threads call EmailContent.init(), one of them may use uninitialized EmailContent contstants Bug: 10355491 Change-Id: Iedcad01345989df62baf755bf4d63c123e307b7c
This commit is contained in:
parent
ea69cbe533
commit
5440a40532
@ -129,7 +129,7 @@ public abstract class EmailContent {
|
||||
public static Uri ACCOUNT_CHECK_URI;
|
||||
public static String PROVIDER_PERMISSION;
|
||||
|
||||
public static void init(Context context) {
|
||||
public static synchronized void init(Context context) {
|
||||
if (AUTHORITY == null) {
|
||||
PACKAGE_NAME = context.getPackageName();
|
||||
EMAIL_PACKAGE_NAME = PACKAGE_NAME;
|
||||
|
Loading…
Reference in New Issue
Block a user