Startup mode default/last-session; GPS watermark default OFF; shutter OFF truly silent

- Settings STARTUP MODE chips (AsyncStorage startup_mode): default = clean camera
  + PROVIA neutral 4:3, last = restore full session look.
- initSession: resolve sim-* recipe ids via FILM_SIMS (fix clobber of session
  ratio/adjustments to 4:3 canonical); restore via setSelectedRecipe not
  applyRecipe so user tweaks (frame/geotag/ratio) survive restore.
- applyDefaultStartup turns GPS watermark OFF (user-requested default).
- Shutter: OFF must not play click on must-play-policy devices. VisionCamera
  v5.2.3 HybridPhotoOutput.kt plays MediaActionSound itself gated by
  (enableShutterSound ?: true) || mustPlayShutterSound — on Xiaomi mustPlay=true
  so OFF still clicked. Both capture paths now gate on enableShutterSound != false.
  node_modules patch not trackable -> artifacts/patches/vision-camera-shutter-silent.patch.
  Verified on Xiaomi 12S Ultra: log SND user=false -> play=false; cold-start
  DEFAULT shows GPS WATERMARK OFF.
This commit is contained in:
2026-09-09 17:59:15 +07:00
parent 3dcfd19d35
commit ca3532023a
5 changed files with 127 additions and 8 deletions
+21 -1
View File
@@ -2,7 +2,7 @@ import React from 'react';
import { View, Text, Modal, TouchableOpacity } from 'react-native';
import * as Haptics from 'expo-haptics';
import { X, Volume2, Settings as SettingsIcon } from 'lucide-react-native';
import { AspectRatio, MeterMode, ShutterSound } from '../types';
import { AspectRatio, MeterMode, ShutterSound, StartupMode } from '../types';
// Gear-sheet (gear button between library picker and shutter). Groups the
// capture/composition choices that are NOT look-adjustments, so the tool rail
@@ -30,6 +30,8 @@ interface SettingsModalProps {
onMeterModeChange: (mode: MeterMode) => void;
shutterSound: ShutterSound;
onShutterSound: (sound: ShutterSound) => void;
startupMode: StartupMode;
onStartupMode: (mode: StartupMode) => void;
}
function ChipRow({ chips }: { chips: Chip[] }) {
@@ -85,6 +87,8 @@ export default function SettingsModal({
onMeterModeChange,
shutterSound,
onShutterSound,
startupMode,
onStartupMode,
}: SettingsModalProps) {
return (
<Modal visible={visible} transparent animationType="fade" onRequestClose={onClose}>
@@ -115,6 +119,22 @@ export default function SettingsModal({
</TouchableOpacity>
</View>
{/* Startup mode */}
<View>
<SectionLabel>STARTUP MODE</SectionLabel>
<ChipRow
chips={[
{ key: 'startup-default', label: 'DEFAULT', active: startupMode === 'default', onPress: () => onStartupMode('default') },
{ key: 'startup-last', label: 'LAST SESSION', active: startupMode === 'last', onPress: () => onStartupMode('last') },
]}
/>
<View className="flex-row items-center mt-1.5 ml-1">
<Text className="text-zinc-600 font-mono text-[10px] ml-1.5">
DEFAULT: camera + PROVIA (neutral adjustments) at 4:3. LAST SESSION: restore your previous look on startup.
</Text>
</View>
</View>
{/* Shutter sound */}
<View>
<SectionLabel>SHUTTER SOUND</SectionLabel>
+1
View File
@@ -13,6 +13,7 @@ export type MeterMode = 'evaluative' | 'highlight';
// Camera shutter sound. OS policy may force the click on in some regions;
// there is no native volume control (OFF/ON only).
export type ShutterSound = 'on' | 'off';
export type StartupMode = 'default' | 'last';
// One photo in the in-app session history (recent captures + library exports).
// uri = app-cache JPEG; assetId (when savedToLibrary) = the MediaLibrary asset
// so the trash button can remove the gallery copy too.