Skip to content

Commit

Permalink
Revert java sources to master
Browse files Browse the repository at this point in the history
  • Loading branch information
deeppandya committed Dec 17, 2024
1 parent 6aa385e commit 5fcb32b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 37 deletions.
12 changes: 9 additions & 3 deletions android/brave_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ brave_java_sources = [
"../../brave/android/java/org/chromium/chrome/browser/partnercustomizations/CloseBraveManager.java",
"../../brave/android/java/org/chromium/chrome/browser/password_manager/settings/BraveExportFlow.java",
"../../brave/android/java/org/chromium/chrome/browser/password_manager/settings/BravePasswordSettingsBase.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistHostActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistServiceFactoryAndroid.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistServiceObserverImpl.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistStreamingObserverImpl.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/hls_content/HlsServiceImpl.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/hls_content/HlsUtils.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/settings/BravePlaylistPreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/settings/BravePlaylistResetPreference.java",
"../../brave/android/java/org/chromium/chrome/browser/preferences/BravePrefServiceBridge.java",
"../../brave/android/java/org/chromium/chrome/browser/preferences/website/BraveShieldsContentSettings.java",
"../../brave/android/java/org/chromium/chrome/browser/preferences/website/BraveShieldsContentSettingsObserver.java",
Expand Down Expand Up @@ -518,7 +526,6 @@ brave_java_sources += brave_feed_java_sources
brave_java_sources += brave_public_tab_management_java_sources
brave_java_sources += brave_share_java_sources
brave_java_sources += brave_app_billing_sources
brave_java_sources += brave_playlist_sources

brave_browser_ui_android_appmenu_internal_sources = [ "//brave/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/BraveAppMenu.java" ]

Expand All @@ -543,12 +550,11 @@ brave_java_base_sources = [

brave_java_base_module_sources = [
"//brave/android/java/org/chromium/chrome/browser/base/SplitCompatJobIntentService.java",
"//brave/android/java/org/chromium/chrome/browser/playlist/hls_content/HlsService.java",
"//brave/android/java/org/chromium/chrome/browser/upgrade/BraveUpgradeJobIntentService.java",
"//brave/android/java/org/chromium/chrome/browser/vpn/wireguard/WireguardService.java",
]

brave_java_base_module_sources += brave_java_base_module_playlist_sources

brave_java_base_module_deps = [
"//brave/third_party/android_deps:com_wireguard_android_java",
"//third_party/androidx:androidx_core_core_java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.BraveRelaunchUtils;
import org.chromium.chrome.browser.playlist.PlaylistServiceFactoryAndroid;
import org.chromium.chrome.browser.playlist.local_database.PlaylistRepository;
import org.chromium.chrome.browser.playlist.util.PlaylistPreferenceUtils;
Expand Down Expand Up @@ -77,6 +78,13 @@ public void onActivityCreated(Bundle savedInstanceState) {
playlistRepository.deleteAllLastPlayedPosition();
playlistRepository.deleteAllHlsContentQueueModel();
PlaylistPreferenceUtils.resetPlaylistPrefs(getActivity());
getActivity()
.runOnUiThread(
(Runnable)
() ->
BraveRelaunchUtils
.askForRelaunch(
getActivity()));
});
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@

import org.chromium.chrome.R;

/**
* The preference used to reset Brave Playlist.
*/
public class BravePlaylistResetPreference
extends Preference implements Preference.OnPreferenceClickListener {
private String TAG = "BravePlaylistResetPreference";
/** The preference used to reset Brave Playlist. */
public class BravePlaylistResetPreference extends Preference
implements Preference.OnPreferenceClickListener {
private static final String TAG = "BravePlaylistResetPreference";

private int mPrefAccentColor;

Expand Down
13 changes: 0 additions & 13 deletions android/java/org/chromium/chrome/browser/playlist/sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,3 @@ brave_app_playlist_deps = [
"//brave/third_party/android_deps:androidx_media3_media3_exoplayer_hls_java",
"//third_party/androidx:androidx_media3_media3_common_java",
]

brave_playlist_sources = [
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistHostActivity.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistServiceFactoryAndroid.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistServiceObserverImpl.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/PlaylistStreamingObserverImpl.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/hls_content/HlsServiceImpl.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/hls_content/HlsUtils.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/settings/BravePlaylistPreferences.java",
"../../brave/android/java/org/chromium/chrome/browser/playlist/settings/BravePlaylistResetPreference.java",
]

brave_java_base_module_playlist_sources = [ "//brave/android/java/org/chromium/chrome/browser/playlist/hls_content/HlsService.java" ]
14 changes: 0 additions & 14 deletions browser/playlist/android/sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,5 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.

import("//brave/components/playlist/common/buildflags/buildflags.gni")

brave_browser_playlist_sources = []
brave_browser_playlist_deps = []

if (enable_playlist && is_android) {
brave_browser_playlist_sources += [ "playlist_service_factory_android.cc" ]

brave_browser_playlist_deps += [
"//brave/build/android:jni_headers",
"//mojo/public/cpp/bindings",
]
}

brave_playlist_kt_allowlist =
[ "java/src/org/chromium/chrome/browser/playlist/*.kt" ]
11 changes: 10 additions & 1 deletion browser/playlist/sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ if (enable_playlist) {
"//components/pref_registry:pref_registry",
]

if (!is_android) {
if (is_android) {
brave_browser_playlist_sources += [
"//brave/browser/playlist/android/playlist_service_factory_android.cc",
]

brave_browser_playlist_deps += [
"//brave/build/android:jni_headers",
"//mojo/public/cpp/bindings",
]
} else {
brave_browser_playlist_sources += [
"//brave/browser/playlist/playlist_data_source.cc",
"//brave/browser/playlist/playlist_data_source.h",
Expand Down

0 comments on commit 5fcb32b

Please sign in to comment.