Commit 4f4d3af5 authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Signin][Android] Remove redundant check for old Robolectric

This CL removes a null check for Robolectic version < 3.7. Since our
current Robolectric version is 4.3, we don't need this check anymore.

Bug: 779568
Change-Id: I6a325a807304efb3769c5291e82c127250ecdb66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152835Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760568}
parent 7ad1d28c
...@@ -406,10 +406,6 @@ public class AccountManagerFacadeImpl implements AccountManagerFacade { ...@@ -406,10 +406,6 @@ public class AccountManagerFacadeImpl implements AccountManagerFacade {
Context context = ContextUtils.getApplicationContext(); Context context = ContextUtils.getApplicationContext();
UserManager userManager = (UserManager) context.getSystemService(Context.USER_SERVICE); UserManager userManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
Bundle appRestrictions = userManager.getApplicationRestrictions(context.getPackageName()); Bundle appRestrictions = userManager.getApplicationRestrictions(context.getPackageName());
// TODO(https://crbug.com/779568): Remove this after migrating to Robolectric 3.7+.
// Android guarantees that getApplicationRestrictions result won't be null, but
// Robolectric versions 3.6 and older don't respect this.
if (appRestrictions == null) appRestrictions = new Bundle();
return appRestrictions.getStringArray(ACCOUNT_RESTRICTION_PATTERNS_KEY); return appRestrictions.getStringArray(ACCOUNT_RESTRICTION_PATTERNS_KEY);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment