diff --git a/AdvancedDisplay/src/org/lineageos/settings/device/AdvancedDisplayActivity.java b/AdvancedDisplay/src/org/lineageos/settings/device/AdvancedDisplayActivity.java
index 774919e7..29dfc735 100644
--- a/AdvancedDisplay/src/org/lineageos/settings/device/AdvancedDisplayActivity.java
+++ b/AdvancedDisplay/src/org/lineageos/settings/device/AdvancedDisplayActivity.java
@@ -19,14 +19,14 @@ package org.lineageos.settings.device;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
-import com.android.settingslib.widget.R;
public class AdvancedDisplayActivity extends CollapsingToolbarBaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- getFragmentManager().beginTransaction().replace(R.id.content_frame,
+ getFragmentManager().beginTransaction().replace(
+ com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new AdvancedDisplayFragment()).commit();
}
}
diff --git a/Android.mk b/Android.mk
index fc3385bf..9a975153 100644
--- a/Android.mk
+++ b/Android.mk
@@ -37,7 +37,6 @@ endif
ifeq ($(BOARD_VENDOR),samsung)
include $(SAM_ROOT)/audio/Android.mk
-include $(SAM_ROOT)/doze/Android.mk
include $(SAM_ROOT)/hidl/Android.mk
include $(SAM_ROOT)/modemloader/Android.mk
include $(SAM_ROOT)/ril/Android.mk
diff --git a/aidl/fingerprint/Android.bp b/aidl/fingerprint/Android.bp
index e67e23a0..7565911c 100644
--- a/aidl/fingerprint/Android.bp
+++ b/aidl/fingerprint/Android.bp
@@ -21,8 +21,8 @@ cc_binary {
"libbase",
"libbinder_ndk",
"libhardware",
- "android.hardware.biometrics.fingerprint-V3-ndk",
- "android.hardware.biometrics.common-V3-ndk",
+ "android.hardware.biometrics.fingerprint-V4-ndk",
+ "android.hardware.biometrics.common-V4-ndk",
"android.hardware.biometrics.common.util",
],
static_libs: ["libandroid.hardware.biometrics.fingerprint.SamsungProps"],
diff --git a/aidl/thermal/Android.bp b/aidl/thermal/Android.bp
index d2c03c5e..f3987696 100644
--- a/aidl/thermal/Android.bp
+++ b/aidl/thermal/Android.bp
@@ -27,7 +27,7 @@ cc_binary {
"libutils",
"libnl",
"libbinder_ndk",
- "android.frameworks.stats-V1-ndk",
+ "android.frameworks.stats-V2-ndk",
"android.hardware.power-V1-ndk",
"android.hardware.thermal-V1-ndk",
"pixel-power-ext-V1-ndk",
@@ -37,7 +37,7 @@ cc_binary {
"libpixelstats",
],
export_shared_lib_headers: [
- "android.frameworks.stats-V1-ndk",
+ "android.frameworks.stats-V2-ndk",
"pixelatoms-cpp",
],
cflags: [
diff --git a/dap/res/xml/dolby_settings.xml b/dap/res/xml/dolby_settings.xml
index a494eb6f..94f829c2 100644
--- a/dap/res/xml/dolby_settings.xml
+++ b/dap/res/xml/dolby_settings.xml
@@ -12,40 +12,40 @@
android:key="dolby_top_intro"
android:title="@string/dolby_top_intro_summary" />
-
-
-
-
-
-
-
-
-
diff --git a/dap/src/org/lineageos/dap/DolbyActivity.kt b/dap/src/org/lineageos/dap/DolbyActivity.kt
index f12a30f6..4c437c40 100644
--- a/dap/src/org/lineageos/dap/DolbyActivity.kt
+++ b/dap/src/org/lineageos/dap/DolbyActivity.kt
@@ -19,13 +19,12 @@ package org.lineageos.dap
import android.os.Bundle
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity
-import com.android.settingslib.widget.R
class DolbyActivity : CollapsingToolbarBaseActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
fragmentManager.beginTransaction().replace(
- R.id.content_frame,
+ com.android.settingslib.collapsingtoolbar.R.id.content_frame,
DolbyFragment()
).commit()
}
diff --git a/dap/src/org/lineageos/dap/DolbyFragment.kt b/dap/src/org/lineageos/dap/DolbyFragment.kt
index 2331b65f..ff68a90a 100644
--- a/dap/src/org/lineageos/dap/DolbyFragment.kt
+++ b/dap/src/org/lineageos/dap/DolbyFragment.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 The LineageOS Project
+ * Copyright (C) 2022-2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,17 +17,17 @@
package org.lineageos.dap
import android.os.Bundle
-import android.widget.Switch
+import android.widget.CompoundButton
+import android.widget.CompoundButton.OnCheckedChangeListener
import androidx.preference.PreferenceFragment
import com.android.settingslib.widget.MainSwitchPreference
-import com.android.settingslib.widget.OnMainSwitchChangeListener
-import com.android.settingslib.widget.RadioButtonPreference
+import com.android.settingslib.widget.SelectorWithWidgetPreference
import org.lineageos.dap.R
-class DolbyFragment : PreferenceFragment(), OnMainSwitchChangeListener {
+class DolbyFragment : PreferenceFragment(), OnCheckedChangeListener {
private lateinit var switchBar: MainSwitchPreference
@@ -39,7 +39,7 @@ class DolbyFragment : PreferenceFragment(), OnMainSwitchChangeListener {
switchBar.isChecked = DolbyCore.isEnabled()
for ((key, value) in PREF_DOLBY_MODES) {
- val preference = findPreference(key)!!
+ val preference = findPreference(key)!!
preference.setOnPreferenceClickListener {
setProfile(value)
true
@@ -47,7 +47,7 @@ class DolbyFragment : PreferenceFragment(), OnMainSwitchChangeListener {
}
}
- override fun onSwitchChanged(switchView: Switch, isChecked: Boolean) {
+ override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
DolbyCore.setEnabled(isChecked)
}
@@ -55,7 +55,7 @@ class DolbyFragment : PreferenceFragment(), OnMainSwitchChangeListener {
DolbyCore.setProfile(profile)
for ((key, value) in PREF_DOLBY_MODES) {
- val preference = findPreference(key)!!
+ val preference = findPreference(key)!!
preference.isChecked = value == profile
}
}
diff --git a/doze/Android.bp b/doze/Android.bp
new file mode 100644
index 00000000..51322fd6
--- /dev/null
+++ b/doze/Android.bp
@@ -0,0 +1,27 @@
+//
+// Copyright (C) 2024 The Pixel Experience Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+
+android_app {
+ name: "SamsungDoze",
+ defaults: ["SettingsLibDefaults"],
+
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+
+ certificate: "platform",
+ platform_apis: true,
+ system_ext_specific: true,
+
+ static_libs: [
+ "androidx.window.extensions",
+ "androidx.window.sidecar",
+ "org.lineageos.settings.resources",
+ ],
+
+ optimize: {
+ proguard_flags_files: ["proguard.flags"],
+ },
+}
diff --git a/doze/Android.mk b/doze/Android.mk
deleted file mode 100644
index 87748ee7..00000000
--- a/doze/Android.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := SamsungDoze
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- SettingsLib
-
-LOCAL_OPTIONAL_USES_LIBRARIES := \
- androidx.window.extensions \
- androidx.window.sidecar
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-LOCAL_RESOURCE_DIR := \
- $(LOCAL_PATH)/res \
- $(TOP)/packages/resources/devicesettings/res
-
-ifneq ($(INCREMENTAL_BUILDS),)
- LOCAL_PROGUARD_ENABLED := disabled
- LOCAL_JACK_ENABLED := incremental
-endif
-
-include $(BUILD_PACKAGE)
diff --git a/doze/src/org/lineageos/settings/doze/SamsungDozeActivity.java b/doze/src/org/lineageos/settings/doze/SamsungDozeActivity.java
index ba8459de..992c357a 100644
--- a/doze/src/org/lineageos/settings/doze/SamsungDozeActivity.java
+++ b/doze/src/org/lineageos/settings/doze/SamsungDozeActivity.java
@@ -18,7 +18,6 @@ package org.lineageos.settings.doze;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
-import com.android.settingslib.widget.R;
public class SamsungDozeActivity extends CollapsingToolbarBaseActivity {
@@ -27,7 +26,8 @@ public class SamsungDozeActivity extends CollapsingToolbarBaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- getFragmentManager().beginTransaction().replace(R.id.content_frame,
+ getFragmentManager().beginTransaction().replace(
+ com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new SamsungDozeSettings(), TAG).commit();
}
}
diff --git a/doze/src/org/lineageos/settings/doze/SamsungDozeSettings.java b/doze/src/org/lineageos/settings/doze/SamsungDozeSettings.java
index 07b7b14e..b7fa21f9 100644
--- a/doze/src/org/lineageos/settings/doze/SamsungDozeSettings.java
+++ b/doze/src/org/lineageos/settings/doze/SamsungDozeSettings.java
@@ -19,7 +19,8 @@ package org.lineageos.settings.doze;
import android.os.Bundle;
import android.os.Handler;
-import android.widget.Switch;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
@@ -27,10 +28,9 @@ import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import com.android.settingslib.widget.MainSwitchPreference;
-import com.android.settingslib.widget.OnMainSwitchChangeListener;
public class SamsungDozeSettings extends PreferenceFragment
- implements OnPreferenceChangeListener, OnMainSwitchChangeListener {
+ implements OnPreferenceChangeListener, OnCheckedChangeListener {
private MainSwitchPreference mSwitchBar;
@@ -106,7 +106,7 @@ public class SamsungDozeSettings extends PreferenceFragment
}
@Override
- public void onSwitchChanged(Switch switchView, boolean isChecked) {
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
Utils.enableDoze(getActivity(), isChecked);
Utils.checkDozeService(getActivity());
diff --git a/hidl/camera/default/Android.bp b/hidl/camera/default/Android.bp
index 6d7dcdd9..3a7c2543 100644
--- a/hidl/camera/default/Android.bp
+++ b/hidl/camera/default/Android.bp
@@ -24,14 +24,13 @@ cc_library_static {
"libgralloctypes",
"libhardware",
"libcamera_metadata",
- "android.hardware.graphics.mapper@2.0",
- "android.hardware.graphics.mapper@3.0",
- "android.hardware.graphics.mapper@4.0",
"libexif",
+ "libui",
],
include_dirs: ["system/media/private/camera/include"],
header_libs: ["libhardware_headers.camera3_samsung"],
export_include_dirs: ["include"],
+ export_shared_lib_headers: ["libui"],
}
// NOTE: Deprecated module kept for compatibility reasons.
diff --git a/hidl/camera/device/3.2/default/Android.bp b/hidl/camera/device/3.2/default/Android.bp
index 14488dd6..a61f429b 100644
--- a/hidl/camera/device/3.2/default/Android.bp
+++ b/hidl/camera/device/3.2/default/Android.bp
@@ -24,6 +24,7 @@ cc_library_shared {
"libhardware",
"libcamera_metadata",
"libfmq",
+ "libui",
],
static_libs: [
"android.hardware.camera.common@1.0-helper.samsung",
diff --git a/hidl/camera/device/3.4/default/Android.bp b/hidl/camera/device/3.4/default/Android.bp
index 3941536c..24672d27 100644
--- a/hidl/camera/device/3.4/default/Android.bp
+++ b/hidl/camera/device/3.4/default/Android.bp
@@ -45,6 +45,7 @@ cc_library_shared {
"libhardware",
"libcamera_metadata",
"libfmq",
+ "libui",
],
static_libs: [
"android.hardware.camera.common@1.0-helper.samsung",
diff --git a/hidl/camera/device/3.5/default/Android.bp b/hidl/camera/device/3.5/default/Android.bp
index 120f9957..3f65dce3 100644
--- a/hidl/camera/device/3.5/default/Android.bp
+++ b/hidl/camera/device/3.5/default/Android.bp
@@ -28,6 +28,7 @@ cc_library_shared {
],
shared_libs: [
"libhidlbase",
+ "libui",
"libutils",
"libcutils",
"camera.device@3.2-impl.samsung",