Skip to content

Commit

Permalink
Listen app config changes only for branded plus clients
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed May 3, 2024
1 parent 1c19499 commit 5202593
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/owncloud/android/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ public void onCreate() {
setAppTheme(preferences.getDarkThemeMode());
super.onCreate();

// Listen app config changes
ContextExtensionsKt.registerBroadcastReceiver(this, restrictionsReceiver, restrictionsFilter, ReceiverFlag.NotExported);

ProcessLifecycleOwner.get().getLifecycle().addObserver(lifecycleEventObserver);

insertConscrypt();
Expand Down Expand Up @@ -330,6 +327,9 @@ public void onCreate() {
RestrictionsManager restrictionsManager = (RestrictionsManager) getSystemService(Context.RESTRICTIONS_SERVICE);
appConfigManager = new AppConfigManager(this, restrictionsManager.getApplicationRestrictions());
appConfigManager.setProxyConfig(isClientBrandedPlus());

// Listen app config changes
ContextExtensionsKt.registerBroadcastReceiver(this, restrictionsReceiver, restrictionsFilter, ReceiverFlag.NotExported);
} else {
setProxyForNonBrandedPlusClients();
}
Expand Down

0 comments on commit 5202593

Please sign in to comment.