Skip to content

Commit

Permalink
Remove meaningless enable check
Browse files Browse the repository at this point in the history
Reviewed By: tianqibt

Differential Revision: D18967766

fbshipit-source-id: 967f4162667352454a2b72e2cec93cf77fa84d8c
  • Loading branch information
Cecily Jiang authored and facebook-github-bot committed Dec 12, 2019
1 parent c52527a commit 2a25647
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ public synchronized static void enable() {
initialize();
}

public static synchronized void initialize() {
if (!enabled) {
return;
}

private static synchronized void initialize() {
try {
FetchedAppSettings settings = FetchedAppSettingsManager.queryAppSettings(
FacebookSdk.getApplicationId(), false);
Expand Down Expand Up @@ -159,7 +155,7 @@ public static void processParameters(Map<String, String> parameters, String even

parameters.put("_restrictedParams", restrictedJSON.toString());
} catch (JSONException e) {
Log.w(TAG, "processParameters failed", e);
/* swallow */
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void testInitialize() throws Exception {
BDDMockito.given(FetchedAppSettingsManager.queryAppSettings(Matchers.anyString(),
Matchers.anyBoolean())).willReturn(fetchedAppSettings);

RestrictiveDataManager.initialize();
RestrictiveDataManager.enable();

List<RestrictiveDataManager.RestrictiveParam> restrictiveParams =
Whitebox.getInternalState(RestrictiveDataManager.class, "restrictiveParams");
Expand Down

0 comments on commit 2a25647

Please sign in to comment.