Skip to content

Commit

Permalink
Reorder Preference Screen in Settings Activity
Browse files Browse the repository at this point in the history
Issue Detailed: First Preference Screen in Camera Settings Activity is
not getting displayed leading to resolution& quality screen not getting
displayed.

Issue Fixed: Reordered the Preference Screen to display Advanced
Preference Screen first by forcefully enabling Advanced
Preference Screen.

Tested-On: Checked Resolution Screen is displayed in AOSP Camera
Settings

Tracked-On: OAM-127026
Signed-off-by: NaveenVenturi1203 <[email protected]>
Signed-off-by: shivasku82 <[email protected]>
  • Loading branch information
shivasku82 committed Nov 18, 2024
1 parent d2bec9c commit 50d6dc2
Showing 1 changed file with 83 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 512988758ddc8cdfb15a87ff034e5ce2b3755e57 Mon Sep 17 00:00:00 2001
From: NaveenVenturi1203 <[email protected]>
Date: Fri, 8 Nov 2024 08:15:22 +0000
Subject: [PATCH] Reorder Preference Screen in Settings Activity

Issue Detailed: First Preference Screen in Camera Settings Activity is
not getting displayed leading to resolution& quality screen not getting
displayed.

Issue Fixed: Reordered the Preference Screen to display Advanced
Preference Screen first by forcefully enabling Advanced
Preference Screen.

Tested-On: Checked Resolution Screen is displayed in AOSP Camera
Settings

Tracked-On: OAM-127026

Signed-off-by: NaveenVenturi1203 <[email protected]>
---
res/xml/camera_preferences.xml | 23 +++++++++----------
.../settings/CameraSettingsActivity.java | 6 +++++
2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml
index 9c2a1a274..38845b938 100644
--- a/res/xml/camera_preferences.xml
+++ b/res/xml/camera_preferences.xml
@@ -18,6 +18,17 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:key="prefscreen_top">

+ <!-- Advanced -->
+ <PreferenceScreen
+ android:key="pref_category_advanced"
+ android:title="@string/pref_category_advanced" >
+ <!-- Exposure Compensation -->
+ <com.android.camera.settings.ManagedSwitchPreference
+ android:defaultValue="false"
+ android:key="pref_camera_exposure_compensation_key"
+ android:title="@string/pref_camera_exposure_compensation" />
+ </PreferenceScreen>
+
<!-- Resolutions and Quality -->
<PreferenceScreen
android:key="pref_category_resolution"
@@ -59,16 +70,4 @@
android:defaultValue="false"
android:key="pref_camera_recordlocation_key"
android:title="@string/pref_camera_save_location_title" />
-
- <!-- Advanced -->
- <PreferenceScreen
- android:key="pref_category_advanced"
- android:title="@string/pref_category_advanced" >
- <!-- Exposure Compensation -->
- <com.android.camera.settings.ManagedSwitchPreference
- android:defaultValue="false"
- android:key="pref_camera_exposure_compensation_key"
- android:title="@string/pref_camera_exposure_compensation" />
- </PreferenceScreen>
-
</PreferenceScreen>
diff --git a/src/com/android/camera/settings/CameraSettingsActivity.java b/src/com/android/camera/settings/CameraSettingsActivity.java
index 6c76e961c..c6166bf96 100644
--- a/src/com/android/camera/settings/CameraSettingsActivity.java
+++ b/src/com/android/camera/settings/CameraSettingsActivity.java
@@ -114,6 +114,12 @@ public class CameraSettingsActivity extends FragmentActivity {
fatalErrorHandler.onGenericCameraAccessFailure();
}

+ /*First Preference Screen is not getting displayed
+ *so to avoid not displaying the Resolution Preference Screen,Adavanced Preference screen is forcefully enabled
+ */
+
+ hideAdvancedScreen = false;
+
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(R.string.mode_settings);
--
2.34.1

0 comments on commit 50d6dc2

Please sign in to comment.