Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
Add back supervised user patch to extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
wchen342 committed Jun 8, 2020
1 parent a497727 commit 6ebd582
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
54 changes: 54 additions & 0 deletions patches/Extensions/base/fix-disabled-supervised-user.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From: Wengling Chen <[email protected]>
Date: Sat, 30 May 2020 18:25:38 -0400
Subject: fix for enable_supervised_users=false

---
chrome/android/BUILD.gn | 1
chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java | 14 ----------
2 files changed, 15 deletions(-)

--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2718,7 +2718,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/browsing_data/BrowsingDataCounterBridge.java",
"java/src/org/chromium/chrome/browser/browsing_data/UrlFilterBridge.java",
"java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java",
- "java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java",
"java/src/org/chromium/chrome/browser/complex_tasks/TaskTabHelper.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java",
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
@@ -60,32 +60,18 @@ public class ChildAccountService {
* @param callback the callback to be called when the status changes.
*/
public static void listenForStatusChange(Callback<Boolean> callback) {
- ChildAccountServiceJni.get().listenForChildStatusReceived(callback);
}

- @CalledByNative
private static void reauthenticateChildAccount(
WindowAndroid windowAndroid, String accountName, final long nativeCallback) {
ThreadUtils.assertOnUiThread();

Activity activity = windowAndroid.getActivity().get();
if (activity == null) {
- PostTask.postTask(UiThreadTaskTraits.DEFAULT,
- ()
- -> ChildAccountServiceJni.get().onReauthenticationResult(
- nativeCallback, false));
return;
}

Account account = AccountUtils.createAccountFromName(accountName);
- AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity,
- result
- -> ChildAccountServiceJni.get().onReauthenticationResult(nativeCallback, result));
}

- @NativeMethods
- interface Natives {
- void listenForChildStatusReceived(Callback<Boolean> callback);
- void onReauthenticationResult(long callbackPtr, boolean reauthSuccessful);
- }
}
2 changes: 1 addition & 1 deletion patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ src-fix/fix-null-mInstanceID.patch
src-fix/fix-unkown-warning-clang-9.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-prefs.patch
src-fix/fix-disabled-supervised-user.patch
Extensions/base/fix-disabled-supervised-user.patch
Extensions/base/gn.patch
Extensions/base/src.patch
Extensions/base/res.patch
Expand Down

0 comments on commit 6ebd582

Please sign in to comment.