Commit Graph
30 Commits
Author SHA1 Message Date
Raya Mahardika 27c2e8cdd9 dipper: Fix Settings DEX superclass calls and guard against HDR capture crashes
Change-Id: I607408970a3941cd6c95f0060da9d0f757a940a0
2026-10-04 05:35:15 +00:00
Raya Mahardika 664f365f24 MiuiCamera: Fix settings crash and HDR capture crash
- In miui and miuix AttributeResolver, ensure resolveColor, resolveDimension,
  and resolveDimensionPixelSize return safe defaults (0) instead of invoking
  Resources.getColor(-1) or Resources.getDimension(-1) when an attribute
  cannot be resolved on non-MIUI themes.
- In VendorTagHelper, force getPreferredAction to 0xbabe (SWALLOW/WARN) to
  prevent unsupported camera HAL vendor tags from throwing unhandled
  VendorTagNotFoundException.
- In HdrEvValue, add defensive bounds checking and try-catch handling to
  gracefully fall back to default EV brackets ([-6, 0, 6]) when parsing
  HAL vendor payload.
- In MiCamera2ShotParallelBurst, guard prepareHdr to initialize default HDR
  exposure compensation frames when EV value parsing is null or empty.
- In AndroidManifest.xml, change CameraPreferenceActivity screenOrientation
  from 'behind' to 'portrait'.

Change-Id: Iee1ee728014f5bcbae99261e08c83a05f416bced
2026-10-04 04:54:44 +00:00
Raya Mahardika 3362bc2a86 MiuiCamera: Bypass miui.app.Activity delegation to standard android Activity
Change-Id: I256f957663ec79681e6f5b1fc0d8aa7d3b0f5fd3
2026-10-04 04:08:17 +00:00
Raya Mahardika 834123a3de MiuiCamera: Fix settings crash by avoiding missing framework-miui-res lookups
Change-Id: Ia4e08d48c0cf3c20ea1ca97aad629ccfdb7be14f
2026-10-04 03:51:08 +00:00
Raya Mahardika 76702dd2ad MiuiCamera: Fix settings crash by bypassing MIUI theme requirement
- In ActivityDelegate and FragmentDelegate, remove Window_windowActionBar theme check that throws IllegalStateException when running on non-MIUI/AOSP themes

Change-Id: Ia0192aedd8777233941e4bfaab81282935b66521
2026-10-04 03:30:29 +00:00
Raya Mahardika 0ab6cfe2b7 MiuiCamera: Fix register corruption in Camera.onCreate causing VerifyError
Change-Id: If38e1bfdf5cccfe4f65a46afc85ab8bcd1c39fee
2026-10-04 03:20:54 +00:00
Raya Mahardika e7afffea1e MiuiCamera: Fix top actionbar header and enable notch layout
- Inherit ThemeCamera and ThemeModeEditor from Theme.DeviceDefault.NoActionBar.Fullscreen
- Add requestWindowFeature(Window.FEATURE_NO_TITLE) in Camera.onCreate
- Configure shortEdges windowLayoutInDisplayCutoutMode
- Force Util.isNotchDevice to true on dipper to properly calculate top bar insets

Change-Id: Ieb7f598cebb7797821b9b2f85e7b520da7500360
2026-10-04 03:09:41 +00:00
Raya Mahardika 8806460fb7 MiuiCamera: Enforce NoTitleBar and disable portrait/bokeh preview tags
Change-Id: I3010f0ae1866fa82a24e4654f8c046a82865b921
2026-10-03 16:56:18 +00:00
Raya Mahardika d8e4bf4e6f MiuiCamera: Fix actionbar header and portrait realtime bokeh crash
Change-Id: I36ba72cdeb653a41e389d3c43574d6fea53d47ad
2026-10-03 16:29:33 +00:00
Raya Mahardika c17f301358 miuicamera-dipper: Fix photo saving and video recording crash
- Disable software EIS on Dipper to avoid Vidhance EIS node timeout and camera HAL crash during video recording. Dipper uses hardware OIS.
- Add relative_path ('DCIM/Camera/') to ContentValues for MediaStore inserts across all photo and video capture modules to comply with modern Scoped Storage / MediaProvider requirements.
- Add MANAGE_EXTERNAL_STORAGE, ACCESS_MEDIA_LOCATION, and media permissions to AndroidManifest.xml, privapp permissions, and default permissions.
- Add android:requestLegacyExternalStorage='true' to AndroidManifest.xml.

Change-Id: If96da699d85ccf6d61db1a97b7baf07332d46214
2026-10-03 16:03:02 +00:00
Raya Mahardika d359362a9f miuicamera-dipper: Fix Resources$NotFoundException during MiuiSettings$System static init
- Replaced missing MIUI framework-res resource lookups (0x11...) in android.provider.MiuiSettings$System (<clinit>, getShowCustomCarrierDefault, getDisplayWindowSizeInSmartCover, and getScreenKeyLongPressAction) with safe defaults.
- Fixed ReflectionUtils.smali typo and hareware package reference.
- Cleanly re-exported 0004-Add-missing-miui-framework-classes.patch and rebuilt MiuiCamera.apk with all 11 DEX containers.

Change-Id: I3752137914903cd9c41f229014eb9fd6aa2c8201
2026-10-03 15:39:08 +00:00
Raya Mahardika ca235a65fa miuicamera-dipper: Fix invalid superclass in MiuiSettings$System and Secure
- Changed superclass of android.provider.MiuiSettings$System and
  MiuiSettings$Secure from non-existent android.provider.SystemSettings
  to java.lang.Object.
- Resolves NoClassDefFoundError / ClassNotFoundException when ScenarioTrackUtil
  calls MiuiSettings$System on first frame available.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: I4b49b49a723854503585530e59965e6a89b8e6ca
2026-10-03 15:21:32 +00:00
Raya Mahardika 433b7346ae miuicamera-dipper: Restore full framework stub classes and native AlertDialog wrapper
- Restored all missing framework classes (miui.os.Build, android.os.statistics.*,
  PerfShielder, com.google.gson, etc.) that were omitted during previous patch regeneration.
- Replaced miui.app.AlertDialog and miui.app.AlertDialog$Builder with native
  android.app.AlertDialog wrapper to fix Resources$NotFoundException on AOSP.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: Ia133e7049a068baf15d7f68bfbe10a9778632d13
2026-10-03 15:05:40 +00:00
Raya Mahardika 5b6bfc5cca miuicamera-dipper: Replace miui.app.AlertDialog with native AlertDialog wrapper
- Replace miui.app.AlertDialog and miui.app.AlertDialog$Builder with a pure Java
  wrapper extending android.app.AlertDialog.
- Guard AlertControllerImpl against Resources$NotFoundException for
  missing MIUI framework-res resources (such as fake_landscape_screen_minor_size
  and treat_as_land) on AOSP.
- Fixes Resources$NotFoundException (Resource ID #0x100a015a) when ScreenHint
  shows first use hint dialog during camera startup.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: Ie69ca4f03ae934a76741092ec95a57dd2f8941d0
2026-10-03 14:56:03 +00:00
Raya Mahardika fc841a0526 miuicamera-dipper: Replace JNI miui.reflect with pure Java implementation
- Replaced native methods in miui.reflect.{Method, Field, Constructor} and
  com.miui.internal.os.Native with pure Java reflection implementations.
- Fixes UnsatisfiedLinkError for Native.getMethod / miui.reflect.Method.of()
  during Storage.initQuota() and startup reflection on AOSP Android 16.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: I7e8e0f733e48767e707b22b47c113e65871d17ef
2026-10-03 14:32:55 +00:00
Raya Mahardika 9c0d05ae82 miuicamera-dipper: Bundle Gson, Protobuf, and ZXing libraries into APK
- Bundle com.google.gson, com.google.protobuf, and com.google.zxing classes
  directly into MiuiCamera.apk (smali_classes11) to resolve ClassNotFoundException
  for Gson in VoiceOnlineRecog and other features on AOSP.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: I4db9b4fbd1f72b135b045aa86d6daaafcc83a6c6
2026-10-03 14:17:53 +00:00
Raya Mahardika 9a28860740 miuicamera-dipper: Add android.os.statistics stub classes
- Inject android.os.statistics.E2EScenario, E2EScenarioSettings,
  E2EScenarioPayload, and E2EScenarioPerfTracer to fix ClassNotFoundException
  in ScenarioTrackUtil during Camera.onCreate() startup.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: I7cab476cee212d58ab024155c7aba251d6166b38
2026-10-03 11:54:39 +00:00
Raya Mahardika 7f0b54faae miuicamera-dipper: Remove unused uses-library declarations from manifest
- Completely removed uses-library tags for cloud-common.jar, volley.jar,
  and zxing.jar to eliminate all shared library reconciliation failures on AOSP.

Change-Id: I23cfe2286cebcadb89517e29c6c6e0de59f082b9
2026-10-02 17:51:41 +00:00
Raya Mahardika 4d4e8b2fc3 miuicamera-dipper: Mark cloud-common.jar and volley.jar as optional in manifest
- Set android:required="false" on cloud-common.jar, volley.jar, and
  org.apache.http.legacy to fix INSTALL_FAILED_MISSING_SHARED_LIBRARY
  reconciliation error on AOSP.

Change-Id: I7f6e65daa93ac2a184f2eddae614ec0149457928
2026-10-02 17:47:41 +00:00
Raya Mahardika 9029fd0a5f miuicamera-dipper: Add android.os.statistics and PerfShielder classes
- Injected android.os.statistics.* (E2EScenario, E2EScenarioPerfTracer,
  E2EScenarioSettings, E2EScenarioPayload, E2EScenarioOnce, etc.) to fix
  ClassNotFoundException in ScenarioTrackUtil.
- Injected com.miui.daemon.performance.PerfShielderManager and
  com.android.internal.app.IPerfShielder.
- Injected miui.os.Environment.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: I50e9c1a5db6ce80b9bb69ce87bf73a6035263d7d
2026-10-02 17:24:50 +00:00
Raya Mahardika ccbd64e0a4 miuicamera-dipper: Add MiuiSettings, MiuiNotification, and MIUI R classes
- Injected android.provider.MiuiSettings and inner classes (Global, System,
  SettingsCloudData, etc.) to fix ClassNotFoundException during Util.initialize()
  and isFullScreenNavBarHidden().
- Injected android.miui.R and inner classes (R$array, R$bool, R$integer, etc.)
  for resource reflection lookups.
- Injected android.app.MiuiNotification and miui.security.SecurityManager.
- Rebuilt MiuiCamera.apk via extract-files.py.

Change-Id: I6a7d2f641cc0922f81fafe2c2838c93bca9129ed
2026-10-02 16:46:02 +00:00
Raya Mahardika 3b67ba5299 miuicamera-dipper: Fix NullPointerException in CameraApplicationDelegate initialization
- Patch miui.external.Application to unconditionally create and attach
  CameraApplicationDelegate on AOSP, fixing null sContext and getAndroidContext().
- Add null-check safety to Util.isUserUnlocked().

Change-Id: I5d54aa0ad1e5726b837648518fddd20726efdb1d
2026-10-02 15:47:01 +00:00
Raya Mahardika 8ff2ec42a8 miuicamera-dipper: Fix UnsatisfiedLinkError for libmiuinative
- Implement pure-Java miui.os.SystemProperties delegating directly to
  android.os.SystemProperties to avoid loading libmiuinative.so.
- Wrap System.loadLibrary in com.miui.internal.os.Native.<clinit>
  in try/catch block to prevent crash if library cannot be loaded.
- Include libmiuinative.so in proprietary blobs list.

Change-Id: I71e65ab584cb84b36a52afb9eab815cea565292b
2026-10-02 15:17:04 +00:00
Raya Mahardika 4352715056 miuicamera-dipper: Add missing MIUI framework classes into MiuiCamera
- Inject miui.os.Build, miui.util.FeatureParser, miui.util.ReflectionUtils,
  miui.hardware.display.DisplayFeatureManager, and related classes directly
  into MiuiCamera.apk to fix ClassNotFoundException on AOSP startup.
- Stub SecurityManager app lock check in GeneralUtils to eliminate
  MIUI security service dependency.
- Guard Notification.extraNotification access in GeneralUtils.

Change-Id: I46b2d910ac9fcad3a1a0966fc26f2d217325f6a1
2026-10-02 12:43:07 +00:00
Raya Mahardika ae82570bc6 miuicamera-dipper: Grant all requested privileged permissions to satisfy allowlist
Change-Id: I7f3a5a7d0848ebbb6c684fc6a078e497a31b560a
2026-10-02 09:34:58 +00:00
Raya Mahardika d8e4ba4a9c miuicamera-dipper: Remove public.libraries-xiaomi.txt to fix zygote bootloop
Change-Id: I22f60b8711c8f8ed9fc4666ff30d78cac8d30bf5
2026-10-02 09:06:50 +00:00
Raya Mahardika c5077cebc5 miuicamera-dipper: Fix ELF checks for libcamera_960_mpbase and libjni_jpegutil_xiaomi
Change-Id: I20f41d078e857de7b6610bff778de4bc2918957d
2026-10-02 05:24:37 +00:00
Raya Mahardika 66cfb5e929 miuicamera-dipper: Assume mod_device is global and drop security dependencies
Change-Id: I34f237f165371b405e4efea764ec3763ea2792eb
2026-10-02 03:10:41 +00:00
Raya Mahardika 3b5e6016f4 miuicamera-dipper: Update Leica launcher icon assets
Change-Id: I2d9bdb366d680ac22832d3e333b34b9951a08b62
2026-10-02 03:03:57 +00:00
Raya Mahardika e4eecdc9f4 miuicamera-dipper: Initial commit
Change-Id: I1c627b4fba6ac42a97b7fa4b5dba922435f83af9
2026-10-01 18:34:20 +00:00