mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 06:59:27 -05:00
Repository cleanup
This commit is contained in:
parent
ee867dad1c
commit
1fe7864416
@ -1,42 +0,0 @@
|
||||
General Changes
|
||||
Build
|
||||
- Base: Added 182 applications to the automatic power profile switcher config
|
||||
- Base: Don't enable battery saver when switching to power save profile
|
||||
- Browser: Changed some default settings
|
||||
- Browser: UI Update
|
||||
- Compiled with UBERTC GCC 4.9 and AOSP NDK 4.9 using JustArchi's v4.1 optimization flags
|
||||
- Removed analytics from various packages
|
||||
- Removed some packages for privacy reasons
|
||||
- Removed useless packages
|
||||
- Settings: Added option to change encryption password
|
||||
- Settings: Senisitive notification content is hidden by default
|
||||
Kernels
|
||||
- Compiled with UBERTC GCC 4.8 using Cortex-A15 optimization flags
|
||||
- Enabled DIAG (SnoopSnitch support)
|
||||
- Enabled modules support
|
||||
- Implemented KEXEC support (Multirom support)
|
||||
- Implemented Quick Wakeup (Battery savings)
|
||||
To Do
|
||||
- DNScrypt support
|
||||
- Remove DRM server
|
||||
- Add more governors
|
||||
- Add more I/O schedulers
|
||||
- LZ4 boot support
|
||||
- Remove unneeded Qualcomm blobs
|
||||
|
||||
Bacon Changes
|
||||
Kernel
|
||||
- Implemented UKSM (Memory deduplication)
|
||||
- Overclocked from 2.45Ghz to 2.88Ghz
|
||||
- Underclocked from 300Mhz to 268Mhz
|
||||
- Upgraded from Linux 3.4.67 to 3.4.110
|
||||
Device
|
||||
- Basic performance/battery build.prop optimizations
|
||||
- Removed bundled Google Widevine DRM and Microsoft PlayReady DRM firmware files
|
||||
|
||||
Mako Changes
|
||||
Kernel
|
||||
- Overclocked from 1.51Ghz to 1.94Ghz
|
||||
- Underclocked from 384Mhz to 81Mhz
|
||||
Device
|
||||
- None Yet
|
@ -1,53 +0,0 @@
|
||||
Last Updated: 08/11/2016
|
||||
General changes
|
||||
- Changed network connectivity check URL to personal server (with logging disabled on server)
|
||||
- Compiled with UBERTC GCC 4.9 and AOSP NDK 4.9 using JustArchi's v4.1 optimization flags
|
||||
- Compiled with OpenJDK 8
|
||||
- Doze is significantly more aggressive
|
||||
- Instant shutdown after 5 failed unlock attempts
|
||||
- Fixed Profiles failing to change to user's prefered network type
|
||||
- Miscellaneous hardening
|
||||
- Removed Cyanogen AmbientSDK from various repos and packages
|
||||
- Removed CyanogenMod analytics from various repos and packages
|
||||
- Removed Gello from supported devices
|
||||
- Removed unnecessary/outdated packages
|
||||
- Replaced outdated AOSP webview with newer Chromium-based webview
|
||||
- Browser
|
||||
- Changed default home page to DuckDuckGo
|
||||
- Changed default search engine to DuckDuckGo
|
||||
- Link preloading is disabled by default
|
||||
- Plugins are disabled by default
|
||||
- Removed referrer flags from DuckDuckGo
|
||||
- Removed RLZ tracking
|
||||
- Search result preloading is disabled by default
|
||||
- Camera2
|
||||
- Location recording is disabled by default
|
||||
- Settings
|
||||
- NFC and NDEF are disabled by default
|
||||
- Passwords are hidden by default
|
||||
- Senisitive notification content is hidden by default
|
||||
|
||||
Device Changes
|
||||
- bacon
|
||||
- Kernel
|
||||
- Overclocked from 2.45Ghz to 2.95Ghz
|
||||
- No thats not a typo, its actually pretty stable
|
||||
- Underclocked from 300Mhz to 268Mhz
|
||||
- Device
|
||||
- Basic performance/battery build.prop optimizations
|
||||
- Removed bundled Google Widevine DRM and Microsoft PlayReady DRM firmware files
|
||||
- Removed as many unnecessary proprietary Qualcomm blobs (CNE/DPM/Location/QTI)
|
||||
- mako
|
||||
- Device
|
||||
- Enabled LTE support
|
||||
- Increase speaker and microphone volume by 4dB
|
||||
- Fixed dexopt related bootloop
|
||||
|
||||
To Do
|
||||
- Implement ARMORED (TRESOR)
|
||||
- Implement DNScrypt support
|
||||
- Implement MAC address and hostname randomization
|
||||
- Remove CMStats from Trebuchet, currently only disabled code still there
|
||||
- Remove DRM server
|
||||
- Remove RemoteFolder from Trebuchet
|
||||
- Remove unnecessary proprietary blobs
|
@ -1,48 +0,0 @@
|
||||
Last Updated: 12/23/2016
|
||||
Credits: CyanogenMod, CopperheadOS, OmniROM, TeamWin, F-Droid, MicroG, anarkia1976, bhb27, Daniel Micay, dirtyhank, Evisceration, Felipe de Leon, flar2, franciscofranco, hellsgod, mar-v-in, nikhil18, Paul Reioux, savoca, stefano.villa1976, WedyDQ10, XileForce
|
||||
General Changes
|
||||
- Added support for Chromium monochrome
|
||||
- Builds are dex-preopted on supported devices
|
||||
- Builds are signed with private release-keys
|
||||
- Bundled in our custom DNS blocklist
|
||||
- Compiled with OpenJDK 8
|
||||
- Doze is re-enabled on devices without real Google Play Services
|
||||
- Hardened IPv4 and IPv6 stacks
|
||||
- Hardened special file systems
|
||||
- Hardened SQLite
|
||||
- Nuked CMAnalytics from orbit
|
||||
- Removed unnecessary/outdated/insecure packages. Warning: No Browser is included, please install getChromium or IceCat from F-Droid
|
||||
- Updated Chromium WebView on arm64 devices
|
||||
- F-Droid
|
||||
- F-Droid and FDroidPrivilegedExtension are included by default
|
||||
- FDroidPrivilegedExtension ONLY allows access to our signed version of F-Droid
|
||||
- MicroG
|
||||
- GmsCore, GsfProxy, and FakeStore are included by default
|
||||
- Required signature spoofing permission is ONLY granted to signed system apps unlike other ROMs
|
||||
- Settings
|
||||
- NFC and NDEF are disabled by default
|
||||
- Passwords are hidden by default
|
||||
Device Changes
|
||||
- bacon
|
||||
- Overclocked from 2.45Ghz to 2.95Ghz (=+2.02Ghz)
|
||||
- Underclocked from 300Mhz to 268Mhz
|
||||
- Qualcomm DIAG enabled
|
||||
- Removed bundled Google Widevine DRM and Microsoft PlayReady DRM firmware files
|
||||
- bullhead
|
||||
- Overclocked a57 from 1.82Ghz to 2.01Ghz, overclocked a53 from 1.44Ghz to 1.63Ghz (=+1.14Ghz)
|
||||
- Underclocked both from 384Mhz to 300Mhz
|
||||
- MMC performance slightly increased
|
||||
- clark
|
||||
- Overclocked a57 from 1.82Ghz to 2.01Ghz, overclocked a53 from 1.44Ghz to 1.63Ghz (=+1.14Ghz)
|
||||
- Underclocked both from 384Mhz to 300Mhz
|
||||
- MMC performance slightly increased
|
||||
- Removed bundled Google Widevine DRM and Microsoft PlayReady DRM firmware files
|
||||
- mako
|
||||
- Overclocked from 1.51Ghz to 1.94Ghz (=+1.72Ghz)
|
||||
- Underclocked from 384Mhz to 81Mhz
|
||||
- Enabled LTE support (Requires LTE hybrid modem to be flashed)
|
||||
- hammerhead
|
||||
- Overclocked from 2.26Ghz to 2.95Ghz (=+2.75Ghz)
|
||||
- shamu
|
||||
- Overclocked from 2.64Ghz to 2.88Ghz (=+0.96Ghz)
|
||||
- Underclocked from 300Mhz to 35Mhz
|
@ -1,137 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<manifest>
|
||||
|
||||
<remove-project name="CyanogenMod/android_device_generic_goldfish" />
|
||||
<remove-project name="CyanogenMod/android_device_generic_mips" />
|
||||
<remove-project name="CyanogenMod/android_device_google_atv" />
|
||||
<remove-project name="CyanogenMod/android_external_android-mock" />
|
||||
<remove-project name="CyanogenMod/android_external_ant-wireless_ant_native" />
|
||||
<remove-project name="CyanogenMod/android_external_ant-wireless_ant_service" />
|
||||
<remove-project name="CyanogenMod/android_frameworks_compile_mclinker" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_libmix" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_libva" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_libwsbm" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_omx-components" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_img_hwcomposer" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_img_psb_headers" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_img_psb_video" />
|
||||
<remove-project name="CyanogenMod/android_hardware_qcom_fm" />
|
||||
<remove-project name="CyanogenMod/android_hardware_samsung_slsi_exynos5" />
|
||||
<remove-project name="CyanogenMod/android_hardware_ti_omap4" />
|
||||
<remove-project name="CyanogenMod/android_hardware_ti_omap4xxx" />
|
||||
<remove-project name="CyanogenMod/android_hardware_ti_wlan" />
|
||||
<remove-project name="CyanogenMod/android_hardware_ti_wpan" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_CMBugreport" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_CMUpdater" />
|
||||
<!--<remove-project name="CyanogenMod/android_packages_apps_Eleven" />-->
|
||||
<remove-project name="CyanogenMod/android_packages_apps_FMRadio" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_LockClock" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_ManagedProvisioning" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_Provision" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_SmartCardService" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_SpeechRecorder" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_Stk" />
|
||||
<!--<remove-project name="CyanogenMod/android_packages_apps_Terminal" />-->
|
||||
<remove-project name="CyanogenMod/android_packages_apps_TvSettings" />
|
||||
<remove-project name="CyanogenMod/android_packages_experimental" />
|
||||
<remove-project name="CyanogenMod/android_packages_providers_PartnerBookmarksProvider" />
|
||||
<remove-project name="CyanogenMod/android_packages_providers_TvProvider" />
|
||||
<remove-project name="CyanogenMod/android_packages_screensavers_Basic" />
|
||||
<remove-project name="CyanogenMod/android_packages_screensavers_PhotoTable" />
|
||||
<remove-project name="CyanogenMod/android_packages_screensavers_WebView" />
|
||||
<remove-project name="CyanogenMod/android_packages_wallpapers_Galaxy4" />
|
||||
<remove-project name="CyanogenMod/android_packages_wallpapers_HoloSpiral" />
|
||||
<remove-project name="CyanogenMod/android_packages_wallpapers_MagicSmoke" />
|
||||
<remove-project name="CyanogenMod/android_packages_wallpapers_NoiseField" />
|
||||
<remove-project name="CyanogenMod/android_packages_wallpapers_PhaseBeam" />
|
||||
<remove-project name="CyanogenMod/android_packages_wallpapers_PhotoPhase" />
|
||||
<remove-project name="device/generic/mini-emulator-arm64" />
|
||||
<remove-project name="device/generic/mini-emulator-armv7-a-neon" />
|
||||
<remove-project name="device/generic/mini-emulator-mips" />
|
||||
<remove-project name="device/generic/mini-emulator-x86" />
|
||||
<remove-project name="device/generic/mini-emulator-x86_64" />
|
||||
<remove-project name="device/generic/qemu" />
|
||||
<remove-project name="device/generic/x86" />
|
||||
<remove-project name="device/generic/x86_64" />
|
||||
<remove-project name="device/google/accessory/arduino" />
|
||||
<remove-project name="device/google/accessory/demokit" />
|
||||
<remove-project name="device/sample" />
|
||||
<remove-project name="platform/cts" />
|
||||
<remove-project name="platform/developers/build" />
|
||||
<remove-project name="platform/developers/samples/android" />
|
||||
<remove-project name="platform/docs/source.android.com" />
|
||||
<remove-project name="platform/external/google-tv-pairing-protocol" />
|
||||
<remove-project name="platform/hardware/intel/audio_media" />
|
||||
<remove-project name="platform/hardware/intel/bootstub" />
|
||||
<remove-project name="platform/hardware/intel/common/bd_prov" />
|
||||
<remove-project name="platform/hardware/intel/common/libstagefrighthw" />
|
||||
<remove-project name="platform/hardware/intel/common/utils" />
|
||||
<remove-project name="platform/hardware/intel/common/wrs_omxil_core" />
|
||||
<remove-project name="platform/hardware/intel/sensors" />
|
||||
<remove-project name="platform/hardware/marvell/bt" />
|
||||
<remove-project name="platform/hardware/mediatek" />
|
||||
<remove-project name="platform/hardware/ti/omap3" />
|
||||
<remove-project name="platform/hardware/ti/omap4-aah" />
|
||||
<remove-project name="platform/packages/apps/OneTimeInitializer" />
|
||||
<remove-project name="platform/prebuilts/android-emulator" />
|
||||
<remove-project name="platform/prebuilts/clang/darwin-x86/host/3.6" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/mips/mips64el-linux-android-4.9" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.9" />
|
||||
<remove-project name="platform/prebuilts/gcc/linux-x86/mips/mips64el-linux-android-4.9" />
|
||||
<remove-project name="platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9" />
|
||||
<remove-project name="platform/prebuilts/python/darwin-x86/2.7.5" />
|
||||
|
||||
<remote name="gitlab" fetch="https://gitlab.com/" />
|
||||
|
||||
<!--Chromium-->
|
||||
<remove-project name="platform/external/chromium-webview" />
|
||||
<project path="external/chromium-webview" name="copperheados/platform_external_chromium-webview" remote="github" revision="marshmallow" />
|
||||
<project path="external/chromium" name="copperheados/platform_external_chromium" remote="github" revision="marshmallow" />
|
||||
|
||||
<!--Optimizations-->
|
||||
<remove-project name="CyanogenMod/android_build" />
|
||||
<project path="build" name="ArchiDroid/android_build" remote="github" revision="cm-13.0" />
|
||||
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9" />
|
||||
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" />
|
||||
<remove-project name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9" />
|
||||
|
||||
<!--DNScrypt-->
|
||||
<project path="external/dnscrypt-proxy" name="CyanogenMod/android_external_dnscrypt_dnscrypt-proxy" remote="github" revision="cm-12.1" />
|
||||
<project path="external/libsodium" name="CyanogenMod/android_external_dnscrypt_libsodium" remote="github" revision="cm-12.1" />
|
||||
|
||||
<!--Device Repos-->
|
||||
<project path="device/lge/g3-common" name="CyanogenMod/android_device_lge_g3-common" remote="github" revision="cm-13.0" />
|
||||
<project path="device/lge/hammerhead" name="CyanogenMod/android_device_lge_hammerhead" remote="github" revision="cm-13.0" />
|
||||
<project path="device/lge/mako" name="SpotComms/android_device_lge_mako" remote="github" revision="cm-13.0" />
|
||||
<project path="device/lge/vs985" name="CyanogenMod/android_device_lge_vs985" remote="github" revision="cm-13.0" />
|
||||
<project path="device/moto/shamu" name="CyanogenMod/android_device_moto_shamu" remote="github" revision="cm-13.0" />
|
||||
<project path="device/oneplus/bacon" name="SpotComms/android_device_oneplus_bacon" remote="github" revision="cm-13.0" />
|
||||
<project path="device/oppo/common" name="CyanogenMod/android_device_oppo_common" remote="github" revision="cm-13.0" />
|
||||
<project path="device/oppo/msm8974-common" name="CyanogenMod/android_device_oppo_msm8974-common" remote="github" revision="cm-13.0" />
|
||||
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-13.0" />
|
||||
<project path="device/samsung/hlte-common" name="CyanogenMod/android_device_samsung_hlte-common" remote="github" revision="cm-13.0" />
|
||||
<project path="device/samsung/hlte" name="CyanogenMod/android_device_samsung_hlte" remote="github" revision="cm-13.0" />
|
||||
<project path="device/samsung/msm8974-common" name="CyanogenMod/android_device_samsung_msm8974-common" remote="github" revision="cm-13.0" />
|
||||
<project path="device/samsung/qcom-common" name="CyanogenMod/android_device_samsung_qcom-common" remote="github" revision="cm-13.0" />
|
||||
<project path="external/stlport" name="CyanogenMod/android_external_stlport" remote="github" revision="cm-13.0" />
|
||||
<project path="hardware/samsung" name="CyanogenMod/android_hardware_samsung" remote="github" revision="cm-13.0" />
|
||||
<project path="kernel/google/msm" name="SpotComms/android_kernel_google_msm" remote="github" revision="cm-13.0" />
|
||||
<project path="kernel/lge/g3" name="CyanogenMod/android_kernel_lge_g3" remote="github" revision="cm-13.0" />
|
||||
<project path="kernel/lge/hammerhead" name="CyanogenMod/android_kernel_lge_hammerhead" remote="github" revision="cm-13.0" />
|
||||
<project path="kernel/moto/shamu" name="CyanogenMod/android_kernel_moto_shamu" remote="github" revision="cm-13.0" />
|
||||
<project path="kernel/oneplus/msm8974" name="SpotComms/android_kernel_oneplus_msm8974" remote="github" revision="cm-13.0-new3" />
|
||||
<project path="kernel/samsung/hlte" name="CyanogenMod/android_kernel_samsung_hlte" remote="github" revision="cm-13.0" />
|
||||
<project path="vendor/lge" name="TheMuppets/proprietary_vendor_lge" remote="github" revision="cm-13.0" />
|
||||
<project path="vendor/motorola" name="TheMuppets/proprietary_vendor_motorola" remote="github" revision="cm-13.0" />
|
||||
<project path="vendor/oneplus" name="TheMuppets/proprietary_vendor_oneplus" remote="github" revision="cm-13.0" />
|
||||
<project path="vendor/oppo" name="TheMuppets/proprietary_vendor_oppo" remote="github" revision="cm-13.0" />
|
||||
<project path="vendor/samsung" name="TheMuppets/proprietary_vendor_samsung" remote="github" revision="cm-13.0" />
|
||||
|
||||
<!--TWRP
|
||||
<remove-project name="CyanogenMod/android_bootable_recovery" />
|
||||
<project path="bootable/recovery" name="omnirom/android_bootable_recovery" remote="github" revision="android-6.0" />-->
|
||||
</manifest>
|
@ -1,156 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<manifest>
|
||||
|
||||
<!-- START OF UNNECESSARY REPO REMOVAL -->
|
||||
<remove-project name="CyanogenMod/android_external_ant-wireless_ant_native" />
|
||||
<remove-project name="CyanogenMod/android_external_ant-wireless_ant_service" />
|
||||
<remove-project name="CyanogenMod/android_external_gello_build" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_libmix" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_libva" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_libwsbm" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_omx-components" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_common_utils" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_img_hwcomposer" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_img_psb_headers" />
|
||||
<remove-project name="CyanogenMod/android_hardware_intel_img_psb_video" />
|
||||
<remove-project name="CyanogenMod/android_hardware_ti_omap4xxx" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_Browser" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_CMBugreport" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_FMRadio" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_Gello" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_ManagedProvisioning" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_Stk" />
|
||||
<remove-project name="CyanogenMod/android_packages_apps_TvSettings" />
|
||||
<remove-project name="CyanogenMod/android_packages_providers_PartnerBookmarksProvider" />
|
||||
<remove-project name="CyanogenMod/android_packages_providers_TvProvider" />
|
||||
<remove-project name="CyanogenMod/android_packages_screensavers_Basic" />
|
||||
<remove-project name="CyanogenMod/android_packages_screensavers_PhotoTable" />
|
||||
<remove-project name="CyanogenMod/android_packages_screensavers_WebView" />
|
||||
<remove-project name="CyanogenMod/android_packages_services_Car" />
|
||||
<remove-project name="CyanogenMod/android_prebuilts_gcc_darwin-x86_aarch64_aarch64-linux-android-4.9" />
|
||||
<remove-project name="CyanogenMod/android_prebuilts_gcc_darwin-x86_arm_arm-linux-androideabi-4.9" />
|
||||
<remove-project name="CyanogenMod/android_prebuilts_gcc_darwin-x86_x86_x86_64-linux-android-4.9" />
|
||||
<remove-project name="device/generic/goldfish" />
|
||||
<remove-project name="device/generic/mini-emulator-arm64" />
|
||||
<remove-project name="device/generic/mini-emulator-armv7-a-neon" />
|
||||
<remove-project name="device/generic/mini-emulator-x86" />
|
||||
<remove-project name="device/generic/mini-emulator-x86_64" />
|
||||
<remove-project name="device/generic/qemu" />
|
||||
<remove-project name="device/sample" />
|
||||
<remove-project name="platform/cts" />
|
||||
<remove-project name="platform/hardware/intel/audio_media" />
|
||||
<remove-project name="platform/hardware/intel/bootstub" />
|
||||
<remove-project name="platform/hardware/intel/common/bd_prov" />
|
||||
<remove-project name="platform/hardware/intel/common/libstagefrighthw" />
|
||||
<remove-project name="platform/hardware/intel/common/wrs_omxil_core" />
|
||||
<remove-project name="platform/hardware/intel/sensors" />
|
||||
<remove-project name="platform/hardware/ti/omap3" />
|
||||
<remove-project name="platform/hardware/ti/omap4-aah" />
|
||||
<remove-project name="platform/packages/apps/Provision" />
|
||||
<remove-project name="platform/prebuilts/clang/darwin-x86/host/3.6" />
|
||||
<remove-project name="platform/prebuilts/clang/host/darwin-x86" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8" />
|
||||
<remove-project name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" />
|
||||
<remove-project name="platform/prebuilts/gdb/darwin-x86" />
|
||||
<remove-project name="platform/prebuilts/go/darwin-x86" />
|
||||
<remove-project name="platform/prebuilts/ninja/darwin-x86" />
|
||||
<remove-project name="platform/prebuilts/python/darwin-x86/2.7.5" />
|
||||
<!-- END OF UNNECESSARY REPO REMOVAL -->
|
||||
|
||||
|
||||
<!-- START OF REPLACEMENT REPOS -->
|
||||
<!-- Updated WebView
|
||||
<remove-project name="platform/external/chromium-webview" /> -->
|
||||
|
||||
<!-- OpenDelta Updater -->
|
||||
<remove-project name="CyanogenMod/android_packages_apps_CMUpdater" />
|
||||
<project path="packages/apps/OpenDelta" name="omnirom/android_packages_apps_OpenDelta" remote="github" revision="android-7.1" />
|
||||
|
||||
<!-- TWRP
|
||||
<remove-project name="CyanogenMod/android_bootable_recovery" />
|
||||
<project path="bootable/recovery" name="omnirom/android_bootable_recovery" remote="github" revision="android-7.1" /> -->
|
||||
<!-- <project path="external/busybox" name="omnirom/android_external_busybox" remote="github" revision="android-7.1" />-->
|
||||
|
||||
<!-- MicroG -->
|
||||
<project path="packages/apps/GmsCore" name="microg/android_packages_apps_GmsCore" remote="github" revision="master" />
|
||||
<project path="packages/apps/GsfProxy" name="microg/android_packages_apps_GsfProxy" remote="github" revision="master" />
|
||||
<project path="packages/apps/FakeStore" name="microg/android_packages_apps_FakeStore" remote="github" revision="master" />
|
||||
|
||||
<!-- F-Droid -->
|
||||
<remote name="fdroid" fetch="https://gitlab.com/fdroid/" />
|
||||
<project path="packages/apps/FDroidPrivilegedExtension" name="privileged-extension.git" remote="fdroid" revision="master" />
|
||||
<project path="packages/apps/FDroid" name="fdroidclient.git" remote="fdroid" revision="master" />
|
||||
<!-- END OF REPLACEMENT REPOS -->
|
||||
|
||||
|
||||
<!-- START OF DEVICE REPOS -->
|
||||
<!-- Common -->
|
||||
<project path="packages/resources/devicesettings" name="CyanogenMod/android_packages_resources_devicesettings" remote="github" />
|
||||
<project path="device/amazon/hdx-common" name="CyanogenMod/android_device_amazon_hdx-common" remote="github" />
|
||||
<project path="device/oppo/common" name="CyanogenMod/android_device_oppo_common" remote="github" />
|
||||
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" />
|
||||
<project path="hardware/samsung" name="CyanogenMod/android_hardware_samsung" remote="github" />
|
||||
<project path="hardware/sony/thermanager" name="CyanogenMod/android_hardware_sony_thermanager" remote="github" />
|
||||
<project path="kernel/amazon/hdx-common" name="CyanogenMod/android_kernel_amazon_hdx-common" remote="github" />
|
||||
<project path="kernel/google/msm" name="CyanogenMod/android_kernel_google_msm" remote="github" />
|
||||
|
||||
<!-- Nexus 4 (Mako) -->
|
||||
<project path="device/lge/mako" name="CyanogenMod/android_device_lge_mako" remote="github" />
|
||||
<project path="kernel/lge/mako" name="CyanogenMod/lge-kernel-mako" remote="github" />
|
||||
|
||||
<!-- Nexus 5 (Hammerhead) -->
|
||||
<project path="device/lge/hammerhead" name="CyanogenMod/android_device_lge_hammerhead" remote="github" />
|
||||
<project path="kernel/lge/hammerhead" name="CyanogenMod/android_kernel_lge_hammerhead" remote="github" />
|
||||
|
||||
<!-- Nexus 6 (Shamu) -->
|
||||
<project path="device/moto/shamu" name="CyanogenMod/android_device_moto_shamu" remote="github" />
|
||||
<project path="kernel/moto/shamu" name="CyanogenMod/android_kernel_moto_shamu" remote="github" />
|
||||
|
||||
<!-- Nexus 5X (Bullhead) -->
|
||||
<project path="device/lge/bullhead" name="CyanogenMod/android_device_lge_bullhead" remote="github" />
|
||||
<project path="kernel/lge/bullhead" name="CyanogenMod/android_kernel_lge_bullhead" remote="github" />
|
||||
|
||||
<!-- Nexus 6P (Angler) -->
|
||||
<project path="device/huawei/angler" name="CyanogenMod/android_device_huawei_angler" remote="github" />
|
||||
<project path="kernel/huawei/angler" name="CyanogenMod/android_kernel_huawei_angler" remote="github" />
|
||||
|
||||
<!-- Amazon Kindle Fire HDX 7 3rd Gen (Thor)-->
|
||||
<project path="device/amazon/thor" name="CyanogenMod/android_device_amazon_thor" remote="github" />
|
||||
|
||||
<!-- Asus Zenfone 2 Laser (Z00T) -->
|
||||
<project name="CyanogenMod/android_device_asus_msm8916-common" path="device/asus/msm8916-common" remote="github" />
|
||||
<project name="CyanogenMod/android_device_asus_Z00T" path="device/asus/Z00T" remote="github" />
|
||||
<project name="CyanogenMod/android_kernel_asus_msm8916" path="kernel/asus/msm8916" remote="github" />
|
||||
|
||||
<!-- LG G3 (VS985) -->
|
||||
<project path="device/lge/g3-common" name="CyanogenMod/android_device_lge_g3-common" remote="github" />
|
||||
<project path="device/lge/vs985" name="CyanogenMod/android_device_lge_vs985" remote="github" />
|
||||
<project path="kernel/lge/g3" name="CyanogenMod/android_kernel_lge_g3" remote="github" />
|
||||
|
||||
<!-- Moto X Pure Edition (XT1575) -->
|
||||
<project path="device/motorola/clark" name="CyanogenMod/android_device_motorola_clark" remote="github" />
|
||||
<project path="kernel/motorola/msm8992" name="CyanogenMod/android_kernel_motorola_msm8992" remote="github" />
|
||||
|
||||
<!-- OnePlus One (Bacon) -->
|
||||
<project path="device/oneplus/bacon" name="CyanogenMod/android_device_oneplus_bacon" remote="github" />
|
||||
<project path="device/oppo/msm8974-common" name="CyanogenMod/android_device_oppo_msm8974-common" remote="github" />
|
||||
<project path="kernel/oneplus/msm8974" name="CyanogenMod/android_kernel_oneplus_msm8974" remote="github" />
|
||||
|
||||
<!-- Samsung Galaxy Note 4 (trltetmo)
|
||||
<project path="device/samsung/trlte-common" name="CyanogenMod/android_device_samsung_trlte-common" remote="github" />
|
||||
<project path="device/samsung/trltetmo" name="CyanogenMod/android_device_samsung_trltetmo" remote="github" />
|
||||
<project path="kernel/samsung/trlte" name="CyanogenMod/android_kernel_samsung_trlte" remote="github" />-->
|
||||
|
||||
<!-- Proprietary Blobs -->
|
||||
<project path="vendor/amazon" name="TheMuppets/proprietary_vendor_amazon" remote="github" />
|
||||
<project path="vendor/asus" name="TheMuppets/proprietary_vendor_asus" remote="github" />
|
||||
<project path="vendor/huawei" name="TheMuppets/proprietary_vendor_huawei" remote="github" />
|
||||
<project path="vendor/lge" name="TheMuppets/proprietary_vendor_lge" remote="github" />
|
||||
<project path="vendor/motorola" name="TheMuppets/proprietary_vendor_motorola" remote="github" />
|
||||
<project path="vendor/oneplus" name="TheMuppets/proprietary_vendor_oneplus" remote="github" />
|
||||
<project path="vendor/oppo" name="TheMuppets/proprietary_vendor_oppo" remote="github" />
|
||||
<project path="vendor/samsung" name="TheMuppets/proprietary_vendor_samsung" remote="github" />
|
||||
<project path="vendor/qcom/binaries" name="TheMuppets/proprietary_vendor_qcom_binaries" remote="github" />
|
||||
<!-- END OF DEVICE REPOS -->
|
||||
|
||||
</manifest>
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<manifest>
|
||||
|
||||
<!-- START OF DEVICE REPOS -->
|
||||
<!-- Proprietary Blobs -->
|
||||
<project path="vendor/lge" name="DonkeyCoyote/proprietary_vendor_lge" remote="github" revision="android-7.1" />
|
||||
<project path="vendor/motorola" name="DonkeyCoyote/proprietary_vendor_motorola" remote="github" revision="android-7.1" />
|
||||
<project path="vendor/oneplus" name="DonkeyCoyote/proprietary_vendor_oneplus" remote="github" revision="android-7.1" />
|
||||
<project path="vendor/oppo" name="DonkeyCoyote/proprietary_vendor_oppo" remote="github" revision="android-7.1" />
|
||||
<project path="vendor/qcom/binaries" name="DonkeyCoyote/proprietary_vendor_qcom_binaries" remote="github" revision="android-7.1" />
|
||||
<!-- END OF DEVICE REPOS -->
|
||||
|
||||
</manifest>
|
||||
|
@ -1,104 +0,0 @@
|
||||
From 4eb4173b876ab4b4d71a5be541096d346649bbef Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sat, 30 May 2015 22:47:50 -0400
|
||||
Subject: [PATCH] add optional automated signing
|
||||
|
||||
---
|
||||
core/Makefile | 48 ++++++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 40 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/core/Makefile b/core/Makefile
|
||||
index 7eca2db..82006c9 100644
|
||||
--- a/core/Makefile
|
||||
+++ b/core/Makefile
|
||||
@@ -408,6 +408,11 @@ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
DEFAULT_KEY_CERT_PAIR := $(OTA_PACKAGE_SIGNING_KEY)
|
||||
endif
|
||||
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ KEY_CERT_DIR := $(SIGNING_KEY_DIR)
|
||||
+ DEFAULT_KEY_CERT_PAIR := $(SIGNING_KEY_DIR)/releasekey
|
||||
+endif
|
||||
+
|
||||
# Rules that need to be present for the all targets, even
|
||||
# if they don't do anything.
|
||||
.PHONY: systemimage
|
||||
@@ -943,13 +948,18 @@ endif
|
||||
# substitute other keys for this one.
|
||||
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
||||
|
||||
-ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
- OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
||||
- PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ OTA_PUBLIC_KEYS := $(SIGNING_KEY_DIR)/releasekey.x509.pem
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS += $(SIGNING_KEY_DIR)/extra
|
||||
else
|
||||
- PRODUCT_EXTRA_RECOVERY_KEYS += \
|
||||
- build/target/product/security/cm \
|
||||
- build/target/product/security/cm-devkey
|
||||
+ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
+ OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
+ else
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS += \
|
||||
+ build/target/product/security/cm \
|
||||
+ build/target/product/security/cm-devkey
|
||||
+ endif
|
||||
endif
|
||||
|
||||
# Generate a file containing the keys that will be read by the
|
||||
@@ -1593,6 +1603,12 @@ BUILT_TARGET_FILES_PACKAGE := $(intermediates)/$(name).zip
|
||||
$(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
|
||||
$(BUILT_TARGET_FILES_PACKAGE): \
|
||||
zip_root := $(intermediates)/$(name)
|
||||
+SIGNED_TARGET_FILES_PACKAGE := $(intermediates)/signed-$(name).zip
|
||||
+MAYBE_SIGNED_TARGET_FILES_PACKAGE := $(BUILT_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ MAYBE_SIGNED_TARGET_FILES_PACKAGE := $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+endif
|
||||
|
||||
# $(1): Directory to copy
|
||||
# $(2): Location to copy it to
|
||||
@@ -1868,6 +1884,12 @@ else
|
||||
OTA_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT)
|
||||
endif
|
||||
|
||||
+ifeq ($(TARGET_RELEASETOOL_SIGN_TARGET_SCRIPT),)
|
||||
+ SIGN_TARGET_SCRIPT := ./build/tools/releasetools/sign_target_files_apks
|
||||
+else
|
||||
+ SIGN_TARGET_SCRIPT := $(TARGET_RELEASETOOL_SIGN_TARGET_SCRIPT)
|
||||
+endif
|
||||
+
|
||||
ifeq ($(WITH_GMS),true)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false
|
||||
else
|
||||
@@ -1895,7 +1917,17 @@ ifneq ($(BLOCK_BASED_OTA),false)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): block_based := --block
|
||||
endif
|
||||
|
||||
-$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
+$(SIGNED_TARGET_FILES_PACKAGE): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
+ @echo "$(SIGN_TARGET_SCRIPT)" > $(PRODUCT_OUT)/sign_script_path
|
||||
+ @echo -e ${CL_YLW}"Sign target files:"${CL_RST}" $@"
|
||||
+ $(hide) $(SIGN_TARGET_SCRIPT) \
|
||||
+ -d $(KEY_CERT_DIR) \
|
||||
+ -o \
|
||||
+ -e SMSSecure.apk,Orbot.apk,Android-IMSI-Catcher-Detector.apk,FreeOTP.apk,F-Droid.apk= \
|
||||
+ $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
+ $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
@echo "$(OTA_FROM_TARGET_SCRIPT)" > $(PRODUCT_OUT)/ota_script_path
|
||||
@echo "$(override_device)" > $(PRODUCT_OUT)/ota_override_device
|
||||
@echo -e ${CL_YLW}"Package OTA:"${CL_RST}" $@"
|
||||
@@ -1907,7 +1939,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
--backup=$(backuptool) \
|
||||
--override_device=$(override_device) $(override_prop) \
|
||||
$(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \
|
||||
- $(BUILT_TARGET_FILES_PACKAGE) $@
|
||||
+ $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $@
|
||||
|
||||
CM_TARGET_PACKAGE := $(PRODUCT_OUT)/cm-$(CM_VERSION).zip
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 56366ba56892d9de832ca86c95acb6674820d360 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 14 May 2015 19:14:53 -0400
|
||||
Subject: [PATCH] enable secure_delete by default
|
||||
|
||||
This sanitizes deleted data by overwriting it with zeroes. It prevents a
|
||||
non-root user from obtaining the deleted data even though it can still
|
||||
linger on the underlying storage device.
|
||||
---
|
||||
dist/Android.mk | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dist/Android.mk b/dist/Android.mk
|
||||
index 20b3a0a..7eabbdc 100644
|
||||
--- a/dist/Android.mk
|
||||
+++ b/dist/Android.mk
|
||||
@@ -27,7 +27,8 @@ common_sqlite_flags := \
|
||||
-DSQLITE_OMIT_BUILTIN_TEST \
|
||||
-DSQLITE_OMIT_COMPILEOPTION_DIAGS \
|
||||
-DSQLITE_OMIT_LOAD_EXTENSION \
|
||||
- -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
|
||||
+ -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 \
|
||||
+ -DSQLITE_SECURE_DELETE
|
||||
|
||||
device_sqlite_flags := $(common_sqlite_flags) \
|
||||
-DSQLITE_ENABLE_ICU \
|
@ -1,50 +0,0 @@
|
||||
From 938608ff6a4c61b4c1db2f6b94e81cae1a970aae Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 27 May 2015 00:29:08 -0400
|
||||
Subject: [PATCH] hide passwords by default
|
||||
|
||||
---
|
||||
core/java/android/text/method/TextKeyListener.java | 2 +-
|
||||
core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java | 2 +-
|
||||
packages/Keyguard/src/com/android/keyguard/PasswordTextView.java | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/text/method/TextKeyListener.java b/core/java/android/text/method/TextKeyListener.java
|
||||
index 994f3d7..b2ac244 100644
|
||||
--- a/core/java/android/text/method/TextKeyListener.java
|
||||
+++ b/core/java/android/text/method/TextKeyListener.java
|
||||
@@ -291,7 +291,7 @@ private void updatePrefs(ContentResolver resolver) {
|
||||
boolean cap = System.getInt(resolver, System.TEXT_AUTO_CAPS, 1) > 0;
|
||||
boolean text = System.getInt(resolver, System.TEXT_AUTO_REPLACE, 1) > 0;
|
||||
boolean period = System.getInt(resolver, System.TEXT_AUTO_PUNCTUATE, 1) > 0;
|
||||
- boolean pw = System.getInt(resolver, System.TEXT_SHOW_PASSWORD, 1) > 0;
|
||||
+ boolean pw = System.getInt(resolver, System.TEXT_SHOW_PASSWORD, 0) > 0;
|
||||
|
||||
mPrefs = (cap ? AUTO_CAP : 0) |
|
||||
(text ? AUTO_TEXT : 0) |
|
||||
diff --git a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
||||
index b2c9dc5..dc5b7f9 100644
|
||||
--- a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
||||
+++ b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
||||
@@ -159,7 +159,7 @@ public void setKeyboardMode(int mode) {
|
||||
mKeyboardState = KEYBOARD_STATE_NORMAL;
|
||||
final boolean visiblePassword = Settings.System.getInt(
|
||||
mContext.getContentResolver(),
|
||||
- Settings.System.TEXT_SHOW_PASSWORD, 1) != 0;
|
||||
+ Settings.System.TEXT_SHOW_PASSWORD, 0) != 0;
|
||||
final boolean enablePreview = false; // TODO: grab from configuration
|
||||
mKeyboardView.setPreviewEnabled(visiblePassword && enablePreview);
|
||||
break;
|
||||
diff --git a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
||||
index 50e7ecb..7d29928 100644
|
||||
--- a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
||||
+++ b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
||||
@@ -129,7 +129,7 @@ public PasswordTextView(Context context, AttributeSet attrs, int defStyleAttr,
|
||||
mCharPadding = getContext().getResources().getDimensionPixelSize(R.dimen
|
||||
.password_char_padding);
|
||||
mShowPassword = Settings.System.getInt(mContext.getContentResolver(),
|
||||
- Settings.System.TEXT_SHOW_PASSWORD, 1) == 1;
|
||||
+ Settings.System.TEXT_SHOW_PASSWORD, 0) == 1;
|
||||
mAppearInterpolator = AnimationUtils.loadInterpolator(mContext,
|
||||
android.R.interpolator.linear_out_slow_in);
|
||||
mDisappearInterpolator = AnimationUtils.loadInterpolator(mContext,
|
@ -1,154 +0,0 @@
|
||||
From a798817de09cc787850ee957c7326fb36dc6c5a5 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 3 Dec 2015 14:27:34 -0500
|
||||
Subject: [PATCH] support separate encryption/lockscreen passwords
|
||||
|
||||
This adds the necessary infrastructure for allowing users to opt-in to a
|
||||
distinct device encryption passphrase. The passwords are still tied
|
||||
together by default. This makes it possible to use a complex encryption
|
||||
passphrase without losing the convenience of a very simple lockscreen
|
||||
pin.
|
||||
|
||||
This feature can be combined with a forced reboot after a chosen number
|
||||
of failed unlocking attempts to prevent brute-forcing by requiring the
|
||||
entry of the encryption password instead.
|
||||
---
|
||||
core/java/android/provider/Settings.java | 7 +++
|
||||
.../android/internal/widget/LockPatternUtils.java | 72 +++++++++++++++++++++-
|
||||
.../com/android/server/LockSettingsService.java | 1 +
|
||||
3 files changed, 77 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
|
||||
index e107fd1..a6be540 100644
|
||||
--- a/core/java/android/provider/Settings.java
|
||||
+++ b/core/java/android/provider/Settings.java
|
||||
@@ -4850,6 +4850,13 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val
|
||||
"lock_screen_allow_private_notifications";
|
||||
|
||||
/**
|
||||
+ * Separate password for encryption and the lockscreen.
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final String LOCK_SEPARATE_ENCRYPTION_PASSWORD =
|
||||
+ "lock_separate_encryption_password";
|
||||
+
|
||||
+ /**
|
||||
* Set by the system to track if the user needs to see the call to action for
|
||||
* the lockscreen notification policy.
|
||||
* @hide
|
||||
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
|
||||
index ae22b50..25f56e7 100644
|
||||
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
|
||||
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
|
||||
@@ -457,7 +457,8 @@ public void clearLock(int userHandle) {
|
||||
// well, we tried...
|
||||
}
|
||||
|
||||
- if (userHandle == UserHandle.USER_OWNER) {
|
||||
+ if (userHandle == UserHandle.USER_OWNER
|
||||
+ && !isSeparateEncryptionPasswordEnabled()) {
|
||||
// Set the encryption password to default.
|
||||
updateEncryptionPassword(StorageManager.CRYPT_TYPE_DEFAULT, null);
|
||||
}
|
||||
@@ -518,7 +519,8 @@ public void saveLockPattern(List<LockPatternView.Cell> pattern, String savedPatt
|
||||
|
||||
// Update the device encryption password.
|
||||
if (userId == UserHandle.USER_OWNER
|
||||
- && LockPatternUtils.isDeviceEncryptionEnabled()) {
|
||||
+ && LockPatternUtils.isDeviceEncryptionEnabled()
|
||||
+ && !isSeparateEncryptionPasswordEnabled()) {
|
||||
if (!shouldEncryptWithCredentials(true)) {
|
||||
clearEncryptionPassword();
|
||||
} else {
|
||||
@@ -727,7 +729,8 @@ public void saveLockPassword(String password, String savedPassword, int quality,
|
||||
|
||||
// Update the device encryption password.
|
||||
if (userHandle == UserHandle.USER_OWNER
|
||||
- && LockPatternUtils.isDeviceEncryptionEnabled()) {
|
||||
+ && LockPatternUtils.isDeviceEncryptionEnabled()
|
||||
+ && !isSeparateEncryptionPasswordEnabled()) {
|
||||
if (!shouldEncryptWithCredentials(true)) {
|
||||
clearEncryptionPassword();
|
||||
} else {
|
||||
@@ -1071,6 +1074,69 @@ public void setVisiblePasswordEnabled(boolean enabled, int userId) {
|
||||
}
|
||||
}
|
||||
|
||||
+ private void updateEncryptionPasswordFromPassword(String password) {
|
||||
+ if (!TextUtils.isEmpty(password)) {
|
||||
+ int computedQuality = computePasswordQuality(password);
|
||||
+ boolean numeric = computedQuality
|
||||
+ == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
|
||||
+ boolean numericComplex = computedQuality
|
||||
+ == DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX;
|
||||
+ int type = numeric || numericComplex ? StorageManager.CRYPT_TYPE_PIN
|
||||
+ : StorageManager.CRYPT_TYPE_PASSWORD;
|
||||
+ updateEncryptionPassword(type, password);
|
||||
+ } else {
|
||||
+ clearEncryptionPassword();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the encryption password separately from the lockscreen password.
|
||||
+ *
|
||||
+ * @param password The password to save
|
||||
+ */
|
||||
+ public void setSeparateEncryptionPassword(String password) {
|
||||
+ updateEncryptionPasswordFromPassword(password);
|
||||
+ setSeparateEncryptionPasswordEnabled(true);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Replace the separate encryption password by tying it to the lockscreen
|
||||
+ * password. No change will occur if the provided lockscreen password is
|
||||
+ * incorrect.
|
||||
+ *
|
||||
+ * @param password The current lockscreen password
|
||||
+ * @return Whether the lockscreen password was correct.
|
||||
+ */
|
||||
+ public void replaceSeparateEncryptionPassword(String password) {
|
||||
+ updateEncryptionPasswordFromPassword(password);
|
||||
+ setSeparateEncryptionPasswordEnabled(false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Replace the separate encryption password by tying it to the lockscreen
|
||||
+ * pattern. No change will occur if the provided lockscreen password is
|
||||
+ * incorrect.
|
||||
+ *
|
||||
+ * @param pattern The current lockscreen pattern
|
||||
+ * @return Whether the lockscreen pattern was correct.
|
||||
+ */
|
||||
+ public void replaceSeparateEncryptionPasswordWithPattern(List<LockPatternView.Cell> pattern) {
|
||||
+ String stringPattern = patternToString(pattern);
|
||||
+ updateEncryptionPassword(StorageManager.CRYPT_TYPE_PATTERN, stringPattern);
|
||||
+ setSeparateEncryptionPasswordEnabled(false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return Whether the encryption password is separate from the lockscreen password.
|
||||
+ */
|
||||
+ public boolean isSeparateEncryptionPasswordEnabled() {
|
||||
+ return getBoolean(Settings.Secure.LOCK_SEPARATE_ENCRYPTION_PASSWORD, false, UserHandle.USER_OWNER);
|
||||
+ }
|
||||
+
|
||||
+ private void setSeparateEncryptionPasswordEnabled(boolean enabled) {
|
||||
+ setBoolean(Settings.Secure.LOCK_SEPARATE_ENCRYPTION_PASSWORD, enabled, UserHandle.USER_OWNER);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* @return Whether tactile feedback for the pattern is enabled.
|
||||
*/
|
||||
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
|
||||
index bb0615d..6e05fde 100644
|
||||
--- a/services/core/java/com/android/server/LockSettingsService.java
|
||||
+++ b/services/core/java/com/android/server/LockSettingsService.java
|
||||
@@ -813,6 +813,7 @@ public void requireStrongAuth(int strongAuthReason, int userId) {
|
||||
Secure.LOCK_PATTERN_SIZE,
|
||||
Secure.LOCK_DOTS_VISIBLE,
|
||||
Secure.LOCK_SHOW_ERROR_PATH,
|
||||
+ Secure.LOCK_SEPARATE_ENCRYPTION_PASSWORD
|
||||
};
|
||||
|
||||
// Reading these settings needs the contacts permission
|
@ -1,22 +0,0 @@
|
||||
From e46cfef3dcfec3b5ee5aff05c46d21ea76b36100 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sat, 5 Dec 2015 19:33:19 -0500
|
||||
Subject: [PATCH] remove analytics support
|
||||
|
||||
---
|
||||
.../src/com/android/providers/settings/DatabaseHelper.java | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
|
||||
index b3ec295..9784ee7 100644
|
||||
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
|
||||
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
|
||||
@@ -1911,8 +1911,6 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) {
|
||||
}
|
||||
|
||||
if (upgradeVersion < 115) {
|
||||
- moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_SECURE,
|
||||
- new String[] { CMSettings.Secure.STATS_COLLECTION }, true);
|
||||
if (mUserHandle == UserHandle.USER_OWNER) {
|
||||
db.beginTransaction();
|
||||
SQLiteStatement stmt = null;
|
@ -1,31 +0,0 @@
|
||||
From 4b908ef94233b911fe3d6f2d93a6076a7ab92151 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 5 Apr 2015 00:57:23 -0400
|
||||
Subject: [PATCH] remove duckduckgo referral strings
|
||||
|
||||
---
|
||||
res/values/all_search_engines.xml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/res/values/all_search_engines.xml b/res/values/all_search_engines.xml
|
||||
index a87c880..51ebfe4 100644
|
||||
--- a/res/values/all_search_engines.xml
|
||||
+++ b/res/values/all_search_engines.xml
|
||||
@@ -752,7 +752,7 @@ http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_4#OpenSearch_1.1_p
|
||||
<item>DuckDuckGo</item>
|
||||
<item>duckduckgo.com</item>
|
||||
<item>https://duckduckgo.com/favicon.ico</item>
|
||||
- <item>https://duckduckgo.com/?q={searchTerms}&t=cyanogenmod</item>
|
||||
+ <item>https://duckduckgo.com/?q={searchTerms}</item>
|
||||
<item>UTF-8</item>
|
||||
<item></item>
|
||||
</string-array>
|
||||
@@ -760,7 +760,7 @@ http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_4#OpenSearch_1.1_p
|
||||
<item>DuckDuckGo (UK)</item>
|
||||
<item>duckduckgo.com</item>
|
||||
<item>https://duckduckgo.com/favicon.ico</item>
|
||||
- <item>https://duckduckgo.com/?q={searchTerms}%20r:uk&t=cyanogenmod</item>
|
||||
+ <item>https://duckduckgo.com/?q={searchTerms}%20r:uk</item>
|
||||
<item>UTF-8</item>
|
||||
<item></item>
|
||||
</string-array>
|
@ -1,36 +0,0 @@
|
||||
From 58bde4cc16f1a0544526fed769542b707b7dc516 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 20 Mar 2015 18:13:23 -0400
|
||||
Subject: [PATCH] switch default search engine to duckduckgo
|
||||
|
||||
---
|
||||
res/xml-sw600dp/advanced_preferences.xml | 2 +-
|
||||
res/xml/advanced_preferences.xml | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/res/xml-sw600dp/advanced_preferences.xml b/res/xml-sw600dp/advanced_preferences.xml
|
||||
index f3107d8..ae19504 100644
|
||||
--- a/res/xml-sw600dp/advanced_preferences.xml
|
||||
+++ b/res/xml-sw600dp/advanced_preferences.xml
|
||||
@@ -21,7 +21,7 @@
|
||||
<com.android.browser.search.SearchEnginePreference
|
||||
android:key="search_engine"
|
||||
android:title="@string/pref_content_search_engine"
|
||||
- android:defaultValue="google"
|
||||
+ android:defaultValue="duckduckgo"
|
||||
android:summary="@string/pref_content_search_engine_summary"
|
||||
android:dialogTitle="@string/pref_content_search_engine" />
|
||||
|
||||
diff --git a/res/xml/advanced_preferences.xml b/res/xml/advanced_preferences.xml
|
||||
index 1b051f8..f068330 100644
|
||||
--- a/res/xml/advanced_preferences.xml
|
||||
+++ b/res/xml/advanced_preferences.xml
|
||||
@@ -21,7 +21,7 @@
|
||||
<com.android.browser.search.SearchEnginePreference
|
||||
android:key="search_engine"
|
||||
android:title="@string/pref_content_search_engine"
|
||||
- android:defaultValue="google"
|
||||
+ android:defaultValue="duckduckgo"
|
||||
android:summary="@string/pref_content_search_engine_summary"
|
||||
android:dialogTitle="@string/pref_content_search_engine" />
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 54f68f47ef79ebda9b695e0205b8abc4e2f07d86 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 5 Apr 2015 01:00:31 -0400
|
||||
Subject: [PATCH] switch default home page to duckduckgo
|
||||
|
||||
---
|
||||
res/values/strings.xml | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index d79c7f7..0899df9 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -794,8 +794,7 @@
|
||||
<string name="dump_nav" translatable="false">Dump navigation cache</string>
|
||||
|
||||
<!-- The default homepage. -->
|
||||
- <string name="homepage_base" translatable="false">
|
||||
- https://www.google.com/webhp?client={CID}&source=android-home</string>
|
||||
+ <string name="homepage_base" translatable="false">https://duckduckgo.com/</string>
|
||||
|
||||
<!-- Bookmarks -->
|
||||
<string-array name="bookmarks" translatable="false">
|
@ -1,22 +0,0 @@
|
||||
From defa0e59c0f38e8f0ea6429ee05414a9402bbd8b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 5 Apr 2015 01:27:56 -0400
|
||||
Subject: [PATCH] disable link preloading by default
|
||||
|
||||
---
|
||||
res/values/strings.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 0899df9..8529cf6 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -684,7 +684,7 @@
|
||||
<string name="pref_link_prefetch_value_never" translatable="false">NEVER</string>
|
||||
<string name="pref_link_prefetch_value_wifi_only" translatable="false">WIFI_ONLY</string>
|
||||
<string name="pref_link_prefetch_value_always" translatable="false">ALWAYS</string>
|
||||
- <string name="pref_link_prefetch_default_value" translatable="false">@string/pref_link_prefetch_value_wifi_only</string>
|
||||
+ <string name="pref_link_prefetch_default_value" translatable="false">@string/pref_link_prefetch_value_never</string>
|
||||
<string-array name="pref_link_prefetch_values" translatable="false">
|
||||
<item><xliff:g>@string/pref_link_prefetch_value_never</xliff:g></item>
|
||||
<item><xliff:g>@string/pref_link_prefetch_value_wifi_only</xliff:g></item>
|
@ -1,22 +0,0 @@
|
||||
From a2cf2c31329c3b14798059d0d7a56b7568089552 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 5 Apr 2015 01:29:22 -0400
|
||||
Subject: [PATCH] disable search result preloading by default
|
||||
|
||||
---
|
||||
res/values/strings.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 8529cf6..9012511 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -662,7 +662,7 @@
|
||||
<string name="pref_data_preload_value_never" translatable="false">NEVER</string>
|
||||
<string name="pref_data_preload_value_wifi_only" translatable="false">WIFI_ONLY</string>
|
||||
<string name="pref_data_preload_value_always" translatable="false">ALWAYS</string>
|
||||
- <string name="pref_data_preload_default_value" translatable="false">@string/pref_data_preload_value_wifi_only</string>
|
||||
+ <string name="pref_data_preload_default_value" translatable="false">@string/pref_data_preload_value_never</string>
|
||||
<string-array name="pref_data_preload_values" translatable="false">
|
||||
<item><xliff:g>@string/pref_data_preload_value_never</xliff:g></item>
|
||||
<item><xliff:g>@string/pref_data_preload_value_wifi_only</xliff:g></item>
|
@ -1,36 +0,0 @@
|
||||
From 093e38c00f3e46f875726f1e14190e2f120d3ed7 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 7 Apr 2015 02:18:09 -0400
|
||||
Subject: [PATCH] disable plugins by default
|
||||
|
||||
---
|
||||
res/xml-sw600dp/advanced_preferences.xml | 2 +-
|
||||
res/xml/advanced_preferences.xml | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/res/xml-sw600dp/advanced_preferences.xml b/res/xml-sw600dp/advanced_preferences.xml
|
||||
index ae19504..93ccbf1 100644
|
||||
--- a/res/xml-sw600dp/advanced_preferences.xml
|
||||
+++ b/res/xml-sw600dp/advanced_preferences.xml
|
||||
@@ -46,7 +46,7 @@
|
||||
<ListPreference
|
||||
android:key="plugin_state"
|
||||
android:title="@string/pref_content_plugins"
|
||||
- android:defaultValue="ON"
|
||||
+ android:defaultValue="OFF"
|
||||
android:entries="@array/pref_content_plugins_choices"
|
||||
android:entryValues="@array/pref_content_plugins_values"
|
||||
android:dialogTitle="@string/pref_content_plugins" />
|
||||
diff --git a/res/xml/advanced_preferences.xml b/res/xml/advanced_preferences.xml
|
||||
index f068330..0996bab 100644
|
||||
--- a/res/xml/advanced_preferences.xml
|
||||
+++ b/res/xml/advanced_preferences.xml
|
||||
@@ -51,7 +51,7 @@
|
||||
<ListPreference
|
||||
android:key="plugin_state"
|
||||
android:title="@string/pref_content_plugins"
|
||||
- android:defaultValue="ON"
|
||||
+ android:defaultValue="OFF"
|
||||
android:entries="@array/pref_content_plugins_choices"
|
||||
android:entryValues="@array/pref_content_plugins_values"
|
||||
android:dialogTitle="@string/pref_content_plugins" />
|
@ -1,203 +0,0 @@
|
||||
From 664f95d59cc672fb8b8ea3068a92530b08114f95 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 7 Apr 2015 03:23:22 -0400
|
||||
Subject: [PATCH] remove RLZ tracking
|
||||
|
||||
---
|
||||
AndroidManifest.xml | 8 --
|
||||
res/values/strings.xml | 3 -
|
||||
src/com/android/browser/UrlHandler.java | 129 --------------------------------
|
||||
3 files changed, 140 deletions(-)
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index 0ffdec4..7152192 100644
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -239,14 +239,6 @@
|
||||
<!-- Makes .BrowserActivity the search target for any activity in Browser -->
|
||||
<meta-data android:name="android.app.default_searchable" android:value=".BrowserActivity" />
|
||||
|
||||
- <!-- Application code for RLZ tracking. RLZ assigns non-unique, non-personally identifiable
|
||||
- tracking labels to client products; these labels sometimes appear in Google search
|
||||
- queries. See http://code.google.com/p/rlz for more info.
|
||||
-
|
||||
- This value signifies to the RLZ client that this application uses RLZ tracking. -->
|
||||
- <meta-data android:name="com.google.android.partnersetup.RLZ_ACCESS_POINT"
|
||||
- android:value="@string/rlz_access_point" />
|
||||
-
|
||||
<receiver android:name=".OpenDownloadReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"/>
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 9012511..d9023ec 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -875,9 +875,6 @@
|
||||
<!-- The folder name for the special "Other Bookmarks" folder created by Chrome [CHAR LIMIT=24] -->
|
||||
<string name="other_bookmarks">Other Bookmarks</string>
|
||||
|
||||
- <!-- Access point for RLZ tracking. -->
|
||||
- <string name="rlz_access_point">Y1</string>
|
||||
-
|
||||
<!-- Title for a dialog asking the user which account to sync their bookmarks to [CHAR LIMIT=32] -->
|
||||
<string name="account_chooser_dialog_title" msgid="4833571985009544332">Choose account</string>
|
||||
|
||||
diff --git a/src/com/android/browser/UrlHandler.java b/src/com/android/browser/UrlHandler.java
|
||||
index 084a479..52919c8 100644
|
||||
--- a/src/com/android/browser/UrlHandler.java
|
||||
+++ b/src/com/android/browser/UrlHandler.java
|
||||
@@ -38,9 +38,6 @@
|
||||
*/
|
||||
public class UrlHandler {
|
||||
|
||||
- static final String RLZ_PROVIDER = "com.google.android.partnersetup.rlzappprovider";
|
||||
- static final Uri RLZ_PROVIDER_URI = Uri.parse("content://" + RLZ_PROVIDER + "/");
|
||||
-
|
||||
// Use in overrideUrlLoading
|
||||
/* package */ final static String SCHEME_WTAI = "wtai://wp/";
|
||||
/* package */ final static String SCHEME_WTAI_MC = "wtai://wp/mc;";
|
||||
@@ -50,9 +47,6 @@
|
||||
Controller mController;
|
||||
Activity mActivity;
|
||||
|
||||
- private Boolean mIsProviderPresent = null;
|
||||
- private Uri mRlzUri = null;
|
||||
-
|
||||
public UrlHandler(Controller controller) {
|
||||
mController = controller;
|
||||
mActivity = mController.getActivity();
|
||||
@@ -101,20 +95,6 @@ boolean shouldOverrideUrlLoading(Tab tab, WebView view, String url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
- // If this is a Google search, attempt to add an RLZ string
|
||||
- // (if one isn't already present).
|
||||
- if (rlzProviderPresent()) {
|
||||
- Uri siteUri = Uri.parse(url);
|
||||
- if (needsRlzString(siteUri)) {
|
||||
- // Need to look up the RLZ info from a database, so do it in an
|
||||
- // AsyncTask. Although we are not overriding the URL load synchronously,
|
||||
- // we guarantee that we will handle this URL load after the task executes,
|
||||
- // so it's safe to just return true to WebCore now to stop its own loading.
|
||||
- new RLZTask(tab, siteUri, view).execute();
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (startActivityForUrl(tab, url)) {
|
||||
return true;
|
||||
}
|
||||
@@ -248,113 +228,4 @@ boolean handleMenuClick(Tab tab, String url) {
|
||||
|
||||
return false;
|
||||
}
|
||||
-
|
||||
- // TODO: Move this class into Tab, where it can be properly stopped upon
|
||||
- // closure of the tab
|
||||
- private class RLZTask extends AsyncTask<Void, Void, String> {
|
||||
- private Tab mTab;
|
||||
- private Uri mSiteUri;
|
||||
- private WebView mWebView;
|
||||
-
|
||||
- public RLZTask(Tab tab, Uri uri, WebView webView) {
|
||||
- mTab = tab;
|
||||
- mSiteUri = uri;
|
||||
- mWebView = webView;
|
||||
- }
|
||||
-
|
||||
- protected String doInBackground(Void... unused) {
|
||||
- String result = mSiteUri.toString();
|
||||
- Cursor cur = null;
|
||||
- try {
|
||||
- cur = mActivity.getContentResolver()
|
||||
- .query(getRlzUri(), null, null, null, null);
|
||||
- if (cur != null && cur.moveToFirst() && !cur.isNull(0)) {
|
||||
- result = mSiteUri.buildUpon()
|
||||
- .appendQueryParameter("rlz", cur.getString(0))
|
||||
- .build().toString();
|
||||
- }
|
||||
- } finally {
|
||||
- if (cur != null) {
|
||||
- cur.close();
|
||||
- }
|
||||
- }
|
||||
- return result;
|
||||
- }
|
||||
-
|
||||
- protected void onPostExecute(String result) {
|
||||
- // abort if we left browser already
|
||||
- if (mController.isActivityPaused()) return;
|
||||
- // Make sure the Tab was not closed while handling the task
|
||||
- if (mController.getTabControl().getTabPosition(mTab) != -1) {
|
||||
- // If the Activity Manager is not invoked, load the URL directly
|
||||
- if (!startActivityForUrl(mTab, result)) {
|
||||
- if (!handleMenuClick(mTab, result)) {
|
||||
- mController.loadUrl(mTab, result);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Determine whether the RLZ provider is present on the system.
|
||||
- private boolean rlzProviderPresent() {
|
||||
- if (mIsProviderPresent == null) {
|
||||
- PackageManager pm = mActivity.getPackageManager();
|
||||
- mIsProviderPresent = pm.resolveContentProvider(RLZ_PROVIDER, 0) != null;
|
||||
- }
|
||||
- return mIsProviderPresent;
|
||||
- }
|
||||
-
|
||||
- // Retrieve the RLZ access point string and cache the URI used to
|
||||
- // retrieve RLZ values.
|
||||
- private Uri getRlzUri() {
|
||||
- if (mRlzUri == null) {
|
||||
- String ap = mActivity.getResources()
|
||||
- .getString(R.string.rlz_access_point);
|
||||
- mRlzUri = Uri.withAppendedPath(RLZ_PROVIDER_URI, ap);
|
||||
- }
|
||||
- return mRlzUri;
|
||||
- }
|
||||
-
|
||||
- // Determine if this URI appears to be for a Google search
|
||||
- // and does not have an RLZ parameter.
|
||||
- // Taken largely from Chrome source, src/chrome/browser/google_url_tracker.cc
|
||||
- private static boolean needsRlzString(Uri uri) {
|
||||
- String scheme = uri.getScheme();
|
||||
- if (("http".equals(scheme) || "https".equals(scheme)) &&
|
||||
- (uri.getQueryParameter("q") != null) &&
|
||||
- (uri.getQueryParameter("rlz") == null)) {
|
||||
- String host = uri.getHost();
|
||||
- if (host == null) {
|
||||
- return false;
|
||||
- }
|
||||
- String[] hostComponents = host.split("\\.");
|
||||
-
|
||||
- if (hostComponents.length < 2) {
|
||||
- return false;
|
||||
- }
|
||||
- int googleComponent = hostComponents.length - 2;
|
||||
- String component = hostComponents[googleComponent];
|
||||
- if (!"google".equals(component)) {
|
||||
- if (hostComponents.length < 3 ||
|
||||
- (!"co".equals(component) && !"com".equals(component))) {
|
||||
- return false;
|
||||
- }
|
||||
- googleComponent = hostComponents.length - 3;
|
||||
- if (!"google".equals(hostComponents[googleComponent])) {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Google corp network handling.
|
||||
- if (googleComponent > 0 && "corp".equals(
|
||||
- hostComponents[googleComponent - 1])) {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- return true;
|
||||
- }
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
From cd7f624c7ead431469813ddf146f1b94c57eeda3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 13 Oct 2015 17:36:00 -0400
|
||||
Subject: [PATCH] disable location recording by default
|
||||
|
||||
---
|
||||
src/com/android/camera/settings/Keys.java | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/com/android/camera/settings/Keys.java b/src/com/android/camera/settings/Keys.java
|
||||
index f59591f..5092bfa 100644
|
||||
--- a/src/com/android/camera/settings/Keys.java
|
||||
+++ b/src/com/android/camera/settings/Keys.java
|
||||
@@ -182,6 +182,10 @@ public static void setDefaults(SettingsManager settingsManager, Context context)
|
||||
|
||||
settingsManager.setDefaults(KEY_SHOULD_SHOW_SETTINGS_BUTTON_CLING, true);
|
||||
|
||||
+ settingsManager.setDefaults(KEY_RECORD_LOCATION, false);
|
||||
+ if (!settingsManager.isSet(SettingsManager.SCOPE_GLOBAL, KEY_RECORD_LOCATION)) {
|
||||
+ settingsManager.setToDefault(SettingsManager.SCOPE_GLOBAL, KEY_RECORD_LOCATION);
|
||||
+ }
|
||||
}
|
||||
|
||||
/** Helper functions for some defined keys. */
|
@ -1,25 +0,0 @@
|
||||
From 8d7a463afe1ab6aaecdff9707576b4fe74fab713 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sat, 6 Jun 2015 10:40:51 -0400
|
||||
Subject: [PATCH] disable NFC and NDEF Push by default
|
||||
|
||||
---
|
||||
src/com/android/nfc/NfcService.java | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
|
||||
index 6aa0dfc..cd4b819 100755
|
||||
--- a/src/com/android/nfc/NfcService.java
|
||||
+++ b/src/com/android/nfc/NfcService.java
|
||||
@@ -98,9 +98,9 @@
|
||||
public static final String PREF = "NfcServicePrefs";
|
||||
|
||||
static final String PREF_NFC_ON = "nfc_on";
|
||||
- static final boolean NFC_ON_DEFAULT = true;
|
||||
+ static final boolean NFC_ON_DEFAULT = false;
|
||||
static final String PREF_NDEF_PUSH_ON = "ndef_push_on";
|
||||
- static final boolean NDEF_PUSH_ON_DEFAULT = true;
|
||||
+ static final boolean NDEF_PUSH_ON_DEFAULT = false;
|
||||
static final String PREF_FIRST_BEAM = "first_beam";
|
||||
static final String PREF_FIRST_BOOT = "first_boot";
|
||||
static final String PREF_AIRPLANE_OVERRIDE = "airplane_override";
|
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
||||
From 382f9153c766ef96ac03adbd1ad8ec5bae2fa193 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 2 Dec 2015 00:14:29 -0500
|
||||
Subject: [PATCH] hide passwords by default
|
||||
|
||||
---
|
||||
src/com/android/settings/CryptKeeperConfirm.java | 2 +-
|
||||
src/com/android/settings/SecuritySettings.java | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/com/android/settings/CryptKeeperConfirm.java b/src/com/android/settings/CryptKeeperConfirm.java
|
||||
index 45b50f6..bb0c7e5 100644
|
||||
--- a/src/com/android/settings/CryptKeeperConfirm.java
|
||||
+++ b/src/com/android/settings/CryptKeeperConfirm.java
|
||||
@@ -130,7 +130,7 @@ public void onClick(View v) {
|
||||
}
|
||||
int value = Settings.System.getInt(getContext().getContentResolver(),
|
||||
Settings.System.TEXT_SHOW_PASSWORD,
|
||||
- 1);
|
||||
+ 0);
|
||||
utils.setVisiblePasswordEnabled(value != 0, UserHandle.USER_OWNER);
|
||||
|
||||
Intent intent = new Intent(getActivity(), Blank.class);
|
||||
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
|
||||
index c0e5b73..ec04136 100644
|
||||
--- a/src/com/android/settings/SecuritySettings.java
|
||||
+++ b/src/com/android/settings/SecuritySettings.java
|
||||
@@ -661,7 +661,7 @@ public void onResume() {
|
||||
|
||||
if (mShowPassword != null) {
|
||||
mShowPassword.setChecked(Settings.System.getInt(getContentResolver(),
|
||||
- Settings.System.TEXT_SHOW_PASSWORD, 1) != 0);
|
||||
+ Settings.System.TEXT_SHOW_PASSWORD, 0) != 0);
|
||||
}
|
||||
|
||||
if (mResetCredentials != null) {
|
@ -1,756 +0,0 @@
|
||||
From 2d6aa76f7c765ac129d5ac163460eb8e62080afa Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Mon, 15 Jun 2015 10:06:33 -0400
|
||||
Subject: [PATCH] support setting a separate encryption password
|
||||
|
||||
---
|
||||
AndroidManifest.xml | 3 +
|
||||
res/values/strings.xml | 9 +
|
||||
res/xml/security_settings_encrypted.xml | 10 +
|
||||
.../android/settings/ChooseEncryptionPassword.java | 682 +++++++++++++++++++++
|
||||
4 files changed, 704 insertions(+)
|
||||
create mode 100644 src/com/android/settings/ChooseEncryptionPassword.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index 63648fc..a561d7e 100755
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -1524,6 +1524,9 @@
|
||||
<activity android:name="ChooseLockPassword" android:exported="false"
|
||||
android:windowSoftInputMode="stateVisible|adjustResize"/>
|
||||
|
||||
+ <activity android:name="ChooseEncryptionPassword" android:exported="false"
|
||||
+ android:windowSoftInputMode="stateVisible|adjustResize"/>
|
||||
+
|
||||
<activity android:name=".SetupEncryptionInterstitial"
|
||||
android:taskAffinity="com.android.wizard"
|
||||
android:theme="@style/SetupWizardDisableAppStartingTheme"/>
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 3072f33..d5324f1 100755
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -937,6 +937,15 @@
|
||||
<!-- Image button description to switch input method -->
|
||||
<string name="crypt_keeper_switch_input_method">Switch input method</string>
|
||||
|
||||
+ <!-- Title for PreferenceScreen to change encryption password [CHAR LIMIT=22] -->
|
||||
+ <string name="crypt_keeper_change_password_title">Change encryption password</string>
|
||||
+
|
||||
+ <!-- Summary for PreferenceScreen to change encryption password [CHAR LIMIT=45] -->
|
||||
+ <string name="crypt_keeper_change_password_summary">Change the password used for device encryption</string>
|
||||
+
|
||||
+ <!-- Header on first screen of choose encryption password [CHAR LIMIT=30] -->
|
||||
+ <string name="crypt_keeper_choose_your_password_header">Set encryption password</string>
|
||||
+
|
||||
<!-- Unlock Picker Settings --><skip />
|
||||
|
||||
<!-- Security Picker --><skip />
|
||||
diff --git a/res/xml/security_settings_encrypted.xml b/res/xml/security_settings_encrypted.xml
|
||||
index 2399243..f05bad5 100644
|
||||
--- a/res/xml/security_settings_encrypted.xml
|
||||
+++ b/res/xml/security_settings_encrypted.xml
|
||||
@@ -27,6 +27,16 @@
|
||||
android:title="@string/crypt_keeper_encrypt_title"
|
||||
android:summary="@string/crypt_keeper_encrypted_summary"/>
|
||||
|
||||
+ <Preference
|
||||
+ android:key="crypt_keeper_change_password"
|
||||
+ android:title="@string/crypt_keeper_change_password_title"
|
||||
+ android:summary="@string/crypt_keeper_change_password_summary">
|
||||
+
|
||||
+ <intent android:action="android.intent.action.MAIN"
|
||||
+ android:targetPackage="com.android.settings"
|
||||
+ android:targetClass="com.android.settings.ChooseEncryptionPassword" />
|
||||
+ </Preference>
|
||||
+
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
diff --git a/src/com/android/settings/ChooseEncryptionPassword.java b/src/com/android/settings/ChooseEncryptionPassword.java
|
||||
new file mode 100644
|
||||
index 0000000..43e2b0e
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/ChooseEncryptionPassword.java
|
||||
@@ -0,0 +1,682 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 The Android Open Source Project
|
||||
+ *
|
||||
+ * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ * you may not use this file except in compliance with the License.
|
||||
+ * You may obtain a copy of the License at
|
||||
+ *
|
||||
+ * http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ *
|
||||
+ * Unless required by applicable law or agreed to in writing, software
|
||||
+ * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ * See the License for the specific language governing permissions and
|
||||
+ * limitations under the License.
|
||||
+ */
|
||||
+
|
||||
+package com.android.settings;
|
||||
+
|
||||
+import com.android.internal.logging.MetricsLogger;
|
||||
+import com.android.internal.widget.LockPatternUtils;
|
||||
+import com.android.internal.widget.PasswordEntryKeyboardHelper;
|
||||
+import com.android.internal.widget.PasswordEntryKeyboardView;
|
||||
+import com.android.internal.widget.TextViewInputDisabler;
|
||||
+import com.android.internal.widget.LockPatternUtils.RequestThrottledException;
|
||||
+import com.android.settings.notification.RedactionInterstitial;
|
||||
+
|
||||
+import android.app.Activity;
|
||||
+import android.app.Fragment;
|
||||
+import android.app.admin.DevicePolicyManager;
|
||||
+import android.content.Context;
|
||||
+import android.content.Intent;
|
||||
+import android.inputmethodservice.KeyboardView;
|
||||
+import android.os.Bundle;
|
||||
+import android.os.Handler;
|
||||
+import android.os.Message;
|
||||
+import android.os.UserHandle;
|
||||
+import android.text.Editable;
|
||||
+import android.text.InputType;
|
||||
+import android.text.Selection;
|
||||
+import android.text.Spannable;
|
||||
+import android.text.TextUtils;
|
||||
+import android.text.TextWatcher;
|
||||
+import android.util.Log;
|
||||
+import android.view.KeyEvent;
|
||||
+import android.view.LayoutInflater;
|
||||
+import android.view.View;
|
||||
+import android.view.ViewGroup;
|
||||
+import android.view.View.OnClickListener;
|
||||
+import android.view.inputmethod.EditorInfo;
|
||||
+import android.widget.Button;
|
||||
+import android.widget.TextView;
|
||||
+import android.widget.TextView.OnEditorActionListener;
|
||||
+
|
||||
+public class ChooseEncryptionPassword extends SettingsActivity {
|
||||
+ public static final String PASSWORD_MIN_KEY = "lockscreen.password_min";
|
||||
+ public static final String PASSWORD_MAX_KEY = "lockscreen.password_max";
|
||||
+ public static final String PASSWORD_MIN_LETTERS_KEY = "lockscreen.password_min_letters";
|
||||
+ public static final String PASSWORD_MIN_LOWERCASE_KEY = "lockscreen.password_min_lowercase";
|
||||
+ public static final String PASSWORD_MIN_UPPERCASE_KEY = "lockscreen.password_min_uppercase";
|
||||
+ public static final String PASSWORD_MIN_NUMERIC_KEY = "lockscreen.password_min_numeric";
|
||||
+ public static final String PASSWORD_MIN_SYMBOLS_KEY = "lockscreen.password_min_symbols";
|
||||
+ public static final String PASSWORD_MIN_NONLETTER_KEY = "lockscreen.password_min_nonletter";
|
||||
+
|
||||
+ private static final String TAG = "ChooseEncryptionPassword";
|
||||
+
|
||||
+ @Override
|
||||
+ public Intent getIntent() {
|
||||
+ Intent modIntent = new Intent(super.getIntent());
|
||||
+ modIntent.putExtra(EXTRA_SHOW_FRAGMENT, getFragmentClass().getName());
|
||||
+ return modIntent;
|
||||
+ }
|
||||
+
|
||||
+ public static Intent createIntent(Context context, int quality,
|
||||
+ int minLength, final int maxLength, boolean requirePasswordToDecrypt,
|
||||
+ boolean confirmCredentials) {
|
||||
+ Intent intent = new Intent().setClass(context, ChooseEncryptionPassword.class);
|
||||
+ intent.putExtra(LockPatternUtils.PASSWORD_TYPE_KEY, quality);
|
||||
+ intent.putExtra(PASSWORD_MIN_KEY, minLength);
|
||||
+ intent.putExtra(PASSWORD_MAX_KEY, maxLength);
|
||||
+ intent.putExtra(ChooseLockGeneric.CONFIRM_CREDENTIALS, confirmCredentials);
|
||||
+ intent.putExtra(EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, requirePasswordToDecrypt);
|
||||
+ return intent;
|
||||
+ }
|
||||
+
|
||||
+ public static Intent createIntent(Context context, int quality,
|
||||
+ int minLength, final int maxLength, boolean requirePasswordToDecrypt, String password) {
|
||||
+ Intent intent = createIntent(context, quality, minLength, maxLength,
|
||||
+ requirePasswordToDecrypt, false);
|
||||
+ intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, password);
|
||||
+ return intent;
|
||||
+ }
|
||||
+
|
||||
+ public static Intent createIntent(Context context, int quality,
|
||||
+ int minLength, final int maxLength, boolean requirePasswordToDecrypt, long challenge) {
|
||||
+ Intent intent = createIntent(context, quality, minLength, maxLength,
|
||||
+ requirePasswordToDecrypt, false);
|
||||
+ intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE, true);
|
||||
+ intent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE, challenge);
|
||||
+ return intent;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected boolean isValidFragment(String fragmentName) {
|
||||
+ if (ChooseEncryptionPasswordFragment.class.getName().equals(fragmentName)) return true;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* package */ Class<? extends Fragment> getFragmentClass() {
|
||||
+ return ChooseEncryptionPasswordFragment.class;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreate(Bundle savedInstanceState) {
|
||||
+ // TODO: Fix on phones
|
||||
+ // Disable IME on our window since we provide our own keyboard
|
||||
+ //getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
|
||||
+ //WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
+ super.onCreate(savedInstanceState);
|
||||
+ CharSequence msg = getText(R.string.lockpassword_choose_your_password_header);
|
||||
+ setTitle(msg);
|
||||
+ }
|
||||
+
|
||||
+ public static class ChooseEncryptionPasswordFragment extends InstrumentedFragment
|
||||
+ implements OnClickListener, OnEditorActionListener, TextWatcher,
|
||||
+ SaveAndFinishWorker.Listener {
|
||||
+ private static final String KEY_FIRST_PIN = "first_pin";
|
||||
+ private static final String KEY_UI_STAGE = "ui_stage";
|
||||
+ private static final String KEY_CURRENT_PASSWORD = "current_password";
|
||||
+ private static final String FRAGMENT_TAG_SAVE_AND_FINISH = "save_and_finish_worker";
|
||||
+
|
||||
+ private String mCurrentPassword;
|
||||
+ private String mChosenPassword;
|
||||
+ private boolean mHasChallenge;
|
||||
+ private long mChallenge;
|
||||
+ private TextView mPasswordEntry;
|
||||
+ private TextViewInputDisabler mPasswordEntryInputDisabler;
|
||||
+ private int mPasswordMinLength = LockPatternUtils.MIN_LOCK_PASSWORD_SIZE;
|
||||
+ private int mPasswordMaxLength = 16;
|
||||
+ private int mPasswordMinLetters = 0;
|
||||
+ private int mPasswordMinUpperCase = 0;
|
||||
+ private int mPasswordMinLowerCase = 0;
|
||||
+ private int mPasswordMinSymbols = 0;
|
||||
+ private int mPasswordMinNumeric = 0;
|
||||
+ private int mPasswordMinNonLetter = 0;
|
||||
+ private LockPatternUtils mLockPatternUtils;
|
||||
+ private SaveAndFinishWorker mSaveAndFinishWorker;
|
||||
+ private int mRequestedQuality = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC;
|
||||
+ private ChooseLockSettingsHelper mChooseLockSettingsHelper;
|
||||
+ private Stage mUiStage = Stage.Introduction;
|
||||
+
|
||||
+ private TextView mHeaderText;
|
||||
+ private String mFirstPin;
|
||||
+ private KeyboardView mKeyboardView;
|
||||
+ private PasswordEntryKeyboardHelper mKeyboardHelper;
|
||||
+ private boolean mIsAlphaMode;
|
||||
+ private Button mCancelButton;
|
||||
+ private Button mNextButton;
|
||||
+ private static final int CONFIRM_EXISTING_REQUEST = 58;
|
||||
+ static final int RESULT_FINISHED = RESULT_FIRST_USER;
|
||||
+ private static final long ERROR_MESSAGE_TIMEOUT = 3000;
|
||||
+ private static final int MSG_SHOW_ERROR = 1;
|
||||
+
|
||||
+ private Handler mHandler = new Handler() {
|
||||
+ @Override
|
||||
+ public void handleMessage(Message msg) {
|
||||
+ if (msg.what == MSG_SHOW_ERROR) {
|
||||
+ updateStage((Stage) msg.obj);
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ /**
|
||||
+ * Keep track internally of where the user is in choosing a pattern.
|
||||
+ */
|
||||
+ protected enum Stage {
|
||||
+
|
||||
+ Introduction(R.string.lockpassword_choose_your_password_header,
|
||||
+ R.string.lockpassword_choose_your_pin_header,
|
||||
+ R.string.lockpassword_continue_label),
|
||||
+
|
||||
+ NeedToConfirm(R.string.lockpassword_confirm_your_password_header,
|
||||
+ R.string.lockpassword_confirm_your_pin_header,
|
||||
+ R.string.lockpassword_ok_label),
|
||||
+
|
||||
+ ConfirmWrong(R.string.lockpassword_confirm_passwords_dont_match,
|
||||
+ R.string.lockpassword_confirm_pins_dont_match,
|
||||
+ R.string.lockpassword_continue_label);
|
||||
+
|
||||
+ Stage(int hintInAlpha, int hintInNumeric, int nextButtonText) {
|
||||
+ this.alphaHint = hintInAlpha;
|
||||
+ this.numericHint = hintInNumeric;
|
||||
+ this.buttonText = nextButtonText;
|
||||
+ }
|
||||
+
|
||||
+ public final int alphaHint;
|
||||
+ public final int numericHint;
|
||||
+ public final int buttonText;
|
||||
+ }
|
||||
+
|
||||
+ // required constructor for fragments
|
||||
+ public ChooseEncryptionPasswordFragment() {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreate(Bundle savedInstanceState) {
|
||||
+ super.onCreate(savedInstanceState);
|
||||
+ mLockPatternUtils = new LockPatternUtils(getActivity());
|
||||
+ Intent intent = getActivity().getIntent();
|
||||
+ if (!(getActivity() instanceof ChooseEncryptionPassword)) {
|
||||
+ throw new SecurityException("Fragment contained in wrong activity");
|
||||
+ }
|
||||
+ mRequestedQuality = Math.max(intent.getIntExtra(LockPatternUtils.PASSWORD_TYPE_KEY,
|
||||
+ mRequestedQuality), mLockPatternUtils.getRequestedPasswordQuality(
|
||||
+ UserHandle.myUserId()));
|
||||
+ mPasswordMinLength = Math.max(Math.max(
|
||||
+ LockPatternUtils.MIN_LOCK_PASSWORD_SIZE,
|
||||
+ intent.getIntExtra(PASSWORD_MIN_KEY, mPasswordMinLength)),
|
||||
+ mLockPatternUtils.getRequestedMinimumPasswordLength(UserHandle.myUserId()));
|
||||
+ mPasswordMaxLength = intent.getIntExtra(PASSWORD_MAX_KEY, mPasswordMaxLength);
|
||||
+ mPasswordMinLetters = Math.max(intent.getIntExtra(PASSWORD_MIN_LETTERS_KEY,
|
||||
+ mPasswordMinLetters), mLockPatternUtils.getRequestedPasswordMinimumLetters(
|
||||
+ UserHandle.myUserId()));
|
||||
+ mPasswordMinUpperCase = Math.max(intent.getIntExtra(PASSWORD_MIN_UPPERCASE_KEY,
|
||||
+ mPasswordMinUpperCase), mLockPatternUtils.getRequestedPasswordMinimumUpperCase(
|
||||
+ UserHandle.myUserId()));
|
||||
+ mPasswordMinLowerCase = Math.max(intent.getIntExtra(PASSWORD_MIN_LOWERCASE_KEY,
|
||||
+ mPasswordMinLowerCase), mLockPatternUtils.getRequestedPasswordMinimumLowerCase(
|
||||
+ UserHandle.myUserId()));
|
||||
+ mPasswordMinNumeric = Math.max(intent.getIntExtra(PASSWORD_MIN_NUMERIC_KEY,
|
||||
+ mPasswordMinNumeric), mLockPatternUtils.getRequestedPasswordMinimumNumeric(
|
||||
+ UserHandle.myUserId()));
|
||||
+ mPasswordMinSymbols = Math.max(intent.getIntExtra(PASSWORD_MIN_SYMBOLS_KEY,
|
||||
+ mPasswordMinSymbols), mLockPatternUtils.getRequestedPasswordMinimumSymbols(
|
||||
+ UserHandle.myUserId()));
|
||||
+ mPasswordMinNonLetter = Math.max(intent.getIntExtra(PASSWORD_MIN_NONLETTER_KEY,
|
||||
+ mPasswordMinNonLetter), mLockPatternUtils.getRequestedPasswordMinimumNonLetter(
|
||||
+ UserHandle.myUserId()));
|
||||
+
|
||||
+ mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
+ Bundle savedInstanceState) {
|
||||
+ return inflater.inflate(R.layout.choose_lock_password, container, false);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
+ super.onViewCreated(view, savedInstanceState);
|
||||
+
|
||||
+ mCancelButton = (Button) view.findViewById(R.id.cancel_button);
|
||||
+ mCancelButton.setOnClickListener(this);
|
||||
+ mNextButton = (Button) view.findViewById(R.id.next_button);
|
||||
+ mNextButton.setOnClickListener(this);
|
||||
+
|
||||
+ mIsAlphaMode = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == mRequestedQuality
|
||||
+ || DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == mRequestedQuality
|
||||
+ || DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == mRequestedQuality;
|
||||
+ mKeyboardView = (PasswordEntryKeyboardView) view.findViewById(R.id.keyboard);
|
||||
+ mPasswordEntry = (TextView) view.findViewById(R.id.password_entry);
|
||||
+ mPasswordEntry.setOnEditorActionListener(this);
|
||||
+ mPasswordEntry.addTextChangedListener(this);
|
||||
+ mPasswordEntryInputDisabler = new TextViewInputDisabler(mPasswordEntry);
|
||||
+
|
||||
+ final Activity activity = getActivity();
|
||||
+ mKeyboardHelper = new PasswordEntryKeyboardHelper(activity,
|
||||
+ mKeyboardView, mPasswordEntry);
|
||||
+ mKeyboardHelper.setKeyboardMode(mIsAlphaMode ?
|
||||
+ PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA
|
||||
+ : PasswordEntryKeyboardHelper.KEYBOARD_MODE_NUMERIC);
|
||||
+
|
||||
+ mHeaderText = (TextView) view.findViewById(R.id.headerText);
|
||||
+ mKeyboardView.requestFocus();
|
||||
+
|
||||
+ int currentType = mPasswordEntry.getInputType();
|
||||
+ mPasswordEntry.setInputType(mIsAlphaMode ? currentType
|
||||
+ : (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD));
|
||||
+
|
||||
+ Intent intent = getActivity().getIntent();
|
||||
+ final boolean confirmCredentials = intent.getBooleanExtra(
|
||||
+ ChooseLockGeneric.CONFIRM_CREDENTIALS, true);
|
||||
+ mCurrentPassword = intent.getStringExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
|
||||
+ mHasChallenge = intent.getBooleanExtra(
|
||||
+ ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE, false);
|
||||
+ mChallenge = intent.getLongExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE, 0);
|
||||
+ if (savedInstanceState == null) {
|
||||
+ updateStage(Stage.Introduction);
|
||||
+ if (confirmCredentials) {
|
||||
+ mChooseLockSettingsHelper.launchConfirmationActivity(CONFIRM_EXISTING_REQUEST,
|
||||
+ getString(R.string.unlock_set_unlock_launch_picker_title), true);
|
||||
+ }
|
||||
+ } else {
|
||||
+ // restore from previous state
|
||||
+ mFirstPin = savedInstanceState.getString(KEY_FIRST_PIN);
|
||||
+ final String state = savedInstanceState.getString(KEY_UI_STAGE);
|
||||
+ if (state != null) {
|
||||
+ mUiStage = Stage.valueOf(state);
|
||||
+ updateStage(mUiStage);
|
||||
+ }
|
||||
+
|
||||
+ if (mCurrentPassword == null) {
|
||||
+ mCurrentPassword = savedInstanceState.getString(KEY_CURRENT_PASSWORD);
|
||||
+ }
|
||||
+
|
||||
+ // Re-attach to the exiting worker if there is one.
|
||||
+ mSaveAndFinishWorker = (SaveAndFinishWorker) getFragmentManager().findFragmentByTag(
|
||||
+ FRAGMENT_TAG_SAVE_AND_FINISH);
|
||||
+ }
|
||||
+ if (activity instanceof SettingsActivity) {
|
||||
+ final SettingsActivity sa = (SettingsActivity) activity;
|
||||
+ int id = mIsAlphaMode ? R.string.lockpassword_choose_your_password_header
|
||||
+ : R.string.lockpassword_choose_your_pin_header;
|
||||
+ CharSequence title = getText(id);
|
||||
+ sa.setTitle(title);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected int getMetricsCategory() {
|
||||
+ return MetricsLogger.CHOOSE_LOCK_PASSWORD;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onResume() {
|
||||
+ super.onResume();
|
||||
+ updateStage(mUiStage);
|
||||
+ if (mSaveAndFinishWorker != null) {
|
||||
+ mSaveAndFinishWorker.setListener(this);
|
||||
+ } else {
|
||||
+ mKeyboardView.requestFocus();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onPause() {
|
||||
+ mHandler.removeMessages(MSG_SHOW_ERROR);
|
||||
+ if (mSaveAndFinishWorker != null) {
|
||||
+ mSaveAndFinishWorker.setListener(null);
|
||||
+ }
|
||||
+
|
||||
+ super.onPause();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onSaveInstanceState(Bundle outState) {
|
||||
+ super.onSaveInstanceState(outState);
|
||||
+ outState.putString(KEY_UI_STAGE, mUiStage.name());
|
||||
+ outState.putString(KEY_FIRST_PIN, mFirstPin);
|
||||
+ outState.putString(KEY_CURRENT_PASSWORD, mCurrentPassword);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onActivityResult(int requestCode, int resultCode,
|
||||
+ Intent data) {
|
||||
+ super.onActivityResult(requestCode, resultCode, data);
|
||||
+ switch (requestCode) {
|
||||
+ case CONFIRM_EXISTING_REQUEST:
|
||||
+ if (resultCode != Activity.RESULT_OK) {
|
||||
+ getActivity().setResult(RESULT_FINISHED);
|
||||
+ getActivity().finish();
|
||||
+ } else {
|
||||
+ mCurrentPassword = data.getStringExtra(
|
||||
+ ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected Intent getRedactionInterstitialIntent(Context context) {
|
||||
+ return RedactionInterstitial.createStartIntent(context);
|
||||
+ }
|
||||
+
|
||||
+ protected void updateStage(Stage stage) {
|
||||
+ final Stage previousStage = mUiStage;
|
||||
+ mUiStage = stage;
|
||||
+ updateUi();
|
||||
+
|
||||
+ // If the stage changed, announce the header for accessibility. This
|
||||
+ // is a no-op when accessibility is disabled.
|
||||
+ if (previousStage != stage) {
|
||||
+ mHeaderText.announceForAccessibility(mHeaderText.getText());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Validates PIN and returns a message to display if PIN fails test.
|
||||
+ * @param password the raw password the user typed in
|
||||
+ * @return error message to show to user or null if password is OK
|
||||
+ */
|
||||
+ private String validatePassword(String password) {
|
||||
+ if (password.length() < mPasswordMinLength) {
|
||||
+ return getString(mIsAlphaMode ?
|
||||
+ R.string.lockpassword_password_too_short
|
||||
+ : R.string.lockpassword_pin_too_short, mPasswordMinLength);
|
||||
+ }
|
||||
+ if (password.length() > mPasswordMaxLength) {
|
||||
+ return getString(mIsAlphaMode ?
|
||||
+ R.string.lockpassword_password_too_long
|
||||
+ : R.string.lockpassword_pin_too_long, mPasswordMaxLength + 1);
|
||||
+ }
|
||||
+ int letters = 0;
|
||||
+ int numbers = 0;
|
||||
+ int lowercase = 0;
|
||||
+ int symbols = 0;
|
||||
+ int uppercase = 0;
|
||||
+ int nonletter = 0;
|
||||
+ for (int i = 0; i < password.length(); i++) {
|
||||
+ char c = password.charAt(i);
|
||||
+ // allow non control Latin-1 characters only
|
||||
+ if (c < 32 || c > 127) {
|
||||
+ return getString(R.string.lockpassword_illegal_character);
|
||||
+ }
|
||||
+ if (c >= '0' && c <= '9') {
|
||||
+ numbers++;
|
||||
+ nonletter++;
|
||||
+ } else if (c >= 'A' && c <= 'Z') {
|
||||
+ letters++;
|
||||
+ uppercase++;
|
||||
+ } else if (c >= 'a' && c <= 'z') {
|
||||
+ letters++;
|
||||
+ lowercase++;
|
||||
+ } else {
|
||||
+ symbols++;
|
||||
+ nonletter++;
|
||||
+ }
|
||||
+ }
|
||||
+ if (DevicePolicyManager.PASSWORD_QUALITY_NUMERIC == mRequestedQuality
|
||||
+ || DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX == mRequestedQuality) {
|
||||
+ if (letters > 0 || symbols > 0) {
|
||||
+ // This shouldn't be possible unless user finds some way to bring up
|
||||
+ // soft keyboard
|
||||
+ return getString(R.string.lockpassword_pin_contains_non_digits);
|
||||
+ }
|
||||
+ // Check for repeated characters or sequences (e.g. '1234', '0000', '2468')
|
||||
+ final int sequence = LockPatternUtils.maxLengthSequence(password);
|
||||
+ if (DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX == mRequestedQuality
|
||||
+ && sequence > LockPatternUtils.MAX_ALLOWED_SEQUENCE) {
|
||||
+ return getString(R.string.lockpassword_pin_no_sequential_digits);
|
||||
+ }
|
||||
+ } else if (DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == mRequestedQuality) {
|
||||
+ if (letters < mPasswordMinLetters) {
|
||||
+ return String.format(getResources().getQuantityString(
|
||||
+ R.plurals.lockpassword_password_requires_letters, mPasswordMinLetters),
|
||||
+ mPasswordMinLetters);
|
||||
+ } else if (numbers < mPasswordMinNumeric) {
|
||||
+ return String.format(getResources().getQuantityString(
|
||||
+ R.plurals.lockpassword_password_requires_numeric, mPasswordMinNumeric),
|
||||
+ mPasswordMinNumeric);
|
||||
+ } else if (lowercase < mPasswordMinLowerCase) {
|
||||
+ return String.format(getResources().getQuantityString(
|
||||
+ R.plurals.lockpassword_password_requires_lowercase, mPasswordMinLowerCase),
|
||||
+ mPasswordMinLowerCase);
|
||||
+ } else if (uppercase < mPasswordMinUpperCase) {
|
||||
+ return String.format(getResources().getQuantityString(
|
||||
+ R.plurals.lockpassword_password_requires_uppercase, mPasswordMinUpperCase),
|
||||
+ mPasswordMinUpperCase);
|
||||
+ } else if (symbols < mPasswordMinSymbols) {
|
||||
+ return String.format(getResources().getQuantityString(
|
||||
+ R.plurals.lockpassword_password_requires_symbols, mPasswordMinSymbols),
|
||||
+ mPasswordMinSymbols);
|
||||
+ } else if (nonletter < mPasswordMinNonLetter) {
|
||||
+ return String.format(getResources().getQuantityString(
|
||||
+ R.plurals.lockpassword_password_requires_nonletter, mPasswordMinNonLetter),
|
||||
+ mPasswordMinNonLetter);
|
||||
+ }
|
||||
+ } else {
|
||||
+ final boolean alphabetic = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC
|
||||
+ == mRequestedQuality;
|
||||
+ final boolean alphanumeric = DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC
|
||||
+ == mRequestedQuality;
|
||||
+ if ((alphabetic || alphanumeric) && letters == 0) {
|
||||
+ return getString(R.string.lockpassword_password_requires_alpha);
|
||||
+ }
|
||||
+ if (alphanumeric && numbers == 0) {
|
||||
+ return getString(R.string.lockpassword_password_requires_digit);
|
||||
+ }
|
||||
+ }
|
||||
+ if(mLockPatternUtils.checkPasswordHistory(password, UserHandle.myUserId())) {
|
||||
+ return getString(mIsAlphaMode ? R.string.lockpassword_password_recently_used
|
||||
+ : R.string.lockpassword_pin_recently_used);
|
||||
+ }
|
||||
+
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ public void handleNext() {
|
||||
+ if (mSaveAndFinishWorker != null) return;
|
||||
+ mChosenPassword = mPasswordEntry.getText().toString();
|
||||
+ if (TextUtils.isEmpty(mChosenPassword)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ String errorMsg = null;
|
||||
+ if (mUiStage == Stage.Introduction) {
|
||||
+ errorMsg = validatePassword(mChosenPassword);
|
||||
+ if (errorMsg == null) {
|
||||
+ mFirstPin = mChosenPassword;
|
||||
+ mPasswordEntry.setText("");
|
||||
+ updateStage(Stage.NeedToConfirm);
|
||||
+ }
|
||||
+ } else if (mUiStage == Stage.NeedToConfirm) {
|
||||
+ if (mFirstPin.equals(mChosenPassword)) {
|
||||
+ startSaveAndFinish();
|
||||
+ } else {
|
||||
+ CharSequence tmp = mPasswordEntry.getText();
|
||||
+ if (tmp != null) {
|
||||
+ Selection.setSelection((Spannable) tmp, 0, tmp.length());
|
||||
+ }
|
||||
+ updateStage(Stage.ConfirmWrong);
|
||||
+ }
|
||||
+ }
|
||||
+ if (errorMsg != null) {
|
||||
+ showError(errorMsg, mUiStage);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void setNextEnabled(boolean enabled) {
|
||||
+ mNextButton.setEnabled(enabled);
|
||||
+ }
|
||||
+
|
||||
+ protected void setNextText(int text) {
|
||||
+ mNextButton.setText(text);
|
||||
+ }
|
||||
+
|
||||
+ public void onClick(View v) {
|
||||
+ switch (v.getId()) {
|
||||
+ case R.id.next_button:
|
||||
+ handleNext();
|
||||
+ break;
|
||||
+
|
||||
+ case R.id.cancel_button:
|
||||
+ getActivity().finish();
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void showError(String msg, final Stage next) {
|
||||
+ mHeaderText.setText(msg);
|
||||
+ mHeaderText.announceForAccessibility(mHeaderText.getText());
|
||||
+ Message mesg = mHandler.obtainMessage(MSG_SHOW_ERROR, next);
|
||||
+ mHandler.removeMessages(MSG_SHOW_ERROR);
|
||||
+ mHandler.sendMessageDelayed(mesg, ERROR_MESSAGE_TIMEOUT);
|
||||
+ }
|
||||
+
|
||||
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
+ // Check if this was the result of hitting the enter or "done" key
|
||||
+ if (actionId == EditorInfo.IME_NULL
|
||||
+ || actionId == EditorInfo.IME_ACTION_DONE
|
||||
+ || actionId == EditorInfo.IME_ACTION_NEXT) {
|
||||
+ handleNext();
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Update the hint based on current Stage and length of password entry
|
||||
+ */
|
||||
+ private void updateUi() {
|
||||
+ final boolean canInput = mSaveAndFinishWorker == null;
|
||||
+ String password = mPasswordEntry.getText().toString();
|
||||
+ final int length = password.length();
|
||||
+ if (mUiStage == Stage.Introduction) {
|
||||
+ if (length < mPasswordMinLength) {
|
||||
+ String msg = getString(mIsAlphaMode ? R.string.lockpassword_password_too_short
|
||||
+ : R.string.lockpassword_pin_too_short, mPasswordMinLength);
|
||||
+ mHeaderText.setText(msg);
|
||||
+ setNextEnabled(false);
|
||||
+ } else {
|
||||
+ String error = validatePassword(password);
|
||||
+ if (error != null) {
|
||||
+ mHeaderText.setText(error);
|
||||
+ setNextEnabled(false);
|
||||
+ } else {
|
||||
+ mHeaderText.setText(R.string.lockpassword_press_continue);
|
||||
+ setNextEnabled(true);
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ mHeaderText.setText(mIsAlphaMode ? mUiStage.alphaHint : mUiStage.numericHint);
|
||||
+ setNextEnabled(canInput && length > 0);
|
||||
+ }
|
||||
+ setNextText(mUiStage.buttonText);
|
||||
+ mPasswordEntryInputDisabler.setInputEnabled(canInput);
|
||||
+ }
|
||||
+
|
||||
+ public void afterTextChanged(Editable s) {
|
||||
+ // Changing the text while error displayed resets to NeedToConfirm state
|
||||
+ if (mUiStage == Stage.ConfirmWrong) {
|
||||
+ mUiStage = Stage.NeedToConfirm;
|
||||
+ }
|
||||
+ updateUi();
|
||||
+ }
|
||||
+
|
||||
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ private void startSaveAndFinish() {
|
||||
+ if (mSaveAndFinishWorker != null) {
|
||||
+ Log.w(TAG, "startSaveAndFinish with an existing SaveAndFinishWorker.");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mPasswordEntryInputDisabler.setInputEnabled(false);
|
||||
+ setNextEnabled(false);
|
||||
+
|
||||
+ mSaveAndFinishWorker = new SaveAndFinishWorker();
|
||||
+ getFragmentManager().beginTransaction().add(mSaveAndFinishWorker,
|
||||
+ FRAGMENT_TAG_SAVE_AND_FINISH).commit();
|
||||
+ mSaveAndFinishWorker.setListener(this);
|
||||
+
|
||||
+ final boolean required = getActivity().getIntent().getBooleanExtra(
|
||||
+ EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true);
|
||||
+ mSaveAndFinishWorker.start(mLockPatternUtils, required, mHasChallenge, mChallenge,
|
||||
+ mChosenPassword, mCurrentPassword, mRequestedQuality);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onChosenLockSaveFinished(boolean wasSecureBefore, Intent resultData) {
|
||||
+ getActivity().setResult(RESULT_FINISHED, resultData);
|
||||
+ getActivity().finish();
|
||||
+
|
||||
+ if (!wasSecureBefore) {
|
||||
+ Intent intent = getRedactionInterstitialIntent(getActivity());
|
||||
+ if (intent != null) {
|
||||
+ startActivity(intent);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private static class SaveAndFinishWorker extends SaveChosenLockWorkerBase {
|
||||
+
|
||||
+ private String mChosenPassword;
|
||||
+ private String mCurrentPassword;
|
||||
+ private int mRequestedQuality;
|
||||
+
|
||||
+ public void start(LockPatternUtils utils, boolean required,
|
||||
+ boolean hasChallenge, long challenge,
|
||||
+ String chosenPassword, String currentPassword, int requestedQuality) {
|
||||
+ prepare(utils, required, hasChallenge, challenge);
|
||||
+
|
||||
+ mChosenPassword = chosenPassword;
|
||||
+ mCurrentPassword = currentPassword;
|
||||
+ mRequestedQuality = requestedQuality;
|
||||
+
|
||||
+ start();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected Intent saveAndVerifyInBackground() {
|
||||
+ Intent result = null;
|
||||
+ final int userId = UserHandle.myUserId();
|
||||
+ mUtils.setCredentialRequiredToDecrypt(true);
|
||||
+ mUtils.setSeparateEncryptionPassword(mChosenPassword);
|
||||
+
|
||||
+ if (mHasChallenge) {
|
||||
+ byte[] token;
|
||||
+ try {
|
||||
+ token = mUtils.verifyPassword(mChosenPassword, mChallenge, userId);
|
||||
+ } catch (RequestThrottledException e) {
|
||||
+ token = null;
|
||||
+ }
|
||||
+
|
||||
+ if (token == null) {
|
||||
+ Log.e(TAG, "critical: no token returned for known good password.");
|
||||
+ }
|
||||
+
|
||||
+ result = new Intent();
|
||||
+ result.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN, token);
|
||||
+ }
|
||||
+
|
||||
+ return result;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
@ -1,198 +0,0 @@
|
||||
From 0985c9dc829bd54d29335231704bff3bda2750b3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sat, 27 Jun 2015 12:39:17 -0400
|
||||
Subject: [PATCH] support replacing a separate encryption password
|
||||
|
||||
---
|
||||
AndroidManifest.xml | 2 +
|
||||
res/values/strings.xml | 6 ++
|
||||
res/xml/security_settings_encrypted.xml | 10 +++
|
||||
.../settings/ReplaceEncryptionPassword.java | 99 ++++++++++++++++++++++
|
||||
src/com/android/settings/SecuritySettings.java | 10 +++
|
||||
5 files changed, 127 insertions(+)
|
||||
create mode 100644 src/com/android/settings/ReplaceEncryptionPassword.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index a561d7e..c54e4fa 100755
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -1527,6 +1527,8 @@
|
||||
<activity android:name="ChooseEncryptionPassword" android:exported="false"
|
||||
android:windowSoftInputMode="stateVisible|adjustResize"/>
|
||||
|
||||
+ <activity android:name="ReplaceEncryptionPassword" android:exported="false"/>
|
||||
+
|
||||
<activity android:name=".SetupEncryptionInterstitial"
|
||||
android:taskAffinity="com.android.wizard"
|
||||
android:theme="@style/SetupWizardDisableAppStartingTheme"/>
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index d5324f1..224c91e 100755
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -946,6 +946,12 @@
|
||||
<!-- Header on first screen of choose encryption password [CHAR LIMIT=30] -->
|
||||
<string name="crypt_keeper_choose_your_password_header">Set encryption password</string>
|
||||
|
||||
+ <!-- Title for PreferenceScreen to replace encryption password [CHAR LIMIT=22] -->
|
||||
+ <string name="crypt_keeper_replace_password_title">Replace encryption password</string>
|
||||
+
|
||||
+ <!-- Summary for PreferenceScreen to replace encryption password [CHAR LIMIT=45] -->
|
||||
+ <string name="crypt_keeper_replace_password_summary">Remove the separate encryption password</string>
|
||||
+
|
||||
<!-- Unlock Picker Settings --><skip />
|
||||
|
||||
<!-- Security Picker --><skip />
|
||||
diff --git a/res/xml/security_settings_encrypted.xml b/res/xml/security_settings_encrypted.xml
|
||||
index f05bad5..e068541 100644
|
||||
--- a/res/xml/security_settings_encrypted.xml
|
||||
+++ b/res/xml/security_settings_encrypted.xml
|
||||
@@ -37,6 +37,16 @@
|
||||
android:targetClass="com.android.settings.ChooseEncryptionPassword" />
|
||||
</Preference>
|
||||
|
||||
+ <Preference
|
||||
+ android:key="crypt_keeper_replace_password"
|
||||
+ android:title="@string/crypt_keeper_replace_password_title"
|
||||
+ android:summary="@string/crypt_keeper_replace_password_summary">
|
||||
+
|
||||
+ <intent android:action="android.intent.action.MAIN"
|
||||
+ android:targetPackage="com.android.settings"
|
||||
+ android:targetClass="com.android.settings.ReplaceEncryptionPassword" />
|
||||
+ </Preference>
|
||||
+
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
diff --git a/src/com/android/settings/ReplaceEncryptionPassword.java b/src/com/android/settings/ReplaceEncryptionPassword.java
|
||||
new file mode 100644
|
||||
index 0000000..84dcc48
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/ReplaceEncryptionPassword.java
|
||||
@@ -0,0 +1,99 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2015 The Android Open Source Project
|
||||
+ *
|
||||
+ * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ * you may not use this file except in compliance with the License.
|
||||
+ * You may obtain a copy of the License at
|
||||
+ *
|
||||
+ * http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ *
|
||||
+ * Unless required by applicable law or agreed to in writing, software
|
||||
+ * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ * See the License for the specific language governing permissions and
|
||||
+ * limitations under the License.
|
||||
+ */
|
||||
+
|
||||
+package com.android.settings;
|
||||
+
|
||||
+import com.android.internal.widget.LockPatternUtils;
|
||||
+import com.android.internal.widget.LockPatternUtils.RequestThrottledException;
|
||||
+
|
||||
+import android.app.Activity;
|
||||
+import android.app.Fragment;
|
||||
+import android.content.Intent;
|
||||
+import android.content.res.Resources;
|
||||
+import android.os.Bundle;
|
||||
+import android.os.storage.StorageManager;
|
||||
+import android.os.UserHandle;
|
||||
+import android.view.LayoutInflater;
|
||||
+import android.view.View;
|
||||
+import android.view.ViewGroup;
|
||||
+
|
||||
+public class ReplaceEncryptionPassword extends SettingsActivity {
|
||||
+ @Override
|
||||
+ public Intent getIntent() {
|
||||
+ Intent modIntent = new Intent(super.getIntent());
|
||||
+ modIntent.putExtra(EXTRA_SHOW_FRAGMENT, getFragmentClass().getName());
|
||||
+ return modIntent;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected boolean isValidFragment(String fragmentName) {
|
||||
+ if (ReplaceEncryptionPasswordFragment.class.getName().equals(fragmentName)) return true;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* package */ Class<? extends Fragment> getFragmentClass() {
|
||||
+ return ReplaceEncryptionPasswordFragment.class;
|
||||
+ }
|
||||
+
|
||||
+ public static class ReplaceEncryptionPasswordFragment extends Fragment {
|
||||
+ private static final int KEYGUARD_REQUEST = 55;
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreate(Bundle savedInstanceState) {
|
||||
+ super.onCreate(savedInstanceState);
|
||||
+ if (!(getActivity() instanceof ReplaceEncryptionPassword)) {
|
||||
+ throw new SecurityException("Fragment contained in wrong activity");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
|
||||
+ Resources res = getActivity().getResources();
|
||||
+ ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(getActivity(), this);
|
||||
+
|
||||
+ helper.launchConfirmationActivity(KEYGUARD_REQUEST,
|
||||
+ res.getText(R.string.unlock_set_unlock_password_title),
|
||||
+ true);
|
||||
+
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
+ super.onActivityResult(requestCode, resultCode, data);
|
||||
+
|
||||
+ if (requestCode != KEYGUARD_REQUEST) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // If the user entered a valid keyguard trace, present the final
|
||||
+ // confirmation prompt; otherwise, go back to the initial state.
|
||||
+ if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
+ LockPatternUtils utils = new LockPatternUtils(getActivity());
|
||||
+ int type = data.getIntExtra(ChooseLockSettingsHelper.EXTRA_KEY_TYPE, -1);
|
||||
+ String password = data.getStringExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
|
||||
+ if (type == StorageManager.CRYPT_TYPE_PATTERN) {
|
||||
+ utils.replaceSeparateEncryptionPasswordWithPattern(
|
||||
+ utils.stringToPattern(password, utils.getLockPatternSize()));
|
||||
+ } else {
|
||||
+ utils.replaceSeparateEncryptionPassword(password);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
|
||||
index 4d76f08..7cab5ca 100644
|
||||
--- a/src/com/android/settings/SecuritySettings.java
|
||||
+++ b/src/com/android/settings/SecuritySettings.java
|
||||
@@ -110,6 +110,7 @@
|
||||
private static final String PACKAGE_MIME_TYPE = "application/vnd.android.package-archive";
|
||||
private static final String KEY_TRUST_AGENT = "trust_agent";
|
||||
private static final String KEY_SCREEN_PINNING = "screen_pinning_settings";
|
||||
+ private static final String KEY_REPLACE_ENCRYPTION_PASSWORD = "crypt_keeper_replace_password";
|
||||
private static final String KEY_SMS_SECURITY_CHECK_PREF = "sms_security_check_limit";
|
||||
|
||||
// malloc configuration
|
||||
@@ -270,6 +271,15 @@ public boolean onPreferenceClick(Preference preference) {
|
||||
if (LockPatternUtils.isDeviceEncryptionEnabled()) {
|
||||
// The device is currently encrypted.
|
||||
addPreferencesFromResource(R.xml.security_settings_encrypted);
|
||||
+ if (!mLockPatternUtils.isSeparateEncryptionPasswordEnabled()) {
|
||||
+ PreferenceGroup securityCategory =
|
||||
+ (PreferenceGroup)root.findPreference(KEY_SECURITY_CATEGORY);
|
||||
+ if (securityCategory != null) {
|
||||
+ Preference replaceEncryptionPassword =
|
||||
+ root.findPreference(KEY_REPLACE_ENCRYPTION_PASSWORD);
|
||||
+ securityCategory.removePreference(replaceEncryptionPassword);
|
||||
+ }
|
||||
+ }
|
||||
} else {
|
||||
// This device supports encryption but isn't encrypted.
|
||||
addPreferencesFromResource(R.xml.security_settings_unencrypted);
|
@ -1,73 +0,0 @@
|
||||
From a29c050a986312d6863d2a7ed6cceb1f1b0b9fac Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Sun, 28 Jun 2015 13:31:54 -0400
|
||||
Subject: [PATCH] fix usage of ChooseLockSettingsHelper
|
||||
|
||||
The fragment was not being passed, so the ChooseLock* fragments are not
|
||||
informed if authentication fails (i.e. the cancel button is pushed) and
|
||||
continue on as if it was successful. This wasn't noticed because this
|
||||
code isn't used in the normal path where authentication happens before
|
||||
entering the preferences menu to choose the authentication method.
|
||||
|
||||
The authentication support built-in to these fragments may even be dead
|
||||
code, but it should work correctly if it's there because it may be the
|
||||
basis of new code.
|
||||
---
|
||||
src/com/android/settings/ChooseEncryptionPassword.java | 2 +-
|
||||
src/com/android/settings/ChooseLockGeneric.java | 2 +-
|
||||
src/com/android/settings/ChooseLockPassword.java | 2 +-
|
||||
src/com/android/settings/ChooseLockPattern.java | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/com/android/settings/ChooseEncryptionPassword.java b/src/com/android/settings/ChooseEncryptionPassword.java
|
||||
index 43e2b0e..761603a 100644
|
||||
--- a/src/com/android/settings/ChooseEncryptionPassword.java
|
||||
+++ b/src/com/android/settings/ChooseEncryptionPassword.java
|
||||
@@ -237,7 +237,7 @@ public void onCreate(Bundle savedInstanceState) {
|
||||
mPasswordMinNonLetter), mLockPatternUtils.getRequestedPasswordMinimumNonLetter(
|
||||
UserHandle.myUserId()));
|
||||
|
||||
- mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity());
|
||||
+ mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity(), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java
|
||||
index 7f5960f..b177d11 100644
|
||||
--- a/src/com/android/settings/ChooseLockGeneric.java
|
||||
+++ b/src/com/android/settings/ChooseLockGeneric.java
|
||||
@@ -137,7 +137,7 @@ public void onCreate(Bundle savedInstanceState) {
|
||||
(FingerprintManager) getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
|
||||
mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
mKeyStore = KeyStore.getInstance();
|
||||
- mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this.getActivity());
|
||||
+ mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this.getActivity(), this);
|
||||
mLockPatternUtils = new LockPatternUtils(getActivity());
|
||||
mLockPatternUtils.sanitizePassword();
|
||||
|
||||
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java
|
||||
index 54c3620..59d1153 100644
|
||||
--- a/src/com/android/settings/ChooseLockPassword.java
|
||||
+++ b/src/com/android/settings/ChooseLockPassword.java
|
||||
@@ -237,7 +237,7 @@ public void onCreate(Bundle savedInstanceState) {
|
||||
mPasswordMinNonLetter), mLockPatternUtils.getRequestedPasswordMinimumNonLetter(
|
||||
UserHandle.myUserId()));
|
||||
|
||||
- mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity());
|
||||
+ mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity(), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/com/android/settings/ChooseLockPattern.java b/src/com/android/settings/ChooseLockPattern.java
|
||||
index c85e604..f6f0b7e 100644
|
||||
--- a/src/com/android/settings/ChooseLockPattern.java
|
||||
+++ b/src/com/android/settings/ChooseLockPattern.java
|
||||
@@ -366,7 +366,7 @@ public void run() {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
- mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity());
|
||||
+ mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity(), this);
|
||||
if (!(getActivity() instanceof ChooseLockPattern)) {
|
||||
throw new SecurityException("Fragment contained in wrong activity");
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,24 +0,0 @@
|
||||
From fe1708406e0b31214fcb9a9abf2a4b7c944fab6d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 27 Mar 2015 02:55:14 -0400
|
||||
Subject: [PATCH] add back dmesg_restrict
|
||||
|
||||
The debugging use case with the shell user is not very compelling. This
|
||||
is supposed to enforced elsewhere via SELinux now but there's no harm in
|
||||
redundancy.
|
||||
---
|
||||
rootdir/init.rc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index 5c6b606..b98443a 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -105,6 +105,7 @@ on init
|
||||
write /proc/sys/kernel/sched_child_runs_first 0
|
||||
|
||||
write /proc/sys/kernel/randomize_va_space 2
|
||||
+ write /proc/sys/kernel/dmesg_restrict 1
|
||||
write /proc/sys/kernel/kptr_restrict 2
|
||||
write /proc/sys/vm/mmap_min_addr 32768
|
||||
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
|
@ -1,26 +0,0 @@
|
||||
From 5eb07e6823e9e68e30f25e4d85466d9b1fccf48d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 6 Feb 2015 11:46:34 -0500
|
||||
Subject: [PATCH] tighten up mount permissions
|
||||
|
||||
---
|
||||
init/init.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/init/init.cpp b/init/init.cpp
|
||||
index 542c35e..c7275b1 100644
|
||||
--- a/init/init.cpp
|
||||
+++ b/init/init.cpp
|
||||
@@ -1039,9 +1039,9 @@ int main(int argc, char** argv) {
|
||||
mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755");
|
||||
mkdir("/dev/pts", 0755);
|
||||
mkdir("/dev/socket", 0755);
|
||||
- mount("devpts", "/dev/pts", "devpts", 0, NULL);
|
||||
- mount("proc", "/proc", "proc", 0, NULL);
|
||||
- mount("sysfs", "/sys", "sysfs", 0, NULL);
|
||||
+ mount("devpts", "/dev/pts", "devpts", MS_NOSUID|MS_NOEXEC, NULL);
|
||||
+ mount("proc", "/proc", "proc", MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL);
|
||||
+ mount("sysfs", "/sys", "sysfs", MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL);
|
||||
}
|
||||
|
||||
// We must have some place other than / to create the device nodes for
|
@ -1,35 +0,0 @@
|
||||
From eee064eb93d1ee3f1db56a9634015ba23e3b0e92 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 5 Feb 2015 20:33:17 -0500
|
||||
Subject: [PATCH] tighten up kernel tcp/ip settings
|
||||
|
||||
---
|
||||
rootdir/init.rc | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index b98443a..f30baf4 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -124,6 +124,21 @@ on init
|
||||
write /proc/sys/net/ipv4/conf/all/accept_redirects 0
|
||||
write /proc/sys/net/ipv6/conf/all/accept_redirects 0
|
||||
|
||||
+ # IPv4 hardening
|
||||
+ #
|
||||
+ # reverse path filtering is done with netfilter for consistency with IPv6
|
||||
+ write /proc/sys/net/ipv4/tcp_rfc1337 1
|
||||
+ write /proc/sys/net/ipv4/conf/all/accept_source_route 0
|
||||
+ write /proc/sys/net/ipv4/conf/default/accept_source_route 0
|
||||
+ write /proc/sys/net/ipv4/conf/default/accept_redirects 0
|
||||
+ write /proc/sys/net/ipv4/conf/all/send_redirects 0
|
||||
+ write /proc/sys/net/ipv4/conf/default/send_redirects 0
|
||||
+
|
||||
+ # IPv6 hardening
|
||||
+ write /proc/sys/net/ipv6/conf/default/accept_redirects 0
|
||||
+ write /proc/sys/net/ipv6/conf/all/use_tempaddr 2
|
||||
+ write /proc/sys/net/ipv6/conf/default/use_tempaddr 2
|
||||
+
|
||||
# Create cgroup mount points for process groups
|
||||
mkdir /dev/cpuctl
|
||||
mount cgroup none /dev/cpuctl cpu
|
@ -1,22 +0,0 @@
|
||||
From f7704509fc9ae1abed312e5e4276ce51f1c541ad Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 14 Aug 2015 15:07:33 -0400
|
||||
Subject: [PATCH] slow down the service respawning rate
|
||||
|
||||
---
|
||||
init/init.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/init/init.cpp b/init/init.cpp
|
||||
index 78859a5..11ed674 100644
|
||||
--- a/init/init.cpp
|
||||
+++ b/init/init.cpp
|
||||
@@ -465,7 +465,7 @@ void property_changed(const char *name, const char *value)
|
||||
|
||||
static void restart_service_if_needed(struct service *svc)
|
||||
{
|
||||
- time_t next_start_time = svc->time_started + 5;
|
||||
+ time_t next_start_time = svc->time_started + 10;
|
||||
|
||||
if (next_start_time <= gettime()) {
|
||||
svc->flags &= (~SVC_RESTARTING);
|
@ -1,23 +0,0 @@
|
||||
From 868adf173741eb6a3f0693d6b14fb92148a48db1 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 20 Nov 2015 00:13:54 -0500
|
||||
Subject: [PATCH] remove analytics support
|
||||
|
||||
---
|
||||
.../vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml b/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
index eec242d..27ec5fe 100644
|
||||
--- a/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
+++ b/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
@@ -22,9 +22,4 @@
|
||||
1. Right
|
||||
2. Left -->
|
||||
<integer name="def_qs_quick_pulldown">1</integer>
|
||||
-
|
||||
- <!-- Defaults for Secure -->
|
||||
-
|
||||
- <!-- Default for CMSettings.Secure.STATS_COLLECTION -->
|
||||
- <bool name="def_stats_collection">true</bool>
|
||||
</resources>
|
@ -1,107 +0,0 @@
|
||||
From 882d5f332dfa9e0904c1e931440712fddbccf034 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Dec 2015 20:27:11 -0500
|
||||
Subject: [PATCH] remove analytics support
|
||||
|
||||
Change-Id: Ie3e0541398747d43ab24bad9b9b93c81df4877b9
|
||||
---
|
||||
host/migration/src/CMSettings.java | 7 -------
|
||||
packages/CMSettingsProvider/res/values/defaults.xml | 5 +----
|
||||
.../src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java | 3 ---
|
||||
src/java/cyanogenmod/providers/CMSettings.java | 13 -------------
|
||||
4 files changed, 1 insertion(+), 27 deletions(-)
|
||||
|
||||
diff --git a/host/migration/src/CMSettings.java b/host/migration/src/CMSettings.java
|
||||
index 0d57b0d..b4f5be9 100644
|
||||
--- a/host/migration/src/CMSettings.java
|
||||
+++ b/host/migration/src/CMSettings.java
|
||||
@@ -833,12 +833,6 @@ public final class CMSettings {
|
||||
public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
|
||||
|
||||
/**
|
||||
- * Global stats collection
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION = "stats_collection";
|
||||
-
|
||||
- /**
|
||||
* Boolean value whether to link ringtone and notification volume
|
||||
*
|
||||
* @hide
|
||||
@@ -1021,7 +1015,6 @@ public final class CMSettings {
|
||||
CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
|
||||
CMSettings.Secure.KEYBOARD_BRIGHTNESS,
|
||||
CMSettings.Secure.POWER_MENU_ACTIONS,
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
|
||||
CMSettings.Secure.QS_TILES,
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
index 3a514f8..96af970 100644
|
||||
--- a/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
+++ b/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
@@ -41,9 +41,6 @@
|
||||
Comma-delimited, quick settings tiles. See QSConstants.java for a list of all available tiles -->
|
||||
<string name="def_qs_tiles">wifi,bt,cell,airplane,rotation,flashlight,location,cast,visualizer,hotspot,live_display</string>
|
||||
|
||||
- <!-- Default for CMSettings.Secure.STATS_COLLECTION -->
|
||||
- <bool name="def_stats_collection">false</bool>
|
||||
-
|
||||
<!-- Default for CMSettings.Secure.QS_USE_MAIN_TILES -->
|
||||
<bool name="def_sysui_qs_main_tiles">true</bool>
|
||||
|
||||
@@ -76,4 +73,4 @@
|
||||
<!-- Default value for whether or not to use multiple notification LEDs
|
||||
on devices equiped with more than one LED -->
|
||||
<bool name="def_notification_multiple_leds">false</bool>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
index 5d40866..de0fe19 100644
|
||||
--- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
+++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
@@ -234,9 +234,6 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
|
||||
loadBooleanSetting(db, CMTableNames.TABLE_SECURE, CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
R.bool.def_sysui_qs_main_tiles);
|
||||
|
||||
- loadBooleanSetting(db, CMTableNames.TABLE_SECURE, CMSettings.Secure.STATS_COLLECTION,
|
||||
- R.bool.def_stats_collection);
|
||||
-
|
||||
loadBooleanSetting(db, CMTableNames.TABLE_SECURE,
|
||||
CMSettings.Secure.LOCKSCREEN_VISUALIZER_ENABLED, R.bool.def_lockscreen_visualizer);
|
||||
}
|
||||
diff --git a/src/java/cyanogenmod/providers/CMSettings.java b/src/java/cyanogenmod/providers/CMSettings.java
|
||||
index 9da713b..9d63a9b 100644
|
||||
--- a/src/java/cyanogenmod/providers/CMSettings.java
|
||||
+++ b/src/java/cyanogenmod/providers/CMSettings.java
|
||||
@@ -2464,18 +2464,6 @@ public final class CMSettings {
|
||||
public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
|
||||
|
||||
/**
|
||||
- * Global stats collection
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION = "stats_collection";
|
||||
-
|
||||
- /**
|
||||
- * Whether the global stats collection setting has been successfully reported to server
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION_REPORTED = "stats_collection_reported";
|
||||
-
|
||||
- /**
|
||||
* Whether newly installed apps should run with privacy guard by default
|
||||
* @hide
|
||||
*/
|
||||
@@ -2631,7 +2619,6 @@ public final class CMSettings {
|
||||
CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
|
||||
CMSettings.Secure.KEYBOARD_BRIGHTNESS,
|
||||
CMSettings.Secure.POWER_MENU_ACTIONS,
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
|
||||
CMSettings.Secure.QS_TILES,
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
--
|
||||
2.6.4
|
||||
|
@ -1,103 +0,0 @@
|
||||
From fdea0fad552207679fc0981a937079b262bfc810 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Fri, 20 Nov 2015 00:13:11 -0500
|
||||
Subject: [PATCH] remove analytics support
|
||||
|
||||
---
|
||||
host/migration/src/CMSettings.java | 7 -------
|
||||
packages/CMSettingsProvider/res/values/defaults.xml | 5 +----
|
||||
.../src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java | 3 ---
|
||||
src/java/cyanogenmod/providers/CMSettings.java | 13 -------------
|
||||
4 files changed, 1 insertion(+), 27 deletions(-)
|
||||
|
||||
diff --git a/host/migration/src/CMSettings.java b/host/migration/src/CMSettings.java
|
||||
index 0d57b0d..b4f5be9 100644
|
||||
--- a/host/migration/src/CMSettings.java
|
||||
+++ b/host/migration/src/CMSettings.java
|
||||
@@ -833,12 +833,6 @@ public static boolean isLegacySetting(String key) {
|
||||
public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
|
||||
|
||||
/**
|
||||
- * Global stats collection
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION = "stats_collection";
|
||||
-
|
||||
- /**
|
||||
* Boolean value whether to link ringtone and notification volume
|
||||
*
|
||||
* @hide
|
||||
@@ -1021,7 +1015,6 @@ public static boolean isLegacySetting(String key) {
|
||||
CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
|
||||
CMSettings.Secure.KEYBOARD_BRIGHTNESS,
|
||||
CMSettings.Secure.POWER_MENU_ACTIONS,
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
|
||||
CMSettings.Secure.QS_TILES,
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
index ffc9c88..762abc1 100644
|
||||
--- a/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
+++ b/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
@@ -41,9 +41,6 @@
|
||||
Comma-delimited, quick settings tiles. See QSConstants.java for a list of all available tiles -->
|
||||
<string name="def_qs_tiles">wifi,bt,cell,airplane,rotation,flashlight,location,cast,visualizer,hotspot,live_display</string>
|
||||
|
||||
- <!-- Default for CMSettings.Secure.STATS_COLLECTION -->
|
||||
- <bool name="def_stats_collection">false</bool>
|
||||
-
|
||||
<!-- Default for CMSettings.Secure.QS_USE_MAIN_TILES -->
|
||||
<bool name="def_sysui_qs_main_tiles">true</bool>
|
||||
|
||||
@@ -73,4 +70,4 @@
|
||||
<!-- Default value for whether or not to use multiple notification LEDs
|
||||
on devices equiped with more than one LED -->
|
||||
<bool name="def_notification_multiple_leds">false</bool>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
index 4257c42..baee50a 100644
|
||||
--- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
+++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
@@ -233,9 +233,6 @@ private void loadSecureSettings(SQLiteDatabase db) {
|
||||
|
||||
loadBooleanSetting(db, CMTableNames.TABLE_SECURE, CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
R.bool.def_sysui_qs_main_tiles);
|
||||
-
|
||||
- loadBooleanSetting(db, CMTableNames.TABLE_SECURE, CMSettings.Secure.STATS_COLLECTION,
|
||||
- R.bool.def_stats_collection);
|
||||
}
|
||||
|
||||
private void loadSystemSettings(SQLiteDatabase db) {
|
||||
diff --git a/src/java/cyanogenmod/providers/CMSettings.java b/src/java/cyanogenmod/providers/CMSettings.java
|
||||
index 4b2fb7c..468b226 100644
|
||||
--- a/src/java/cyanogenmod/providers/CMSettings.java
|
||||
+++ b/src/java/cyanogenmod/providers/CMSettings.java
|
||||
@@ -2464,18 +2464,6 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val
|
||||
public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
|
||||
|
||||
/**
|
||||
- * Global stats collection
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION = "stats_collection";
|
||||
-
|
||||
- /**
|
||||
- * Whether the global stats collection setting has been successfully reported to server
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION_REPORTED = "stats_collection_reported";
|
||||
-
|
||||
- /**
|
||||
* Boolean value whether to link ringtone and notification volume
|
||||
*
|
||||
* @hide
|
||||
@@ -2619,7 +2607,6 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val
|
||||
CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
|
||||
CMSettings.Secure.KEYBOARD_BRIGHTNESS,
|
||||
CMSettings.Secure.POWER_MENU_ACTIONS,
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
|
||||
CMSettings.Secure.QS_TILES,
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
@ -1,28 +0,0 @@
|
||||
From cadb44f5ff20d3e32c5eece6b6185a507f4e8bbf Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Tue, 5 Jan 2016 20:06:35 -0500
|
||||
Subject: [PATCH] Change toolchain
|
||||
|
||||
Change-Id: Ib6df0dc6af32c755f828f4cfe9204a87b01c4551
|
||||
---
|
||||
core/combo/TARGET_linux-arm.mk | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
|
||||
index 5020865..dcc2e9a 100644
|
||||
--- a/core/combo/TARGET_linux-arm.mk
|
||||
+++ b/core/combo/TARGET_linux-arm.mk
|
||||
@@ -38,8 +38,8 @@ endif
|
||||
$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.9
|
||||
|
||||
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
|
||||
-$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.9
|
||||
-$(combo_2nd_arch_prefix)TARGET_LEGACY_GCC_VERSION := 4.8
|
||||
+$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.9-cortex-a15
|
||||
+$(combo_2nd_arch_prefix)TARGET_LEGACY_GCC_VERSION := 4.8-cortex-a15
|
||||
else
|
||||
$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
|
||||
endif
|
||||
--
|
||||
2.6.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From d90bf77e8215c26ae50c221ae346894bc8b37568 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 25 Feb 2016 05:59:06 -0500
|
||||
Subject: [PATCH] Disable 5.3 opt
|
||||
|
||||
Change-Id: I166e24efeeeec3555efbadf590363bc40fb5468c
|
||||
---
|
||||
core/archidroid.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/archidroid.mk b/core/archidroid.mk
|
||||
index 9ab4918..29bd257 100644
|
||||
--- a/core/archidroid.mk
|
||||
+++ b/core/archidroid.mk
|
||||
@@ -45,7 +45,7 @@ ARCHIDROID_GCC_LDFLAGS := -Wl,-O3 -Wl,--as-needed -Wl,--gc-sections -Wl,--relax
|
||||
# Flags below are applied to specific targets only, use them if your flag is not compatible for both compilers
|
||||
|
||||
# We use GCC 5.3 for arm-linux-androideabi, make sure to remove flags below if you decided to stick with 4.9
|
||||
-ARCHIDROID_GCC_CFLAGS_32 := -Wno-error=bool-compare -Wno-error=logical-not-parentheses -Wno-error=sizeof-array-argument
|
||||
+#ARCHIDROID_GCC_CFLAGS_32 := -Wno-error=bool-compare -Wno-error=logical-not-parentheses -Wno-error=sizeof-array-argument
|
||||
|
||||
# We use GCC 4.9 for aarch64-linux-android, so we don't have any extra flags for it
|
||||
ARCHIDROID_GCC_CFLAGS_64 :=
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 8076f19e43061cbc363c7a01f4485c65a266ab57 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 25 Feb 2016 19:40:24 -0500
|
||||
Subject: [PATCH] Enable graphite
|
||||
|
||||
Change-Id: I799412c31dd0c30050657fbc6f1d0daec8d4d54c
|
||||
---
|
||||
core/archidroid.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/archidroid.mk b/core/archidroid.mk
|
||||
index 9ab4918..2ace5f1 100644
|
||||
--- a/core/archidroid.mk
|
||||
+++ b/core/archidroid.mk
|
||||
@@ -64,7 +64,7 @@ ARCHIDROID_GCC_CFLAGS_64 :=
|
||||
# ARCHIDROID_GCC_CFLAGS += -ftracer -funroll-loops
|
||||
|
||||
# These flags may cause ICEs in some compilers, but work fine in other ones, test carefully
|
||||
-# ARCHIDROID_GCC_CFLAGS += -fgraphite -fgraphite-identity
|
||||
+ARCHIDROID_GCC_CFLAGS += -fgraphite -fgraphite-identity
|
||||
|
||||
# The following flags (-floop) require that your GCC has been configured --with-isl
|
||||
# Additionally, applying any of them will most likely cause ICE in your compiler, so they're disabled
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,19 +0,0 @@
|
||||
From 2b18a46758ef5e6bc377315cd9bf8d08d1dd5b17 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Mon, 4 Jan 2016 07:41:10 -0500
|
||||
Subject: [PATCH] switch to SMSSecure as the messaging app
|
||||
|
||||
---
|
||||
target/product/aosp_base_telephony.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/target/product/aosp_base_telephony.mk b/target/product/aosp_base_telephony.mk
|
||||
index 0d4e333..f43eec5 100644
|
||||
--- a/target/product/aosp_base_telephony.mk
|
||||
+++ b/target/product/aosp_base_telephony.mk
|
||||
@@ -16,4 +16,4 @@
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
- messaging
|
||||
+ SMSSecure
|
@ -1,26 +0,0 @@
|
||||
From 8bff5fb1bf50db8e26ee64d1f15181f67a68fc7b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?=
|
||||
<JustArchi@users.noreply.github.com>
|
||||
Date: Mon, 10 Aug 2015 02:01:37 +0200
|
||||
Subject: [PATCH] Fix O3 SIGBUS
|
||||
|
||||
---
|
||||
main/Android.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main/Android.mk b/main/Android.mk
|
||||
index d98d2ef..8cfee24 100644
|
||||
--- a/main/Android.mk
|
||||
+++ b/main/Android.mk
|
||||
@@ -134,7 +134,7 @@ ifeq ($(BOARD_USES_WIPOWER), true)
|
||||
LOCAL_C_INCLUDES+= $(LOCAL_PATH)/../wipowerif/include
|
||||
endif
|
||||
|
||||
-LOCAL_CFLAGS += -DBUILDCFG $(bdroid_CFLAGS) -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=unused-parameter
|
||||
+LOCAL_CFLAGS += -DBUILDCFG $(bdroid_CFLAGS) -Os -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=unused-parameter
|
||||
LOCAL_CONLYFLAGS := -std=c99
|
||||
|
||||
ifeq ($(TARGET_PRODUCT), full_crespo)
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,26 +0,0 @@
|
||||
From d3774f2251a1fcaadd097de56f2494698b576034 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 25 Feb 2016 09:57:28 -0500
|
||||
Subject: [PATCH] Disable opt
|
||||
|
||||
Change-Id: I53a1075347b33690ad694fb400d06290a19e2666
|
||||
---
|
||||
media/libstagefright/id3/ID3.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
|
||||
index 76d65f0..0ff541a 100644
|
||||
--- a/media/libstagefright/id3/ID3.cpp
|
||||
+++ b/media/libstagefright/id3/ID3.cpp
|
||||
@@ -500,7 +500,7 @@ void ID3::Iterator::getString(String8 *id, String8 *comment) const {
|
||||
// comment fields (COM/COMM) contain an initial short descriptor, followed by \0,
|
||||
// followed by more data. The data following the \0 can be retrieved by setting
|
||||
// "otherdata" to true.
|
||||
-void ID3::Iterator::getstring(String8 *id, bool otherdata) const {
|
||||
+void __attribute__((optimize("no-tree-vectorize"))) ID3::Iterator::getstring(String8 *id, bool otherdata) const {
|
||||
id->setTo("");
|
||||
|
||||
size_t size;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,91 +0,0 @@
|
||||
From c7995a8a49315d0e7378606c9208caa0400afdd2 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Repinski <repinski23@gmail.com>
|
||||
Date: Sun, 19 Apr 2015 01:03:46 -0500
|
||||
Subject: [PATCH] Fix compiler issues uncovered at higher optimization levels.
|
||||
|
||||
amrwbenc: Fix incorrect array-bounds warning/error.
|
||||
m4v_h263: dec: Fix bogus strict-overflow warning/error.
|
||||
af: Fix ICE in AudioMixer::track__NoResample.
|
||||
|
||||
Change-Id: I2b44072eff6499026034a82107d9dfc6195a6810
|
||||
---
|
||||
media/libstagefright/codecs/amrwbenc/src/isp_az.c | 13 ++++++-------
|
||||
.../codecs/m4v_h263/dec/src/deringing_luma.cpp | 4 ++--
|
||||
services/audioflinger/AudioMixer.cpp | 2 +-
|
||||
3 files changed, 9 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/media/libstagefright/codecs/amrwbenc/src/isp_az.c b/media/libstagefright/codecs/amrwbenc/src/isp_az.c
|
||||
index 62e29e7..6423ec8 100644
|
||||
--- a/media/libstagefright/codecs/amrwbenc/src/isp_az.c
|
||||
+++ b/media/libstagefright/codecs/amrwbenc/src/isp_az.c
|
||||
@@ -42,7 +42,7 @@ void Isp_Az(
|
||||
/* 1 : adaptive scaling enabled */
|
||||
)
|
||||
{
|
||||
- Word32 i, j;
|
||||
+ Word16 i, j;
|
||||
Word16 hi, lo;
|
||||
Word32 f1[NC16k + 1], f2[NC16k];
|
||||
Word16 nc;
|
||||
@@ -58,18 +58,17 @@ void Isp_Az(
|
||||
{
|
||||
f1[i] = f1[i] << 2;
|
||||
}
|
||||
- } else
|
||||
- Get_isp_pol(&isp[0], f1, nc);
|
||||
-
|
||||
- if (nc > 8)
|
||||
- {
|
||||
Get_isp_pol_16kHz(&isp[1], f2, (nc - 1));
|
||||
for (i = 0; i <= nc - 1; i++)
|
||||
{
|
||||
f2[i] = f2[i] << 2;
|
||||
}
|
||||
- } else
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ Get_isp_pol(&isp[0], f1, nc);
|
||||
Get_isp_pol(&isp[1], f2, (nc - 1));
|
||||
+ }
|
||||
|
||||
/*-----------------------------------------------------*
|
||||
* Multiply F2(z) by (1 - z^-2) *
|
||||
diff --git a/media/libstagefright/codecs/m4v_h263/dec/src/deringing_luma.cpp b/media/libstagefright/codecs/m4v_h263/dec/src/deringing_luma.cpp
|
||||
index b5574b4..1319251 100644
|
||||
--- a/media/libstagefright/codecs/m4v_h263/dec/src/deringing_luma.cpp
|
||||
+++ b/media/libstagefright/codecs/m4v_h263/dec/src/deringing_luma.cpp
|
||||
@@ -78,7 +78,7 @@ void Deringing_Luma(
|
||||
for (v_blk = 0; v_blk < MBSIZE; v_blk += BLKSIZE)
|
||||
{
|
||||
v0 = ((v_blk - 1) >= 1) ? (v_blk - 1) : 1;
|
||||
- for (h_blk = MB_H; h_blk < MB_H + MBSIZE; h_blk += BLKSIZE)
|
||||
+ for (h_blk = MB_H; (unsigned int)h_blk < (unsigned int)((unsigned int)MB_H + (unsigned int)MBSIZE); h_blk += BLKSIZE)
|
||||
{
|
||||
h0 = ((h_blk - 1) >= 1) ? (h_blk - 1) : 1;
|
||||
|
||||
@@ -129,7 +129,7 @@ void Deringing_Luma(
|
||||
}
|
||||
|
||||
blks = 0;
|
||||
- for (v_blk = MB_V; v_blk < MB_V + MBSIZE; v_blk += BLKSIZE)
|
||||
+ for (v_blk = MB_V; (unsigned int)v_blk < (unsigned int)((unsigned int)MB_V + (unsigned int)MBSIZE); v_blk += BLKSIZE)
|
||||
{
|
||||
v0 = v_blk - 1;
|
||||
for (h_blk = 0; h_blk < MBSIZE; h_blk += BLKSIZE)
|
||||
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
|
||||
index 806eaf1..a12d595 100644
|
||||
--- a/services/audioflinger/AudioMixer.cpp
|
||||
+++ b/services/audioflinger/AudioMixer.cpp
|
||||
@@ -1934,7 +1934,7 @@ void AudioMixer::track__Resample(track_t* t, TO* out, size_t outFrameCount, TO*
|
||||
* TA: int32_t (Q4.27)
|
||||
*/
|
||||
template <int MIXTYPE, typename TO, typename TI, typename TA>
|
||||
-void AudioMixer::track__NoResample(track_t* t, TO* out, size_t frameCount,
|
||||
+void __attribute__((optimize("no-tree-vectorize"))) AudioMixer::track__NoResample(track_t* t, TO* out, size_t frameCount,
|
||||
TO* temp __unused, TA* aux)
|
||||
{
|
||||
ALOGVV("track__NoResample\n");
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,67 +0,0 @@
|
||||
From c293c1e3284e88ad4d6a19af6f9dde6722a487d9 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 19 Mar 2016 10:43:15 -0400
|
||||
Subject: [PATCH] Aggressive Doze
|
||||
|
||||
Change-Id: Ia5d7031f24f84afd3329090de0be5302b47f420e
|
||||
---
|
||||
.../com/android/server/DeviceIdleController.java | 26 +++++++++++-----------
|
||||
1 file changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java
|
||||
index 71650c3..0f541d1 100644
|
||||
--- a/services/core/java/com/android/server/DeviceIdleController.java
|
||||
+++ b/services/core/java/com/android/server/DeviceIdleController.java
|
||||
@@ -554,36 +554,36 @@ public class DeviceIdleController extends SystemService
|
||||
}
|
||||
|
||||
INACTIVE_TIMEOUT = mParser.getLong(KEY_INACTIVE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 30 * 60 * 1000L : 3 * 60 * 1000L);
|
||||
+ 30000L);
|
||||
SENSING_TIMEOUT = mParser.getLong(KEY_SENSING_TIMEOUT,
|
||||
- !DEBUG ? 4 * 60 * 1000L : 60 * 1000L);
|
||||
+ 0L);
|
||||
LOCATING_TIMEOUT = mParser.getLong(KEY_LOCATING_TIMEOUT,
|
||||
- !DEBUG ? 30 * 1000L : 15 * 1000L);
|
||||
+ 0L);
|
||||
LOCATION_ACCURACY = mParser.getFloat(KEY_LOCATION_ACCURACY, 20);
|
||||
MOTION_INACTIVE_TIMEOUT = mParser.getLong(KEY_MOTION_INACTIVE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L);
|
||||
+ 0L);
|
||||
IDLE_AFTER_INACTIVE_TIMEOUT = mParser.getLong(KEY_IDLE_AFTER_INACTIVE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 30 * 60 * 1000L : 3 * 60 * 1000L);
|
||||
+ 0L);
|
||||
IDLE_PENDING_TIMEOUT = mParser.getLong(KEY_IDLE_PENDING_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 5 * 60 * 1000L : 30 * 1000L);
|
||||
+ 12000L);
|
||||
MAX_IDLE_PENDING_TIMEOUT = mParser.getLong(KEY_MAX_IDLE_PENDING_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L);
|
||||
+ 12000L);
|
||||
IDLE_PENDING_FACTOR = mParser.getFloat(KEY_IDLE_PENDING_FACTOR,
|
||||
2f);
|
||||
IDLE_TIMEOUT = mParser.getLong(KEY_IDLE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 60 * 60 * 1000L : 6 * 60 * 1000L);
|
||||
+ 60000L);
|
||||
MAX_IDLE_TIMEOUT = mParser.getLong(KEY_MAX_IDLE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 6 * 60 * 60 * 1000L : 30 * 60 * 1000L);
|
||||
+ 21600000L);
|
||||
IDLE_FACTOR = mParser.getFloat(KEY_IDLE_FACTOR,
|
||||
2f);
|
||||
MIN_TIME_TO_ALARM = mParser.getLong(KEY_MIN_TIME_TO_ALARM,
|
||||
- !COMPRESS_TIME ? 60 * 60 * 1000L : 6 * 60 * 1000L);
|
||||
+ 600000L);
|
||||
MAX_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_MAX_TEMP_APP_WHITELIST_DURATION, 5 * 60 * 1000L);
|
||||
+ KEY_MAX_TEMP_APP_WHITELIST_DURATION, 10000L);
|
||||
MMS_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_MMS_TEMP_APP_WHITELIST_DURATION, 60 * 1000L);
|
||||
+ KEY_MMS_TEMP_APP_WHITELIST_DURATION, 10000L);
|
||||
SMS_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_SMS_TEMP_APP_WHITELIST_DURATION, 20 * 1000L);
|
||||
+ KEY_SMS_TEMP_APP_WHITELIST_DURATION, 10000L);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,71 +0,0 @@
|
||||
From e565d5688ac11ee1440d7622a84ae5a688f7f3b5 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 16 Apr 2016 22:49:51 -0400
|
||||
Subject: [PATCH] Aggressive Doze
|
||||
|
||||
Change-Id: If28d95b48fc283d88999a200112ee579dd9a4bc2
|
||||
---
|
||||
.../com/android/server/DeviceIdleController.java | 47 ++++++++--------------
|
||||
1 file changed, 16 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java
|
||||
index 0f541d1..44cc490 100644
|
||||
--- a/services/core/java/com/android/server/DeviceIdleController.java
|
||||
+++ b/services/core/java/com/android/server/DeviceIdleController.java
|
||||
@@ -553,37 +553,22 @@ public class DeviceIdleController extends SystemService
|
||||
Slog.e(TAG, "Bad device idle settings", e);
|
||||
}
|
||||
|
||||
- INACTIVE_TIMEOUT = mParser.getLong(KEY_INACTIVE_TIMEOUT,
|
||||
- 30000L);
|
||||
- SENSING_TIMEOUT = mParser.getLong(KEY_SENSING_TIMEOUT,
|
||||
- 0L);
|
||||
- LOCATING_TIMEOUT = mParser.getLong(KEY_LOCATING_TIMEOUT,
|
||||
- 0L);
|
||||
- LOCATION_ACCURACY = mParser.getFloat(KEY_LOCATION_ACCURACY, 20);
|
||||
- MOTION_INACTIVE_TIMEOUT = mParser.getLong(KEY_MOTION_INACTIVE_TIMEOUT,
|
||||
- 0L);
|
||||
- IDLE_AFTER_INACTIVE_TIMEOUT = mParser.getLong(KEY_IDLE_AFTER_INACTIVE_TIMEOUT,
|
||||
- 0L);
|
||||
- IDLE_PENDING_TIMEOUT = mParser.getLong(KEY_IDLE_PENDING_TIMEOUT,
|
||||
- 12000L);
|
||||
- MAX_IDLE_PENDING_TIMEOUT = mParser.getLong(KEY_MAX_IDLE_PENDING_TIMEOUT,
|
||||
- 12000L);
|
||||
- IDLE_PENDING_FACTOR = mParser.getFloat(KEY_IDLE_PENDING_FACTOR,
|
||||
- 2f);
|
||||
- IDLE_TIMEOUT = mParser.getLong(KEY_IDLE_TIMEOUT,
|
||||
- 60000L);
|
||||
- MAX_IDLE_TIMEOUT = mParser.getLong(KEY_MAX_IDLE_TIMEOUT,
|
||||
- 21600000L);
|
||||
- IDLE_FACTOR = mParser.getFloat(KEY_IDLE_FACTOR,
|
||||
- 2f);
|
||||
- MIN_TIME_TO_ALARM = mParser.getLong(KEY_MIN_TIME_TO_ALARM,
|
||||
- 600000L);
|
||||
- MAX_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_MAX_TEMP_APP_WHITELIST_DURATION, 10000L);
|
||||
- MMS_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_MMS_TEMP_APP_WHITELIST_DURATION, 10000L);
|
||||
- SMS_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_SMS_TEMP_APP_WHITELIST_DURATION, 10000L);
|
||||
+ INACTIVE_TIMEOUT = 300000L;//5m
|
||||
+ SENSING_TIMEOUT = 15000L;//15s
|
||||
+ LOCATING_TIMEOUT = 15000L;//15s
|
||||
+ LOCATION_ACCURACY = 30f;
|
||||
+ MOTION_INACTIVE_TIMEOUT = 15000L;//15s
|
||||
+ IDLE_AFTER_INACTIVE_TIMEOUT = 15000L;//15s
|
||||
+ IDLE_PENDING_TIMEOUT = 15000L;//15s
|
||||
+ MAX_IDLE_PENDING_TIMEOUT = 60000L;//60s
|
||||
+ IDLE_PENDING_FACTOR = 2f;
|
||||
+ IDLE_TIMEOUT = 600000L;//10m
|
||||
+ MAX_IDLE_TIMEOUT = 21600000L;//6h
|
||||
+ IDLE_FACTOR = 2f;
|
||||
+ MIN_TIME_TO_ALARM = 600000L;//10m
|
||||
+ MAX_TEMP_APP_WHITELIST_DURATION = 120000L;//2m
|
||||
+ MMS_TEMP_APP_WHITELIST_DURATION = 60000L;//1m
|
||||
+ SMS_TEMP_APP_WHITELIST_DURATION = 30000L;//30s
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,71 +0,0 @@
|
||||
From 23763f4eb6fba1a9031bc5d46fdd81bfc1a35c0c Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 23 Apr 2016 18:46:05 -0400
|
||||
Subject: [PATCH] Aggressive Doze
|
||||
|
||||
Change-Id: If7b7776ca634d9bb63cd77458a5d1c93fe38bc8f
|
||||
---
|
||||
.../com/android/server/DeviceIdleController.java | 47 ++++++++--------------
|
||||
1 file changed, 16 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java
|
||||
index 71650c3..44cc490 100644
|
||||
--- a/services/core/java/com/android/server/DeviceIdleController.java
|
||||
+++ b/services/core/java/com/android/server/DeviceIdleController.java
|
||||
@@ -553,37 +553,22 @@ public class DeviceIdleController extends SystemService
|
||||
Slog.e(TAG, "Bad device idle settings", e);
|
||||
}
|
||||
|
||||
- INACTIVE_TIMEOUT = mParser.getLong(KEY_INACTIVE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 30 * 60 * 1000L : 3 * 60 * 1000L);
|
||||
- SENSING_TIMEOUT = mParser.getLong(KEY_SENSING_TIMEOUT,
|
||||
- !DEBUG ? 4 * 60 * 1000L : 60 * 1000L);
|
||||
- LOCATING_TIMEOUT = mParser.getLong(KEY_LOCATING_TIMEOUT,
|
||||
- !DEBUG ? 30 * 1000L : 15 * 1000L);
|
||||
- LOCATION_ACCURACY = mParser.getFloat(KEY_LOCATION_ACCURACY, 20);
|
||||
- MOTION_INACTIVE_TIMEOUT = mParser.getLong(KEY_MOTION_INACTIVE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L);
|
||||
- IDLE_AFTER_INACTIVE_TIMEOUT = mParser.getLong(KEY_IDLE_AFTER_INACTIVE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 30 * 60 * 1000L : 3 * 60 * 1000L);
|
||||
- IDLE_PENDING_TIMEOUT = mParser.getLong(KEY_IDLE_PENDING_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 5 * 60 * 1000L : 30 * 1000L);
|
||||
- MAX_IDLE_PENDING_TIMEOUT = mParser.getLong(KEY_MAX_IDLE_PENDING_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L);
|
||||
- IDLE_PENDING_FACTOR = mParser.getFloat(KEY_IDLE_PENDING_FACTOR,
|
||||
- 2f);
|
||||
- IDLE_TIMEOUT = mParser.getLong(KEY_IDLE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 60 * 60 * 1000L : 6 * 60 * 1000L);
|
||||
- MAX_IDLE_TIMEOUT = mParser.getLong(KEY_MAX_IDLE_TIMEOUT,
|
||||
- !COMPRESS_TIME ? 6 * 60 * 60 * 1000L : 30 * 60 * 1000L);
|
||||
- IDLE_FACTOR = mParser.getFloat(KEY_IDLE_FACTOR,
|
||||
- 2f);
|
||||
- MIN_TIME_TO_ALARM = mParser.getLong(KEY_MIN_TIME_TO_ALARM,
|
||||
- !COMPRESS_TIME ? 60 * 60 * 1000L : 6 * 60 * 1000L);
|
||||
- MAX_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_MAX_TEMP_APP_WHITELIST_DURATION, 5 * 60 * 1000L);
|
||||
- MMS_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_MMS_TEMP_APP_WHITELIST_DURATION, 60 * 1000L);
|
||||
- SMS_TEMP_APP_WHITELIST_DURATION = mParser.getLong(
|
||||
- KEY_SMS_TEMP_APP_WHITELIST_DURATION, 20 * 1000L);
|
||||
+ INACTIVE_TIMEOUT = 300000L;//5m
|
||||
+ SENSING_TIMEOUT = 15000L;//15s
|
||||
+ LOCATING_TIMEOUT = 15000L;//15s
|
||||
+ LOCATION_ACCURACY = 30f;
|
||||
+ MOTION_INACTIVE_TIMEOUT = 15000L;//15s
|
||||
+ IDLE_AFTER_INACTIVE_TIMEOUT = 15000L;//15s
|
||||
+ IDLE_PENDING_TIMEOUT = 15000L;//15s
|
||||
+ MAX_IDLE_PENDING_TIMEOUT = 60000L;//60s
|
||||
+ IDLE_PENDING_FACTOR = 2f;
|
||||
+ IDLE_TIMEOUT = 600000L;//10m
|
||||
+ MAX_IDLE_TIMEOUT = 21600000L;//6h
|
||||
+ IDLE_FACTOR = 2f;
|
||||
+ MIN_TIME_TO_ALARM = 600000L;//10m
|
||||
+ MAX_TEMP_APP_WHITELIST_DURATION = 120000L;//2m
|
||||
+ MMS_TEMP_APP_WHITELIST_DURATION = 60000L;//1m
|
||||
+ SMS_TEMP_APP_WHITELIST_DURATION = 30000L;//30s
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From bffe81a931165fbc57bbf7a7ff688f6b09b911cd Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Wed, 20 Jul 2016 00:06:16 -0400
|
||||
Subject: [PATCH] Change default connectivity check URLs
|
||||
|
||||
Change-Id: I8d75ab078f179e23b2ae983b7a4e5653f1eca08e
|
||||
---
|
||||
.../src/com/android/captiveportallogin/CaptivePortalLoginActivity.java | 2 +-
|
||||
services/core/java/com/android/server/connectivity/NetworkMonitor.java | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
|
||||
index ed9c111..09a8898 100644
|
||||
--- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
|
||||
+++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java
|
||||
@@ -86,7 +86,7 @@ public class CaptivePortalLoginActivity extends Activity {
|
||||
if (server == null) server = DEFAULT_SERVER;
|
||||
mCm = ConnectivityManager.from(this);
|
||||
try {
|
||||
- mURL = new URL("http", server, "/generate_204");
|
||||
+ mURL = new URL("https://spotco.us/gen204.php");
|
||||
} catch (MalformedURLException e) {
|
||||
// System misconfigured, bail out in a way that at least provides network access.
|
||||
Log.e(TAG, "Invalid captive portal URL, server=" + server);
|
||||
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
|
||||
index 5108564..0ebf739 100644
|
||||
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
|
||||
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
|
||||
@@ -640,7 +640,7 @@ public class NetworkMonitor extends StateMachine {
|
||||
HttpURLConnection urlConnection = null;
|
||||
int httpResponseCode = 599;
|
||||
try {
|
||||
- URL url = new URL("http", mServer, "/generate_204");
|
||||
+ URL url = new URL("https://spotco.us/gen204.php");
|
||||
// On networks with a PAC instead of fetching a URL that should result in a 204
|
||||
// reponse, we instead simply fetch the PAC script. This is done for a few reasons:
|
||||
// 1. At present our PAC code does not yet handle multiple PACs on multiple networks
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,226 +0,0 @@
|
||||
From 322f9019c0ca410c0d72190dd17bc316351d35db Mon Sep 17 00:00:00 2001
|
||||
From: Martin Brabham <optedoblivion@cyngn.com>
|
||||
Date: Fri, 9 Jan 2015 16:20:34 -0800
|
||||
Subject: [PATCH] DNSCrypt: Encrypt dns queries - Add DNS encryption settings
|
||||
constants. - Listen for settings changes and handle rerouting dns queries -
|
||||
Handle switching servers
|
||||
|
||||
Change-Id: Ic97285ac6924aa0c930ff59709da384e197cd3ca
|
||||
---
|
||||
core/java/android/provider/Settings.java | 22 ++++
|
||||
.../com/android/server/ConnectivityService.java | 116 ++++++++++++++++++---
|
||||
2 files changed, 123 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
|
||||
index f6642d8..9905483 100644
|
||||
--- a/core/java/android/provider/Settings.java
|
||||
+++ b/core/java/android/provider/Settings.java
|
||||
@@ -4058,6 +4058,28 @@ public final class Settings {
|
||||
public static final class Secure extends NameValueTable {
|
||||
public static final String SYS_PROP_SETTING_VERSION = "sys.settings_secure_version";
|
||||
|
||||
+ // DNS Encryption
|
||||
+
|
||||
+ /**
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final String DNS_ENCRYPTION_TOGGLE = "dns_enc_toggle";
|
||||
+
|
||||
+ /**
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final int DNS_ENCRYPTION_TOGGLE_DEFAULT = 0;
|
||||
+
|
||||
+ /**
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final String DNS_ENCRYPTION_SERVER = "dns_enc_server";
|
||||
+
|
||||
+ /**
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final String DNS_ENCRYPTION_SERVER_DEFAULT = "opendns";
|
||||
+
|
||||
/**
|
||||
* The content:// style URL for this table
|
||||
*/
|
||||
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
|
||||
index 2a47460..0e6578f 100644
|
||||
--- a/services/core/java/com/android/server/ConnectivityService.java
|
||||
+++ b/services/core/java/com/android/server/ConnectivityService.java
|
||||
@@ -91,6 +91,8 @@ import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
+import android.provider.Settings.Secure;
|
||||
+import android.provider.Settings.SettingNotFoundException;
|
||||
import android.security.Credentials;
|
||||
import android.security.KeyStore;
|
||||
import android.telephony.TelephonyManager;
|
||||
@@ -167,6 +169,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
implements PendingIntent.OnFinished {
|
||||
private static final String TAG = "ConnectivityService";
|
||||
|
||||
+ private static final String NETID_UPDATE =
|
||||
+ "org.codeaurora.NETID_UPDATE";
|
||||
+
|
||||
private static final boolean DBG = true;
|
||||
private static final boolean VDBG = false;
|
||||
|
||||
@@ -229,6 +234,16 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
private static final int ENABLED = 1;
|
||||
private static final int DISABLED = 0;
|
||||
|
||||
+ // DNS Encryption variables
|
||||
+ private static final String DNSCRYPT_SERVICE = "dnscrypt-proxy";
|
||||
+ private static final String LOOPBACK_ADDR = "127.0.0.1";
|
||||
+ private static final String NULL_DOMAIN = "";
|
||||
+ private boolean mDnsEncryptionEnabled = false;
|
||||
+ private String mDnsEncryptionServer = Secure.DNS_ENCRYPTION_SERVER_DEFAULT;
|
||||
+ private Collection<InetAddress> mActualDnses = new ArrayList<InetAddress>();
|
||||
+ private int mNetId = -1;
|
||||
+ private String mActualDomains = null;
|
||||
+
|
||||
private enum ReapUnvalidatedNetworks {
|
||||
// Tear down networks that have no chance (e.g. even if validated) of becoming
|
||||
// the highest scoring network satisfying a NetworkRequest. This should be passed when
|
||||
@@ -827,6 +842,13 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
mSettingsObserver.observe(
|
||||
Settings.Global.getUriFor(Settings.Global.MOBILE_DATA_ALWAYS_ON),
|
||||
EVENT_CONFIGURE_MOBILE_DATA_ALWAYS_ON);
|
||||
+
|
||||
+ // Watch for whether or not to use DNScrypt
|
||||
+ resolver.registerContentObserver(Settings.Secure.getUriFor(
|
||||
+ Secure.DNS_ENCRYPTION_TOGGLE), false, this);
|
||||
+ resolver.registerContentObserver(Settings.Secure.getUriFor(Secure
|
||||
+ .DNS_ENCRYPTION_SERVER), false, this);
|
||||
+ onPreferencesChanged();
|
||||
}
|
||||
|
||||
private synchronized int nextNetworkRequestId() {
|
||||
@@ -3027,7 +3049,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
- private static class SettingsObserver extends ContentObserver {
|
||||
+ private class SettingsObserver extends ContentObserver {
|
||||
final private HashMap<Uri, Integer> mUriEventMap;
|
||||
final private Context mContext;
|
||||
final private Handler mHandler;
|
||||
@@ -3058,7 +3080,70 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
} else {
|
||||
loge("No matching event to send for URI=" + uri);
|
||||
}
|
||||
+ onPreferencesChanged();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Called when preference are updated from Settings
|
||||
+ * {@hide}
|
||||
+ */
|
||||
+ private void onPreferencesChanged() {
|
||||
+ setDnsEncryptionDns();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Updates the DNS to either encrypted or regular
|
||||
+ */
|
||||
+ private void setDnsEncryptionDns() {
|
||||
+ try {
|
||||
+ mDnsEncryptionEnabled = Secure.getIntForUser(mContext.getContentResolver(),
|
||||
+ Secure.DNS_ENCRYPTION_TOGGLE, UserHandle.USER_CURRENT) != 0;
|
||||
+ } catch (SettingNotFoundException e) {
|
||||
+ loge("Exception getting dns enabled setting: " + e);
|
||||
+ }
|
||||
+ String serverName = Secure.getStringForUser(mContext.getContentResolver(),
|
||||
+ Secure.DNS_ENCRYPTION_SERVER, UserHandle.USER_CURRENT);
|
||||
+ serverName = (TextUtils.isEmpty(serverName)) ? Secure.DNS_ENCRYPTION_SERVER_DEFAULT :
|
||||
+ serverName;
|
||||
+
|
||||
+ // If they aren't equal, then we have a change!
|
||||
+ boolean changed = !mDnsEncryptionServer.equals(serverName);
|
||||
+
|
||||
+ // Set last server name
|
||||
+ mDnsEncryptionServer = serverName;
|
||||
+
|
||||
+ log("DNS Encryption Enabled: " + mDnsEncryptionEnabled);
|
||||
+ Collection<InetAddress> dnses = mActualDnses;
|
||||
+ String domains = mActualDomains;
|
||||
+ if (mDnsEncryptionEnabled) {
|
||||
+ if (changed) {
|
||||
+ // If we had a server change, need to restart service to pick up new server
|
||||
+ SystemProperties.set("ctl.stop", DNSCRYPT_SERVICE);
|
||||
+ SystemProperties.set("net.dnscrypt_resolver", mDnsEncryptionServer);
|
||||
+ }
|
||||
+ SystemProperties.set("ctl.start", DNSCRYPT_SERVICE);
|
||||
+ dnses = new ArrayList<InetAddress>();
|
||||
+ dnses.add(NetworkUtils.numericToInetAddress(LOOPBACK_ADDR));
|
||||
+ domains = NULL_DOMAIN;
|
||||
+ } else {
|
||||
+ SystemProperties.set("ctl.stop", DNSCRYPT_SERVICE);
|
||||
+ }
|
||||
+ updateDnsesInternal(dnses, mNetId, domains);
|
||||
+ }
|
||||
+
|
||||
+ private void updateDnsesInternal(Collection<InetAddress> dnses, int netId, String domains) {
|
||||
+ if (DBG) log("Setting Dns servers for network " + netId + " to " + dnses);
|
||||
+ try {
|
||||
+ mNetd.setDnsServersForNetwork(netId, NetworkUtils.makeStrings(dnses), domains);
|
||||
+ } catch (Exception e) {
|
||||
+ loge("Exception in setDnsServersForNetwork: " + e);
|
||||
+ }
|
||||
+ NetworkAgentInfo defaultNai = mNetworkForRequestId.get(mDefaultRequest.requestId);
|
||||
+ if (defaultNai != null && defaultNai.network.netId == netId) {
|
||||
+ setDefaultDnsSystemProperties(dnses);
|
||||
}
|
||||
+ flushVmDnsCache();
|
||||
}
|
||||
|
||||
private static void log(String s) {
|
||||
@@ -4122,27 +4207,28 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
|
||||
private void updateDnses(LinkProperties newLp, LinkProperties oldLp, int netId,
|
||||
boolean flush, boolean useDefaultDns) {
|
||||
- if (oldLp == null || (newLp.isIdenticalDnses(oldLp) == false)) {
|
||||
- Collection<InetAddress> dnses = newLp.getDnsServers();
|
||||
+ if (oldLp == null || !newLp.isIdenticalDnses(oldLp)) {
|
||||
+ Collection<InetAddress> dnses = newLp.getDnsServers();
|
||||
if (dnses.size() == 0 && mDefaultDns != null && useDefaultDns) {
|
||||
- dnses = new ArrayList();
|
||||
+ dnses = new ArrayList<InetAddress>();
|
||||
dnses.add(mDefaultDns);
|
||||
if (DBG) {
|
||||
loge("no dns provided for netId " + netId + ", so using defaults");
|
||||
}
|
||||
}
|
||||
- if (DBG) log("Setting Dns servers for network " + netId + " to " + dnses);
|
||||
- try {
|
||||
- mNetd.setDnsServersForNetwork(netId, NetworkUtils.makeStrings(dnses),
|
||||
- newLp.getDomains());
|
||||
- } catch (Exception e) {
|
||||
- loge("Exception in setDnsServersForNetwork: " + e);
|
||||
- }
|
||||
- final NetworkAgentInfo defaultNai = getDefaultNetwork();
|
||||
- if (defaultNai != null && defaultNai.network.netId == netId) {
|
||||
- setDefaultDnsSystemProperties(dnses);
|
||||
+
|
||||
+ // Set tracking fields
|
||||
+ mNetId = netId;
|
||||
+ mActualDnses = dnses;
|
||||
+ mActualDomains = newLp.getDomains();
|
||||
+
|
||||
+ String domains = mActualDomains;
|
||||
+ if (mDnsEncryptionEnabled) {
|
||||
+ dnses = new ArrayList<InetAddress>();
|
||||
+ dnses.add(NetworkUtils.numericToInetAddress(LOOPBACK_ADDR));
|
||||
+ domains = NULL_DOMAIN;
|
||||
}
|
||||
- flushVmDnsCache();
|
||||
+ updateDnsesInternal(dnses, netId, domains);
|
||||
} else if (flush) {
|
||||
try {
|
||||
mNetd.flushNetworkDnsCache(netId);
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 9b8ea26004ada2b15d0403f55a23a0c02d16c5b2 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 2 Apr 2016 11:28:50 -0400
|
||||
Subject: [PATCH] Shutdown after 5 failed unlock attempts
|
||||
|
||||
Change-Id: If18654ff5816a1c7b31187b4c511b940772c20cf
|
||||
---
|
||||
.../Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java | 5 +++++
|
||||
packages/SystemUI/AndroidManifest.xml | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
index 827b378..3bb587b 100644
|
||||
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
@@ -19,6 +19,7 @@ import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
+import android.os.PowerManager;
|
||||
import android.os.RemoteException;
|
||||
import android.os.UserHandle;
|
||||
import android.util.AttributeSet;
|
||||
@@ -294,6 +295,10 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
||||
if (timeoutMs > 0) {
|
||||
showTimeoutDialog(timeoutMs);
|
||||
}
|
||||
+ if(failedAttempts >= 5) {
|
||||
+ final PowerManager powerManager = mContext.getSystemService(PowerManager.class);
|
||||
+ powerManager.shutdown(false, false);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
|
||||
index 1562901..add89a4 100644
|
||||
--- a/packages/SystemUI/AndroidManifest.xml
|
||||
+++ b/packages/SystemUI/AndroidManifest.xml
|
||||
@@ -109,6 +109,7 @@
|
||||
<uses-permission android:name="android.permission.TRUST_LISTENER" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
<uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" />
|
||||
+ <uses-permission android:name="android.permission.REBOOT" />
|
||||
|
||||
<!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 6ee2fef0118b2e2955bcec974af36c5ed107deb3 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 18 Apr 2016 09:21:48 -0400
|
||||
Subject: [PATCH] Implement hostname Randomization
|
||||
|
||||
Change-Id: I938b7e896716ea4cb79b4a2e9d852dbe968a778d
|
||||
---
|
||||
services/core/java/com/android/server/ConnectivityService.java | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
|
||||
index 2a47460..4dccc03 100644
|
||||
--- a/services/core/java/com/android/server/ConnectivityService.java
|
||||
+++ b/services/core/java/com/android/server/ConnectivityService.java
|
||||
@@ -146,6 +146,7 @@ import java.io.PrintWriter;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
+import java.security.SecureRandom;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -646,8 +647,13 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
mTrackerHandler = new NetworkStateTrackerHandler(mHandlerThread.getLooper());
|
||||
|
||||
// setup our unique device name
|
||||
- String hostname = CMSettings.Secure.getString(context.getContentResolver(),
|
||||
+ String hostname;
|
||||
+ if(SystemProperties.getBoolean("persist.privacy.randomize_host", true)) {
|
||||
+ hostname = Long.toHexString(new SecureRandom().nextLong());
|
||||
+ } else {
|
||||
+ hostname = CMSettings.Secure.getString(context.getContentResolver(),
|
||||
CMSettings.Secure.DEVICE_HOSTNAME);
|
||||
+ }
|
||||
if (TextUtils.isEmpty(hostname) &&
|
||||
TextUtils.isEmpty(SystemProperties.get("net.hostname"))) {
|
||||
String id = Settings.Secure.getString(context.getContentResolver(),
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,198 +0,0 @@
|
||||
From f00b971d99ae9320cf463f32c860640a4b67b179 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 8 Aug 2016 16:01:07 -0400
|
||||
Subject: [PATCH] Add radio tile (1/2)
|
||||
|
||||
Change-Id: I5d1cb2fede884b9aa044e0de0cf6459d225e0016
|
||||
---
|
||||
packages/SystemUI/res/drawable/ic_qs_radio_off.xml | 10 +++
|
||||
packages/SystemUI/res/drawable/ic_qs_radio_on.xml | 10 +++
|
||||
packages/SystemUI/res/values/cm_strings.xml | 1 +
|
||||
.../src/com/android/systemui/qs/RadioTile.java | 92 ++++++++++++++++++++++
|
||||
.../systemui/statusbar/phone/QSTileHost.java | 4 +
|
||||
5 files changed, 117 insertions(+)
|
||||
create mode 100644 packages/SystemUI/res/drawable/ic_qs_radio_off.xml
|
||||
create mode 100644 packages/SystemUI/res/drawable/ic_qs_radio_on.xml
|
||||
create mode 100644 packages/SystemUI/src/com/android/systemui/qs/RadioTile.java
|
||||
|
||||
diff --git a/packages/SystemUI/res/drawable/ic_qs_radio_off.xml b/packages/SystemUI/res/drawable/ic_qs_radio_off.xml
|
||||
new file mode 100644
|
||||
index 0000000..1cb4918
|
||||
--- /dev/null
|
||||
+++ b/packages/SystemUI/res/drawable/ic_qs_radio_off.xml
|
||||
@@ -0,0 +1,10 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ android:width="64dp"
|
||||
+ android:height="64dp"
|
||||
+ android:viewportWidth="24"
|
||||
+ android:viewportHeight="24">
|
||||
+ <path
|
||||
+ android:fillColor="#4DFFFFFF"
|
||||
+ android:pathData="M12,5c-3.87,0 -7,3.13 -7,7h2c0,-2.76 2.24,-5 5,-5s5,2.24 5,5h2c0,-3.87 -3.13,-7 -7,-7zM13,14.29c0.88,-0.39 1.5,-1.26 1.5,-2.29 0,-1.38 -1.12,-2.5 -2.5,-2.5S9.5,10.62 9.5,12c0,1.02 0.62,1.9 1.5,2.29v3.3L7.59,21 9,22.41l3,-3 3,3L16.41,21 13,17.59v-3.3zM12,1C5.93,1 1,5.93 1,12h2c0,-4.97 4.03,-9 9,-9s9,4.03 9,9h2c0,-6.07 -4.93,-11 -11,-11z" />
|
||||
+</vector>
|
||||
diff --git a/packages/SystemUI/res/drawable/ic_qs_radio_on.xml b/packages/SystemUI/res/drawable/ic_qs_radio_on.xml
|
||||
new file mode 100644
|
||||
index 0000000..d446deb
|
||||
--- /dev/null
|
||||
+++ b/packages/SystemUI/res/drawable/ic_qs_radio_on.xml
|
||||
@@ -0,0 +1,10 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ android:width="64dp"
|
||||
+ android:height="64dp"
|
||||
+ android:viewportWidth="24"
|
||||
+ android:viewportHeight="24">
|
||||
+ <path
|
||||
+ android:fillColor="#FFFFFFFF"
|
||||
+ android:pathData="M12,5c-3.87,0 -7,3.13 -7,7h2c0,-2.76 2.24,-5 5,-5s5,2.24 5,5h2c0,-3.87 -3.13,-7 -7,-7zM13,14.29c0.88,-0.39 1.5,-1.26 1.5,-2.29 0,-1.38 -1.12,-2.5 -2.5,-2.5S9.5,10.62 9.5,12c0,1.02 0.62,1.9 1.5,2.29v3.3L7.59,21 9,22.41l3,-3 3,3L16.41,21 13,17.59v-3.3zM12,1C5.93,1 1,5.93 1,12h2c0,-4.97 4.03,-9 9,-9s9,4.03 9,9h2c0,-6.07 -4.93,-11 -11,-11z" />
|
||||
+</vector>
|
||||
diff --git a/packages/SystemUI/res/values/cm_strings.xml b/packages/SystemUI/res/values/cm_strings.xml
|
||||
index 2996d21..41b65ae 100644
|
||||
--- a/packages/SystemUI/res/values/cm_strings.xml
|
||||
+++ b/packages/SystemUI/res/values/cm_strings.xml
|
||||
@@ -103,6 +103,7 @@
|
||||
<string name="quick_settings_profiles">System profiles</string>
|
||||
<string name="quick_settings_profiles_off">Profiles disabled</string>
|
||||
<string name="quick_settings_heads_up_label">Heads up</string>
|
||||
+ <string name="quick_settings_radio_power_label">Radio power</string>
|
||||
<string name="quick_settings_battery_saver_label">Battery saver</string>
|
||||
<!-- quick settings battery saver label to show when device is charging and tile is disabled -->
|
||||
<string name="quick_settings_battery_saver_label_charging">Battery saver (charging)</string>
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/RadioTile.java b/packages/SystemUI/src/com/android/systemui/qs/RadioTile.java
|
||||
new file mode 100644
|
||||
index 0000000..74cc6c0
|
||||
--- /dev/null
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/RadioTile.java
|
||||
@@ -0,0 +1,92 @@
|
||||
+package com.android.systemui.qs.tiles;
|
||||
+
|
||||
+import android.content.BroadcastReceiver;
|
||||
+import android.content.Context;
|
||||
+import android.content.Intent;
|
||||
+import android.content.IntentFilter;
|
||||
+
|
||||
+import android.util.Log;
|
||||
+import com.android.systemui.R;
|
||||
+import com.android.systemui.qs.QSTile;
|
||||
+import org.cyanogenmod.internal.util.QSUtils;
|
||||
+
|
||||
+import com.android.internal.telephony.Phone;
|
||||
+import com.android.internal.telephony.PhoneFactory;
|
||||
+
|
||||
+public class RadioTile extends QSTile<QSTile.BooleanState> {
|
||||
+
|
||||
+ private boolean mListening;
|
||||
+ private Phone phone = null;
|
||||
+
|
||||
+ private BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||
+ @Override
|
||||
+ public void onReceive(Context context, Intent intent) {
|
||||
+ refreshState();
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ public RadioTile(Host host) {
|
||||
+ super(host);
|
||||
+ phone = PhoneFactory.getDefaultPhone();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected BooleanState newTileState() {
|
||||
+ return new BooleanState();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void handleClick() {
|
||||
+ boolean newState = !getState().value;
|
||||
+ setState(newState);
|
||||
+ refreshState();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void handleLongClick() {
|
||||
+ Intent lauchRadioInfo = new Intent();
|
||||
+ launchRadioInfo.setClassName("com.android.settings", "com.android.settings.RadioInfo");
|
||||
+ mHost.startActivityDismissingKeyguard(lauchRadioInfo);
|
||||
+ }
|
||||
+
|
||||
+ private void setEnabled(boolean enabled) {
|
||||
+ phone.setRadioPower(enabled);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void handleUpdateState(BooleanState state, Object arg) {
|
||||
+ state.visible = true;
|
||||
+ final boolean radioPower = arg instanceof Boolean ? (boolean) arg : phone.isRadioOn();
|
||||
+ state.value = radioPower;
|
||||
+ state.label = mContext.getString(R.string.quick_settings_radio_power_label);
|
||||
+ if(state.value) {
|
||||
+ state.icon = ResourceIcon.get(R.drawable.ic_qs_radio_on);
|
||||
+ } else {
|
||||
+ state.icon = ResourceIcon.get(R.drawable.ic_qs_radio_off);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setListening(boolean listening) {
|
||||
+ if (mListening == listening) return;
|
||||
+ mListening = listening;
|
||||
+ if (listening) {
|
||||
+ final IntentFilter filter = new IntentFilter();
|
||||
+ filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
|
||||
+ mContext.registerReceiver(mReceiver, filter);
|
||||
+ } else {
|
||||
+ mContext.unregisterReceiver(mReceiver);
|
||||
+ }
|
||||
+ mSetting.setListening(listening);
|
||||
+ }
|
||||
+
|
||||
+ private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||
+ @Override
|
||||
+ public void onReceive(Context context, Intent intent) {
|
||||
+ if (Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(intent.getAction())) {
|
||||
+ refreshState();
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+}
|
||||
+}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
|
||||
index e88ed73..e6116b7 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
|
||||
@@ -59,6 +59,7 @@ import com.android.systemui.qs.tiles.LockscreenToggleTile;
|
||||
import com.android.systemui.qs.tiles.NfcTile;
|
||||
import com.android.systemui.qs.tiles.PerfProfileTile;
|
||||
import com.android.systemui.qs.tiles.ProfilesTile;
|
||||
+import com.android.systemui.qs.tiles.RadioTile;
|
||||
import com.android.systemui.qs.tiles.RotationLockTile;
|
||||
import com.android.systemui.qs.tiles.ScreenTimeoutTile;
|
||||
import com.android.systemui.qs.tiles.SyncTile;
|
||||
@@ -371,6 +372,7 @@ public class QSTileHost implements QSTile.Host, Tunable {
|
||||
else if (tileSpec.equals("lockscreen")) return new LockscreenToggleTile(this);
|
||||
else if (tileSpec.equals("ambient_display")) return new AmbientDisplayTile(this);
|
||||
else if (tileSpec.equals("heads_up")) return new HeadsUpTile(this);
|
||||
+ else if (tileSpec.equals("radio_power")) return new RadioTile(this);
|
||||
else if (tileSpec.equals("battery_saver")) return new BatterySaverTile(this);
|
||||
else if (tileSpec.equals("caffeine")) return new CaffeineTile(this);
|
||||
else if (tileSpec.startsWith(IntentTile.PREFIX)) return IntentTile.create(this,tileSpec);
|
||||
@@ -468,6 +470,7 @@ public class QSTileHost implements QSTile.Host, Tunable {
|
||||
else if (spec.equals("lockscreen")) return R.string.quick_settings_lockscreen_label;
|
||||
else if (spec.equals("ambient_display")) return R.string.quick_settings_ambient_display_label;
|
||||
else if (spec.equals("heads_up")) return R.string.quick_settings_heads_up_label;
|
||||
+ else if (spec.equals("radio_power")) return R.string.quick_settings_radio_power_label;
|
||||
else if (spec.equals("battery_saver")) return R.string.quick_settings_battery_saver_label;
|
||||
else if (spec.equals("caffeine")) return R.string.quick_settings_caffeine_label;
|
||||
return 0;
|
||||
@@ -498,6 +501,7 @@ public class QSTileHost implements QSTile.Host, Tunable {
|
||||
else if (spec.equals("lockscreen")) return R.drawable.ic_qs_lock_screen_on;
|
||||
else if (spec.equals("ambient_display")) return R.drawable.ic_qs_ambientdisplay_on;
|
||||
else if (spec.equals("heads_up")) return R.drawable.ic_qs_heads_up_on;
|
||||
+ else if (spec.equals("radio_power")) return R.drawable.ic_qs_radio_on;
|
||||
else if (spec.equals("battery_saver")) return R.drawable.ic_qs_battery_saver_on;
|
||||
else if (spec.equals("caffeine")) return R.drawable.ic_qs_caffeine_on;
|
||||
return 0;
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 367e1be44a79ed50b95c78f06ede4532294e96f6 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Wed, 24 Feb 2016 08:53:20 -0500
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: Icbf1deb4fd0cd6696f3fa8e2edab2c30960b121b
|
||||
---
|
||||
.../src/com/android/providers/settings/DatabaseHelper.java | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
|
||||
index 2b5c14f..0b094a0 100644
|
||||
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
|
||||
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
|
||||
@@ -1917,8 +1917,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
if (upgradeVersion < 115) {
|
||||
- moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_SECURE,
|
||||
- new String[] { CMSettings.Secure.STATS_COLLECTION }, true);
|
||||
if (mUserHandle == UserHandle.USER_OWNER) {
|
||||
db.beginTransaction();
|
||||
SQLiteStatement stmt = null;
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,97 +0,0 @@
|
||||
From d3ec926a99694ed258f60f197a85b83b5f0e75f3 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Tue, 22 Mar 2016 15:10:47 -0400
|
||||
Subject: [PATCH] Allow packages to fake their signature
|
||||
|
||||
Change-Id: Iba3b34256161926886c27ef63271795fd8b93f1a
|
||||
---
|
||||
core/res/AndroidManifest.xml | 7 +++++++
|
||||
core/res/res/values/config.xml | 2 ++
|
||||
core/res/res/values/strings.xml | 5 +++++
|
||||
.../android/server/pm/PackageManagerService.java | 23 ++++++++++++++++++++--
|
||||
4 files changed, 35 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||||
index 50a4b38..9be1bcb 100644
|
||||
--- a/core/res/AndroidManifest.xml
|
||||
+++ b/core/res/AndroidManifest.xml
|
||||
@@ -1654,6 +1654,13 @@
|
||||
android:description="@string/permdesc_getPackageSize"
|
||||
android:protectionLevel="normal" />
|
||||
|
||||
+ <!-- @hide Allows an application to change the package signature as
|
||||
+ seen by applications -->
|
||||
+ <permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
|
||||
+ android:protectionLevel="dangerous"
|
||||
+ android:label="@string/permlab_fakePackageSignature"
|
||||
+ android:description="@string/permdesc_fakePackageSignature" />
|
||||
+
|
||||
<!-- @deprecated No longer useful, see
|
||||
{@link android.content.pm.PackageManager#addPackageToPreferred}
|
||||
for details. -->
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 5cdce93..ac23bb6 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -1298,6 +1298,8 @@
|
||||
<string-array name="config_locationProviderPackageNames" translatable="false">
|
||||
<!-- The standard AOSP fused location provider -->
|
||||
<item>com.android.location.fused</item>
|
||||
+ <!-- The (faked) microg fused location provider -->
|
||||
+ <item>com.google.android.gms</item>
|
||||
</string-array>
|
||||
|
||||
<!-- This string array can be overriden to enable test location providers initially. -->
|
||||
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
||||
index 1fef7e7..0924463 100644
|
||||
--- a/core/res/res/values/strings.xml
|
||||
+++ b/core/res/res/values/strings.xml
|
||||
@@ -615,6 +615,11 @@
|
||||
|
||||
<!-- Permissions -->
|
||||
|
||||
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
+ <string name="permlab_fakePackageSignature">Spoof package signature</string>
|
||||
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
+ <string name="permdesc_fakePackageSignature">Allows the app to pretend to be a different app. Malicious applications might be able to use this to access private application data. Grant this permission with caution only!</string>
|
||||
+
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permlab_statusBar">disable or modify status bar</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
index d5c58df..7b68c3e 100644
|
||||
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
@@ -2805,8 +2805,27 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
final Set<String> permissions = permissionsState.getPermissions(userId);
|
||||
final PackageUserState state = ps.readUserState(userId);
|
||||
|
||||
- return PackageParser.generatePackageInfo(p, gids, flags,
|
||||
- ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId);
|
||||
+ return mayFakeSignature(p, PackageParser.generatePackageInfo(p, gids, flags,
|
||||
+ ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId),
|
||||
+ permissions);
|
||||
+ }
|
||||
+
|
||||
+ private PackageInfo mayFakeSignature(PackageParser.Package p, PackageInfo pi,
|
||||
+ Set<String> permissions) {
|
||||
+ try {
|
||||
+ if (permissions.contains("android.permission.FAKE_PACKAGE_SIGNATURE")
|
||||
+ && p.applicationInfo.targetSdkVersion > Build.VERSION_CODES.LOLLIPOP_MR1
|
||||
+ && p.mAppMetaData != null) {
|
||||
+ String sig = p.mAppMetaData.getString("fake-signature");
|
||||
+ if (sig != null) {
|
||||
+ pi.signatures = new Signature[] {new Signature(sig)};
|
||||
+ }
|
||||
+ }
|
||||
+ } catch (Throwable t) {
|
||||
+ // We should never die because of any failures, this is system code!
|
||||
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
|
||||
+ }
|
||||
+ return pi;
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,104 +0,0 @@
|
||||
From 7357f8c0c8a6bdc09555ab47dae83f28346b8470 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Beno=C3=AEt=20Mauduit?= <bmauduit@beneth.fr>
|
||||
Date: Wed, 22 Jun 2016 15:04:56 +0200
|
||||
Subject: [PATCH 1/1] Add signature Spoofing permission
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This is needed by GmsCore (https://microg.org/) to pretend
|
||||
the existence of the official Play Services to applications calling
|
||||
Google APIs.
|
||||
|
||||
Signed-off-by: Benoît Mauduit <bmauduit@beneth.fr>
|
||||
---
|
||||
core/res/AndroidManifest.xml | 7 +++++++
|
||||
core/res/res/values/config.xml | 2 ++
|
||||
core/res/res/values/strings.xml | 5 +++++
|
||||
.../android/server/pm/PackageManagerService.java | 23 ++++++++++++++++++++--
|
||||
4 files changed, 35 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||||
index ea0e39c..a936983 100644
|
||||
--- a/core/res/AndroidManifest.xml
|
||||
+++ b/core/res/AndroidManifest.xml
|
||||
@@ -1654,6 +1654,13 @@
|
||||
android:description="@string/permdesc_getPackageSize"
|
||||
android:protectionLevel="normal" />
|
||||
|
||||
+ <!-- @hide Allows an application to change the package signature as
|
||||
+ seen by applications -->
|
||||
+ <permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
|
||||
+ android:protectionLevel="dangerous"
|
||||
+ android:label="@string/permlab_fakePackageSignature"
|
||||
+ android:description="@string/permdesc_fakePackageSignature" />
|
||||
+
|
||||
<!-- @deprecated No longer useful, see
|
||||
{@link android.content.pm.PackageManager#addPackageToPreferred}
|
||||
for details. -->
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index c7846cf..916d8a5 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -1298,6 +1298,8 @@
|
||||
<string-array name="config_locationProviderPackageNames" translatable="false">
|
||||
<!-- The standard AOSP fused location provider -->
|
||||
<item>com.android.location.fused</item>
|
||||
+ <!-- The (faked) microg fused location provider -->
|
||||
+ <item>com.google.android.gms</item>
|
||||
</string-array>
|
||||
|
||||
<!-- This string array can be overriden to enable test location providers initially. -->
|
||||
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
||||
index 58135db..e65367a 100644
|
||||
--- a/core/res/res/values/strings.xml
|
||||
+++ b/core/res/res/values/strings.xml
|
||||
@@ -616,6 +616,11 @@
|
||||
<!-- Permissions -->
|
||||
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
+ <string name="permlab_fakePackageSignature">Spoof package signature</string>
|
||||
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
+ <string name="permdesc_fakePackageSignature">Allows the app to pretend to be a different app. Malicious applications might be able to use this to access private application data. Grant this permission with caution only!</string>
|
||||
+
|
||||
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permlab_statusBar">disable or modify status bar</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permdesc_statusBar">Allows the app to disable the status bar or add and remove system icons.</string>
|
||||
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
index 0493180..35f49d7 100644
|
||||
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
@@ -2816,8 +2816,27 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
final Set<String> permissions = permissionsState.getPermissions(userId);
|
||||
final PackageUserState state = ps.readUserState(userId);
|
||||
|
||||
- return PackageParser.generatePackageInfo(p, gids, flags,
|
||||
- ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId);
|
||||
+ return mayFakeSignature(p, PackageParser.generatePackageInfo(p, gids, flags,
|
||||
+ ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId),
|
||||
+ permissions);
|
||||
+ }
|
||||
+
|
||||
+ private PackageInfo mayFakeSignature(PackageParser.Package p, PackageInfo pi,
|
||||
+ Set<String> permissions) {
|
||||
+ try {
|
||||
+ if (permissions.contains("android.permission.FAKE_PACKAGE_SIGNATURE")
|
||||
+ && p.applicationInfo.targetSdkVersion > Build.VERSION_CODES.LOLLIPOP_MR1
|
||||
+ && p.mAppMetaData != null) {
|
||||
+ String sig = p.mAppMetaData.getString("fake-signature");
|
||||
+ if (sig != null) {
|
||||
+ pi.signatures = new Signature[] {new Signature(sig)};
|
||||
+ }
|
||||
+ }
|
||||
+ } catch (Throwable t) {
|
||||
+ // We should never die because of any failures, this is system code!
|
||||
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
|
||||
+ }
|
||||
+ return pi;
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.8.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,535 +0,0 @@
|
||||
From 7af4441cada12ddb125c2b747eab897729b62961 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 13 Oct 2016 19:10:14 -0400
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: Idc9e1bd67d81ffbf62fc5cb8680828603f94c886
|
||||
---
|
||||
Android.mk | 2 -
|
||||
.../cyanogenmod/audiofx/AudioFxApplication.java | 11 --
|
||||
.../audiofx/activity/ActivityMusic.java | 13 --
|
||||
.../audiofx/activity/EqualizerManager.java | 13 --
|
||||
.../audiofx/fragment/AudioFxFragment.java | 2 -
|
||||
.../audiofx/fragment/ControlsFragment.java | 4 -
|
||||
.../audiofx/fragment/EqualizerFragment.java | 4 -
|
||||
src/org/cyanogenmod/audiofx/knobs/RadialKnob.java | 3 -
|
||||
src/org/cyanogenmod/audiofx/stats/AppState.java | 53 -----
|
||||
src/org/cyanogenmod/audiofx/stats/UserSession.java | 215 ---------------------
|
||||
10 files changed, 320 deletions(-)
|
||||
delete mode 100644 src/org/cyanogenmod/audiofx/stats/AppState.java
|
||||
delete mode 100644 src/org/cyanogenmod/audiofx/stats/UserSession.java
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index e2553d0..d9a1b99 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -20,9 +20,7 @@ LOCAL_PROGUARD_ENABLED := disabled
|
||||
|
||||
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, res)
|
||||
LOCAL_AAPT_FLAGS := --auto-add-overlay
|
||||
-LOCAL_AAPT_FLAGS += --extra-packages com.cyanogen.ambient
|
||||
|
||||
-LOCAL_STATIC_JAVA_AAR_LIBRARIES := ambientsdk
|
||||
|
||||
LOCAL_PRIVILEGED_MODULE := true
|
||||
LOCAL_CERTIFICATE := platform
|
||||
diff --git a/src/org/cyanogenmod/audiofx/AudioFxApplication.java b/src/org/cyanogenmod/audiofx/AudioFxApplication.java
|
||||
index 9f08a0c..54819fe 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/AudioFxApplication.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/AudioFxApplication.java
|
||||
@@ -18,30 +18,19 @@ package org.cyanogenmod.audiofx;
|
||||
import android.app.Application;
|
||||
import android.util.Log;
|
||||
|
||||
-import com.cyanogen.ambient.analytics.AnalyticsServices;
|
||||
-import com.cyanogen.ambient.analytics.Event;
|
||||
-import com.cyanogen.ambient.common.api.AmbientApiClient;
|
||||
-
|
||||
public class AudioFxApplication extends Application {
|
||||
|
||||
private static final String TAG = AudioFxApplication.class.getSimpleName();
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
- private AmbientApiClient mClient;
|
||||
-
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
- mClient = new AmbientApiClient.Builder(this)
|
||||
- .addApi(AnalyticsServices.API)
|
||||
- .build();
|
||||
- mClient.connect();
|
||||
}
|
||||
|
||||
public void sendEvent(Event event) {
|
||||
if (DEBUG) {
|
||||
Log.i(TAG, "sendEvent() called with event = [" + event + "]");
|
||||
}
|
||||
- AnalyticsServices.AnalyticsApi.sendEvent(mClient, event);
|
||||
}
|
||||
}
|
||||
diff --git a/src/org/cyanogenmod/audiofx/activity/ActivityMusic.java b/src/org/cyanogenmod/audiofx/activity/ActivityMusic.java
|
||||
index 411ba45..54ede87 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/activity/ActivityMusic.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/activity/ActivityMusic.java
|
||||
@@ -28,7 +28,6 @@ import android.view.View;
|
||||
import android.view.ViewStub;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
-import com.cyanogen.ambient.analytics.Event;
|
||||
import org.cyanogenmod.audiofx.AudioFxApplication;
|
||||
import org.cyanogenmod.audiofx.Constants;
|
||||
import org.cyanogenmod.audiofx.R;
|
||||
@@ -36,8 +35,6 @@ import org.cyanogenmod.audiofx.fragment.AudioFxFragment;
|
||||
import org.cyanogenmod.audiofx.knobs.KnobCommander;
|
||||
import org.cyanogenmod.audiofx.service.AudioFxService;
|
||||
import org.cyanogenmod.audiofx.service.DevicePreferenceManager;
|
||||
-import org.cyanogenmod.audiofx.stats.AppState;
|
||||
-import org.cyanogenmod.audiofx.stats.UserSession;
|
||||
|
||||
public class ActivityMusic extends Activity {
|
||||
|
||||
@@ -59,9 +56,6 @@ public class ActivityMusic extends Activity {
|
||||
@Override
|
||||
public void onCheckedChanged(final CompoundButton buttonView,
|
||||
final boolean isChecked) {
|
||||
- if (UserSession.getInstance() != null) {
|
||||
- UserSession.getInstance().deviceEnabledDisabled();
|
||||
- }
|
||||
mConfig.setCurrentDeviceEnabled(isChecked);
|
||||
}
|
||||
};
|
||||
@@ -174,20 +168,13 @@ public class ActivityMusic extends Activity {
|
||||
if (DEBUG) Log.i(TAG, "onResume() called with " + "");
|
||||
super.onResume();
|
||||
|
||||
- // initiate a new session
|
||||
- new UserSession(mCallingPackage);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
- if (DEBUG) Log.d(TAG, "Session: " + UserSession.getInstance());
|
||||
|
||||
- final Event.Builder builder = new Event.Builder("session", "ended");
|
||||
- UserSession.getInstance().append(builder);
|
||||
- AppState.appendState(mConfig, KnobCommander.getInstance(this), builder);
|
||||
- ((AudioFxApplication) getApplicationContext()).sendEvent(builder.build());
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/org/cyanogenmod/audiofx/activity/EqualizerManager.java b/src/org/cyanogenmod/audiofx/activity/EqualizerManager.java
|
||||
index a9e0a6d..0fc928f 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/activity/EqualizerManager.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/activity/EqualizerManager.java
|
||||
@@ -26,7 +26,6 @@ import org.cyanogenmod.audiofx.Preset;
|
||||
import org.cyanogenmod.audiofx.R;
|
||||
import org.cyanogenmod.audiofx.eq.EqUtils;
|
||||
import org.cyanogenmod.audiofx.service.AudioFxService;
|
||||
-import org.cyanogenmod.audiofx.stats.UserSession;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -274,10 +273,6 @@ public class EqualizerManager {
|
||||
* @return the index that the levels were copied to
|
||||
*/
|
||||
private int addPreset(float[] levels) {
|
||||
- if (UserSession.getInstance() != null) {
|
||||
- UserSession.getInstance().presetCreated();
|
||||
- }
|
||||
-
|
||||
final int customPresets = Constants.getCustomPresets(mContext, mNumBands).size();
|
||||
// format the name so it's like "Custom <N>", start with "Custom 2"
|
||||
final String name = String.format(mContext.getString(R.string.custom_n), customPresets + 2);
|
||||
@@ -588,10 +583,6 @@ public class EqualizerManager {
|
||||
}
|
||||
|
||||
public void renameCurrentPreset(String s) {
|
||||
- if (UserSession.getInstance() != null) {
|
||||
- UserSession.getInstance().presetRenamed();
|
||||
- }
|
||||
-
|
||||
if (isUserPreset()) {
|
||||
((Preset.CustomPreset) getCurrentPreset()).setName(s);
|
||||
}
|
||||
@@ -602,10 +593,6 @@ public class EqualizerManager {
|
||||
}
|
||||
|
||||
public boolean removePreset(int index) {
|
||||
- if (UserSession.getInstance() != null) {
|
||||
- UserSession.getInstance().presetRemoved();
|
||||
- }
|
||||
-
|
||||
if (index > mEQCustomPresetPosition) {
|
||||
mEqPresets.remove(index);
|
||||
mConfig.getCallbacks().notifyPresetsChanged();
|
||||
diff --git a/src/org/cyanogenmod/audiofx/fragment/AudioFxFragment.java b/src/org/cyanogenmod/audiofx/fragment/AudioFxFragment.java
|
||||
index 582e3d6..89e4b91 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/fragment/AudioFxFragment.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/fragment/AudioFxFragment.java
|
||||
@@ -45,7 +45,6 @@ import org.cyanogenmod.audiofx.activity.ActivityMusic;
|
||||
import org.cyanogenmod.audiofx.activity.EqualizerManager;
|
||||
import org.cyanogenmod.audiofx.activity.MasterConfigControl;
|
||||
import org.cyanogenmod.audiofx.activity.StateCallbacks;
|
||||
-import org.cyanogenmod.audiofx.stats.UserSession;
|
||||
import org.cyanogenmod.audiofx.widget.InterceptableLinearLayout;
|
||||
|
||||
import java.util.List;
|
||||
@@ -337,7 +336,6 @@ public class AudioFxFragment extends Fragment implements StateCallbacks.DeviceCh
|
||||
AudioDeviceInfo device = mMenuItems.get(item);
|
||||
|
||||
if (device != null) {
|
||||
- UserSession.getInstance().deviceChanged();
|
||||
mDeviceChanging = true;
|
||||
if (item.isCheckable()) {
|
||||
item.setChecked(!item.isChecked());
|
||||
diff --git a/src/org/cyanogenmod/audiofx/fragment/ControlsFragment.java b/src/org/cyanogenmod/audiofx/fragment/ControlsFragment.java
|
||||
index 4a0eed6..9c9f5eb 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/fragment/ControlsFragment.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/fragment/ControlsFragment.java
|
||||
@@ -29,7 +29,6 @@ import org.cyanogenmod.audiofx.R;
|
||||
import org.cyanogenmod.audiofx.activity.MasterConfigControl;
|
||||
import org.cyanogenmod.audiofx.knobs.KnobCommander;
|
||||
import org.cyanogenmod.audiofx.knobs.KnobContainer;
|
||||
-import org.cyanogenmod.audiofx.stats.UserSession;
|
||||
|
||||
public class ControlsFragment extends AudioFxBaseFragment {
|
||||
|
||||
@@ -44,9 +43,6 @@ public class ControlsFragment extends AudioFxBaseFragment {
|
||||
= new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
- if (mConfig.getMaxxVolumeEnabled() != isChecked) {
|
||||
- UserSession.getInstance().maxxVolumeToggled();
|
||||
- }
|
||||
mConfig.setMaxxVolumeEnabled(isChecked);
|
||||
}
|
||||
};
|
||||
diff --git a/src/org/cyanogenmod/audiofx/fragment/EqualizerFragment.java b/src/org/cyanogenmod/audiofx/fragment/EqualizerFragment.java
|
||||
index 0f95365..7b459cf 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/fragment/EqualizerFragment.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/fragment/EqualizerFragment.java
|
||||
@@ -46,7 +46,6 @@ import org.cyanogenmod.audiofx.eq.EqContainerView;
|
||||
import org.cyanogenmod.audiofx.preset.InfinitePagerAdapter;
|
||||
import org.cyanogenmod.audiofx.preset.InfiniteViewPager;
|
||||
import org.cyanogenmod.audiofx.preset.PresetPagerAdapter;
|
||||
-import org.cyanogenmod.audiofx.stats.UserSession;
|
||||
import org.cyanogenmod.audiofx.viewpagerindicator.CirclePageIndicator;
|
||||
|
||||
public class EqualizerFragment extends AudioFxBaseFragment
|
||||
@@ -516,9 +515,6 @@ public class EqualizerFragment extends AudioFxBaseFragment
|
||||
mSelectedPosition = position;
|
||||
if (!mDeviceChanging) {
|
||||
mSelectedPositionBands = mEqManager.getPresetLevels(mSelectedPosition);
|
||||
- if (UserSession.getInstance() != null) {
|
||||
- UserSession.getInstance().presetSelected();
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/org/cyanogenmod/audiofx/knobs/RadialKnob.java b/src/org/cyanogenmod/audiofx/knobs/RadialKnob.java
|
||||
index 9f35835..b9bd045 100644
|
||||
--- a/src/org/cyanogenmod/audiofx/knobs/RadialKnob.java
|
||||
+++ b/src/org/cyanogenmod/audiofx/knobs/RadialKnob.java
|
||||
@@ -49,7 +49,6 @@ import android.view.View;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.widget.Toast;
|
||||
import org.cyanogenmod.audiofx.R;
|
||||
-import org.cyanogenmod.audiofx.stats.UserSession;
|
||||
|
||||
public class RadialKnob extends View {
|
||||
|
||||
@@ -456,8 +455,6 @@ public class RadialKnob extends View {
|
||||
}
|
||||
}
|
||||
if (mMoved) {
|
||||
- UserSession.getInstance()
|
||||
- .knobOptionsAdjusted(((KnobContainer.KnobInfo)getTag()).whichKnob);
|
||||
}
|
||||
mLastX = -1;
|
||||
mLastY = -1;
|
||||
diff --git a/src/org/cyanogenmod/audiofx/stats/AppState.java b/src/org/cyanogenmod/audiofx/stats/AppState.java
|
||||
deleted file mode 100644
|
||||
index 7ca0c9c..0000000
|
||||
--- a/src/org/cyanogenmod/audiofx/stats/AppState.java
|
||||
+++ /dev/null
|
||||
@@ -1,53 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2016 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-package org.cyanogenmod.audiofx.stats;
|
||||
-
|
||||
-import com.cyanogen.ambient.analytics.Event;
|
||||
-import org.cyanogenmod.audiofx.Preset;
|
||||
-import org.cyanogenmod.audiofx.activity.MasterConfigControl;
|
||||
-import org.cyanogenmod.audiofx.eq.EqUtils;
|
||||
-import org.cyanogenmod.audiofx.knobs.KnobCommander;
|
||||
-
|
||||
-public class AppState {
|
||||
- public static void appendState(MasterConfigControl control,
|
||||
- KnobCommander knobs, Event.Builder builder) {
|
||||
- // what's the current output device?
|
||||
- builder.addField("state_current_device", control.getCurrentDeviceIdentifier());
|
||||
-
|
||||
- // what preset? if custom, what name/values?
|
||||
- builder.addField("state_preset_name", control.getEqualizerManager().getCurrentPreset().getName());
|
||||
-
|
||||
- if (control.getEqualizerManager().getCurrentPreset() instanceof Preset.CustomPreset) {
|
||||
- builder.addField("state_custom_preset_values",
|
||||
- EqUtils.floatLevelsToString(control.getEqualizerManager().getCurrentPreset().getLevels()));
|
||||
- }
|
||||
-
|
||||
- // knob states
|
||||
- if (control.hasMaxxAudio()) {
|
||||
- builder.addField("state_maxx_volume", control.getMaxxVolumeEnabled());
|
||||
- }
|
||||
-
|
||||
- if (knobs.hasBassBoost()) {
|
||||
- builder.addField("state_knob_bass", knobs.getBassStrength());
|
||||
- }
|
||||
- if (knobs.hasTreble()) {
|
||||
- builder.addField("state_knob_treble", knobs.getTrebleStrength());
|
||||
- }
|
||||
- if (knobs.hasVirtualizer()) {
|
||||
- builder.addField("state_knob_virtualizer", knobs.getVirtualizerStrength());
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/org/cyanogenmod/audiofx/stats/UserSession.java b/src/org/cyanogenmod/audiofx/stats/UserSession.java
|
||||
deleted file mode 100644
|
||||
index 285edb3..0000000
|
||||
--- a/src/org/cyanogenmod/audiofx/stats/UserSession.java
|
||||
+++ /dev/null
|
||||
@@ -1,215 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2016 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-package org.cyanogenmod.audiofx.stats;
|
||||
-
|
||||
-import android.os.Parcel;
|
||||
-import android.os.Parcelable;
|
||||
-import com.cyanogen.ambient.analytics.Event;
|
||||
-import org.cyanogenmod.audiofx.Preset;
|
||||
-import org.cyanogenmod.audiofx.knobs.KnobCommander;
|
||||
-
|
||||
-public class UserSession implements Parcelable {
|
||||
-
|
||||
- private static final String SOURCE_NONE = "none";
|
||||
-
|
||||
- private static UserSession sSession;
|
||||
- public static final UserSession getInstance() {
|
||||
- return sSession;
|
||||
- }
|
||||
-
|
||||
- private String mSource;
|
||||
- private int mDevicesChanged;
|
||||
- private int mEnabledDisabledToggles;
|
||||
- private int mPresetsSelected;
|
||||
- private int mPresetsCreated;
|
||||
- private int mPresetsRemoved;
|
||||
- private int mPresetsRenamed;
|
||||
- private int mMaxxVolumeToggled;
|
||||
- private int mTrebleKnobAdjusted;
|
||||
- private int mBassKnobAdjusted;
|
||||
- private int mVirtualizerKnobAdjusted;
|
||||
-
|
||||
- public UserSession(String incomingPackageSource) {
|
||||
- if (incomingPackageSource == null) {
|
||||
- mSource = SOURCE_NONE;
|
||||
- } else {
|
||||
- mSource = incomingPackageSource;
|
||||
- }
|
||||
- sSession = this;
|
||||
- }
|
||||
-
|
||||
- public void deviceChanged() {
|
||||
- mDevicesChanged++;
|
||||
- }
|
||||
-
|
||||
- public void deviceEnabledDisabled() {
|
||||
- mEnabledDisabledToggles++;
|
||||
- }
|
||||
-
|
||||
- public void presetSelected() {
|
||||
- mPresetsSelected++;
|
||||
- }
|
||||
-
|
||||
- public void presetRemoved() {
|
||||
- mPresetsRemoved++;
|
||||
- }
|
||||
-
|
||||
- public void presetRenamed() {
|
||||
- mPresetsRenamed++;
|
||||
- }
|
||||
-
|
||||
- public void presetCreated() {
|
||||
- mPresetsCreated++;
|
||||
- }
|
||||
-
|
||||
- public void maxxVolumeToggled() {
|
||||
- mMaxxVolumeToggled++;
|
||||
- }
|
||||
-
|
||||
- public void knobOptionsAdjusted(int knob) {
|
||||
- switch (knob) {
|
||||
- case KnobCommander.KNOB_BASS:
|
||||
- mBassKnobAdjusted++;
|
||||
- break;
|
||||
- case KnobCommander.KNOB_TREBLE:
|
||||
- mTrebleKnobAdjusted++;
|
||||
- break;
|
||||
- case KnobCommander.KNOB_VIRTUALIZER:
|
||||
- mVirtualizerKnobAdjusted++;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public void append(Event.Builder builder) {
|
||||
- builder.addField("session_source", mSource);
|
||||
- if (mDevicesChanged > 0)
|
||||
- builder.addField("session_devices_changed_count", mDevicesChanged);
|
||||
- if (mEnabledDisabledToggles > 0)
|
||||
- builder.addField("session_devices_enabled_disabled_count", mEnabledDisabledToggles);
|
||||
- if (mPresetsSelected > 0)
|
||||
- builder.addField("session_presets_changed_count", mPresetsSelected);
|
||||
- if (mPresetsCreated > 0)
|
||||
- builder.addField("session_presets_created_count", mPresetsCreated);
|
||||
- if (mPresetsRemoved > 0)
|
||||
- builder.addField("session_presets_removed_count", mPresetsRemoved);
|
||||
- if (mPresetsRenamed > 0)
|
||||
- builder.addField("session_presets_renamed_count", mPresetsRenamed);
|
||||
- if (mMaxxVolumeToggled > 0)
|
||||
- builder.addField("session_maxx_volume_toggled", mMaxxVolumeToggled);
|
||||
- if (mBassKnobAdjusted > 0)
|
||||
- builder.addField("session_knobs_bass_adjusted_count", mBassKnobAdjusted);
|
||||
- if (mVirtualizerKnobAdjusted > 0)
|
||||
- builder.addField("session_knobs_virtualizer_adjusted_count", mVirtualizerKnobAdjusted);
|
||||
- if (mTrebleKnobAdjusted > 0)
|
||||
- builder.addField("session_knobs_treble_adjusted_count", mTrebleKnobAdjusted);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public String toString() {
|
||||
- StringBuilder s = new StringBuilder(getClass().getName() + "[");
|
||||
- if (mSource != null) {
|
||||
- s.append("mSource=").append(mSource).append(", ");
|
||||
- }
|
||||
- if (mDevicesChanged > 0) {
|
||||
- s.append("mDevicesChanged=").append(mDevicesChanged).append(", ");
|
||||
- }
|
||||
- if (mEnabledDisabledToggles > 0) {
|
||||
- s.append("mEnabledDisabledToggles=").append(mEnabledDisabledToggles).append(", ");
|
||||
- }
|
||||
- if (mPresetsSelected > 0) {
|
||||
- s.append("mPresetsSelected=").append(mPresetsSelected).append(", ");
|
||||
- }
|
||||
- if (mPresetsCreated > 0) {
|
||||
- s.append("mPresetsCreated=").append(mPresetsCreated).append(", ");
|
||||
- }
|
||||
- if (mPresetsRemoved > 0) {
|
||||
- s.append("mPresetsRemoved=").append(mPresetsRemoved).append(", ");
|
||||
- }
|
||||
- if (mPresetsRenamed > 0) {
|
||||
- s.append("mPresetsRenamed=").append(mPresetsRenamed).append(", ");
|
||||
- }
|
||||
- if (mMaxxVolumeToggled > 0) {
|
||||
- s.append("mMaxxVolumeToggled=").append(mMaxxVolumeToggled).append(", ");
|
||||
- }
|
||||
- if (mBassKnobAdjusted > 0) {
|
||||
- s.append("mBassKnobAdjusted=").append(mBassKnobAdjusted).append(", ");
|
||||
- }
|
||||
- if (mVirtualizerKnobAdjusted > 0) {
|
||||
- s.append("mVirtualizerKnobAdjusted=").append(mVirtualizerKnobAdjusted).append(", ");
|
||||
- }
|
||||
- if (mTrebleKnobAdjusted > 0) {
|
||||
- s.append("mTrebleKnobAdjusted=").append(mTrebleKnobAdjusted).append(", ");
|
||||
- }
|
||||
- if (s.charAt(s.length() - 2) == ',') {
|
||||
- s.delete(s.length() - 2, s.length());
|
||||
- }
|
||||
- s.append("]");
|
||||
-
|
||||
- return s.toString();
|
||||
- }
|
||||
-
|
||||
- public static final Creator<UserSession> CREATOR = new Creator<UserSession>() {
|
||||
- @Override
|
||||
- public UserSession createFromParcel(Parcel in) {
|
||||
- return new UserSession(in);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public UserSession[] newArray(int size) {
|
||||
- return new UserSession[size];
|
||||
- }
|
||||
- };
|
||||
-
|
||||
- @Override
|
||||
- public int describeContents() {
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- protected UserSession(Parcel in) {
|
||||
- mSource = in.readString();
|
||||
- mDevicesChanged = in.readInt();
|
||||
- mEnabledDisabledToggles = in.readInt();
|
||||
- mPresetsSelected = in.readInt();
|
||||
- mPresetsCreated = in.readInt();
|
||||
- mPresetsRemoved = in.readInt();
|
||||
- mPresetsRenamed = in.readInt();
|
||||
- mBassKnobAdjusted = in.readInt();
|
||||
- mVirtualizerKnobAdjusted = in.readInt();
|
||||
- mTrebleKnobAdjusted = in.readInt();
|
||||
- mMaxxVolumeToggled = in.readInt();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void writeToParcel(Parcel dest, int flags) {
|
||||
- dest.writeString(mSource);
|
||||
- dest.writeInt(mDevicesChanged);
|
||||
- dest.writeInt(mEnabledDisabledToggles);
|
||||
- dest.writeInt(mPresetsSelected);
|
||||
- dest.writeInt(mPresetsCreated);
|
||||
- dest.writeInt(mPresetsRemoved);
|
||||
- dest.writeInt(mPresetsRenamed);
|
||||
- dest.writeInt(mBassKnobAdjusted);
|
||||
- dest.writeInt(mVirtualizerKnobAdjusted);
|
||||
- dest.writeInt(mTrebleKnobAdjusted);
|
||||
- dest.writeInt(mMaxxVolumeToggled);
|
||||
- }
|
||||
-
|
||||
- private static class State {
|
||||
- private String mOutputDevice;
|
||||
- private Preset mPreset;
|
||||
- private String mKnobsOpts;
|
||||
- }
|
||||
-}
|
||||
--
|
||||
2.9.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
||||
From 66f4525e8f6603a9bceb2168a41ab1cdcea9c20e Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sun, 10 Jul 2016 15:19:45 -0400
|
||||
Subject: [PATCH] Fix build failure
|
||||
|
||||
Change-Id: If17279e2d537f3d7f1e5e5df6ed5c444b3449719
|
||||
---
|
||||
src/com/android/incallui/AnswerPresenter.java | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/com/android/incallui/AnswerPresenter.java b/src/com/android/incallui/AnswerPresenter.java
|
||||
index b0619b1..31a824e 100644
|
||||
--- a/src/com/android/incallui/AnswerPresenter.java
|
||||
+++ b/src/com/android/incallui/AnswerPresenter.java
|
||||
@@ -127,6 +127,18 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
|
||||
|
||||
public void notifyRefreshViceInfo(QtiViceInfo qtiViceInfo) {
|
||||
}
|
||||
+public void receiveCallTransferResponse(int result) {
|
||||
+
|
||||
+}
|
||||
+
|
||||
+public void notifyVopsStatus(boolean result) {
|
||||
+
|
||||
+}
|
||||
+
|
||||
+public void notifySsacStatus(boolean result) {
|
||||
+
|
||||
+}
|
||||
+
|
||||
};
|
||||
|
||||
/**
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,604 +0,0 @@
|
||||
From b2252cf1a4b22d60dae76300415ad5bbc6cd0a89 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Brabham <optedoblivion@cyngn.com>
|
||||
Date: Fri, 9 Jan 2015 14:49:10 -0800
|
||||
Subject: [PATCH] DNSCrypt: Add settings for starting/stopping and configuring
|
||||
the DNSCrypt daemon.
|
||||
|
||||
Wire up to framework Settings.Secure
|
||||
|
||||
Change-Id: I846e30f7121460b1eed9879d9d225ffe1506050b
|
||||
---
|
||||
AndroidManifest.xml | 10 ++
|
||||
res/values/cm_strings.xml | 11 ++
|
||||
res/xml/dns_crypt_settings.xml | 38 +++++
|
||||
res/xml/privacy_settings_cyanogenmod.xml | 10 ++
|
||||
.../dnscrypt/DnsCryptPreferenceActivity.java | 149 ++++++++++++++++++++
|
||||
.../settings/dnscrypt/LoadConfigFileTask.java | 152 ++++++++++++++++++++
|
||||
.../dnscrypt/model/DnsCryptServerEntry.java | 155 +++++++++++++++++++++
|
||||
7 files changed, 525 insertions(+)
|
||||
create mode 100644 res/xml/dns_crypt_settings.xml
|
||||
create mode 100644 src/com/android/settings/dnscrypt/DnsCryptPreferenceActivity.java
|
||||
create mode 100644 src/com/android/settings/dnscrypt/LoadConfigFileTask.java
|
||||
create mode 100644 src/com/android/settings/dnscrypt/model/DnsCryptServerEntry.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index f38e0bc..ed95f32 100755
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -2868,6 +2868,16 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
+ <activity
|
||||
+ android:name=".dnscrypt.DnsCryptPreferenceActivity"
|
||||
+ android:label="DNS Encryption"
|
||||
+ android:excludeFromRecents="true">
|
||||
+ <intent-filter>
|
||||
+ <action android:name="com.android.settings.action.ACTION_DNSCRYPT_SETTINGS" />
|
||||
+ <category android:name="android.intent.category.DEFAULT" />
|
||||
+ </intent-filter>
|
||||
+ </activity>
|
||||
+
|
||||
<activity android:name=".applications.ProtectedAppsActivity"
|
||||
android:label="@string/protected_apps"
|
||||
android:excludeFromRecents="true"
|
||||
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||
index 6b42f4e..51aff3c 100644
|
||||
--- a/res/values/cm_strings.xml
|
||||
+++ b/res/values/cm_strings.xml
|
||||
@@ -1163,4 +1163,15 @@
|
||||
<string name="restrict_app_cellular_title">Disable app cellular usage</string>
|
||||
<string name="restrict_app_cellular_summary">Prevent app from using cellular data connection</string>
|
||||
<string name="privacy_guard_internet_category">Internet</string>
|
||||
+
|
||||
+ <!-- DNS Encryption -->
|
||||
+ <string name="dns_enc_title">DNS encryption</string>
|
||||
+ <string name="dns_enc_summary">Manage DNS encryption settings</string>
|
||||
+ <string name="dns_enc_switch_title">Enable DNS encryption</string>
|
||||
+ <string name="dns_enc_switch_summary">Toggle execution of local DNS encryption service</string>
|
||||
+ <string name="dns_enc_cat_config_title">Configuration</string>
|
||||
+ <string name="dns_enc_server_title">DNS resolver list</string>
|
||||
+ <string name="dns_enc_server_summary">Select which server you want to use</string>
|
||||
+ <string name="dns_enc_resolver_label">DNS resolver: </string>
|
||||
+ <string name="dns_enc_resolvers_loading">Loading encrypted DNS resolver configuration...</string>
|
||||
</resources>
|
||||
diff --git a/res/xml/dns_crypt_settings.xml b/res/xml/dns_crypt_settings.xml
|
||||
new file mode 100644
|
||||
index 0000000..636f754
|
||||
--- /dev/null
|
||||
+++ b/res/xml/dns_crypt_settings.xml
|
||||
@@ -0,0 +1,38 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright (C) 2008 The Android Open Source Project
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+-->
|
||||
+
|
||||
+<PreferenceScreen
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
+ android:title="@string/radio_controls_title">
|
||||
+
|
||||
+ <SwitchPreference
|
||||
+ android:key="pref_toggle_dnscrypt"
|
||||
+ android:title="@string/dns_enc_switch_title"
|
||||
+ android:summary="@string/dns_enc_switch_summary"
|
||||
+ android:persistent="false"/>
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:key="pref_cat_config"
|
||||
+ android:title="@string/dns_enc_cat_config_title">
|
||||
+ <ListPreference
|
||||
+ android:key="pref_server_list"
|
||||
+ android:title="@string/dns_enc_server_title"
|
||||
+ android:summary="@string/dns_enc_server_summary"
|
||||
+ android:persistent="false"/>
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+</PreferenceScreen>
|
||||
diff --git a/res/xml/privacy_settings_cyanogenmod.xml b/res/xml/privacy_settings_cyanogenmod.xml
|
||||
index 256ca00..25221c2 100644
|
||||
--- a/res/xml/privacy_settings_cyanogenmod.xml
|
||||
+++ b/res/xml/privacy_settings_cyanogenmod.xml
|
||||
@@ -47,4 +47,14 @@
|
||||
android:targetPackage="com.android.settings"
|
||||
android:targetClass="com.android.settings.applications.ProtectedAppsActivity" />
|
||||
</Preference>
|
||||
+
|
||||
+ <PreferenceScreen
|
||||
+ android:key="key_dns_crypt"
|
||||
+ android:title="@string/dns_enc_title"
|
||||
+ android:summary="@string/dns_enc_summary">
|
||||
+ <intent
|
||||
+ android:action="com.android.settings.action.ACTION_DNSCRYPT_SETTINGS"
|
||||
+ android:targetPackage="com.android.settings"
|
||||
+ android:targetClass="com.android.settings.dnscrypt.DnsCryptPreferenceActivity" />
|
||||
+ </PreferenceScreen>
|
||||
</PreferenceScreen>
|
||||
diff --git a/src/com/android/settings/dnscrypt/DnsCryptPreferenceActivity.java b/src/com/android/settings/dnscrypt/DnsCryptPreferenceActivity.java
|
||||
new file mode 100644
|
||||
index 0000000..64f13c7
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/dnscrypt/DnsCryptPreferenceActivity.java
|
||||
@@ -0,0 +1,149 @@
|
||||
+/*
|
||||
+* Copyright (C) 2014 The CyanogenMod Project
|
||||
+*
|
||||
+* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+* you may not use this file except in compliance with the License.
|
||||
+* You may obtain a copy of the License at
|
||||
+*
|
||||
+* http://www.apache.org/licenses/LICENSE-2.0
|
||||
+*
|
||||
+* Unless required by applicable law or agreed to in writing, software
|
||||
+* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+* See the License for the specific language governing permissions and
|
||||
+* limitations under the License.
|
||||
+*/
|
||||
+
|
||||
+package com.android.settings.dnscrypt;
|
||||
+
|
||||
+import android.app.ProgressDialog;
|
||||
+import android.os.Bundle;
|
||||
+import android.preference.ListPreference;
|
||||
+import android.preference.Preference;
|
||||
+import android.preference.Preference.OnPreferenceChangeListener;
|
||||
+import android.preference.PreferenceActivity;
|
||||
+import android.preference.SwitchPreference;
|
||||
+import android.provider.Settings;
|
||||
+import android.util.Log;
|
||||
+import com.android.settings.R;
|
||||
+import com.android.settings.dnscrypt.LoadConfigFileTask.ILoadConfigListener;
|
||||
+
|
||||
+import java.io.File;
|
||||
+
|
||||
+/**
|
||||
+ * DnsCryptSettingsFragment
|
||||
+ * <pre>
|
||||
+ * Screen for configuring and starting stopping encrypted dns daemon
|
||||
+ * </pre>
|
||||
+ *
|
||||
+ * @see {@link android.preference.PreferenceActivity}
|
||||
+ * @see {@link android.preference.Preference.OnPreferenceChangeListener}
|
||||
+ */
|
||||
+public class DnsCryptPreferenceActivity extends PreferenceActivity implements
|
||||
+ OnPreferenceChangeListener, ILoadConfigListener {
|
||||
+
|
||||
+ // Constants
|
||||
+ private static final String TAG = DnsCryptPreferenceActivity.class.getSimpleName();
|
||||
+ private static final String PREF_TOGGLE = "pref_toggle_dnscrypt";
|
||||
+ private static final String PREF_SERVER_LIST = "pref_server_list";
|
||||
+ private static final String CONFIG_FILE = "/system/etc/dnscrypt-resolvers.csv";
|
||||
+
|
||||
+ // Members
|
||||
+ private SwitchPreference mEncryptionSwitchPreference;
|
||||
+ private ListPreference mServerListPreference;
|
||||
+ private LoadConfigFileTask mLoadConfigFileTask;
|
||||
+ private String mDnsResolverLabel = "DNS provider";
|
||||
+
|
||||
+ // Views
|
||||
+ private ProgressDialog mProgressDialog;
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreate(Bundle savedInstanceState) {
|
||||
+ super.onCreate(savedInstanceState);
|
||||
+ getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
+ getActionBar().setTitle(R.string.dns_enc_title);
|
||||
+ addPreferencesFromResource(R.xml.dns_crypt_settings);
|
||||
+ mEncryptionSwitchPreference = (SwitchPreference) findPreference(PREF_TOGGLE);
|
||||
+ mEncryptionSwitchPreference.setOnPreferenceChangeListener(this);
|
||||
+ mServerListPreference = (ListPreference) findPreference(PREF_SERVER_LIST);
|
||||
+ mServerListPreference.setOnPreferenceChangeListener(this);
|
||||
+ mDnsResolverLabel = getResources().getString(R.string.dns_enc_resolver_label);
|
||||
+ mProgressDialog = new ProgressDialog(this);
|
||||
+ mProgressDialog.setTitle(R.string.dns_enc_resolvers_loading);
|
||||
+ mProgressDialog.show();
|
||||
+ if (mLoadConfigFileTask == null) {
|
||||
+ mLoadConfigFileTask =
|
||||
+ new LoadConfigFileTask(new File(CONFIG_FILE), mProgressDialog, this);
|
||||
+ mLoadConfigFileTask.execute();
|
||||
+ }
|
||||
+ initPreferences();
|
||||
+ }
|
||||
+
|
||||
+ private void initPreferences() {
|
||||
+ boolean currentCheckedState = (Settings.Secure.getInt(getContentResolver(),
|
||||
+ Settings.Secure.DNS_ENCRYPTION_TOGGLE,
|
||||
+ Settings.Secure.DNS_ENCRYPTION_TOGGLE_DEFAULT) == 1);
|
||||
+ if (mEncryptionSwitchPreference != null) {
|
||||
+ mEncryptionSwitchPreference.setChecked(currentCheckedState);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean onPreferenceChange(Preference preference, Object o) {
|
||||
+ if (preference == mEncryptionSwitchPreference) {
|
||||
+ Boolean newCheckedState = (Boolean) o;
|
||||
+ mServerListPreference.setEnabled(newCheckedState);
|
||||
+ int setValue = (newCheckedState) ? 1 : 0;
|
||||
+ Settings.Secure.putInt(getContentResolver(), Settings.Secure.DNS_ENCRYPTION_TOGGLE,
|
||||
+ setValue);
|
||||
+ return true;
|
||||
+ } else if (preference == mServerListPreference) {
|
||||
+ String value = (String) o;
|
||||
+ int i;
|
||||
+ for (i = 0; i < mServerListPreference.getEntryValues().length; i++) {
|
||||
+ if (value.equals(mServerListPreference.getEntryValues()[i])) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ try {
|
||||
+ mServerListPreference.setSummary(mDnsResolverLabel +
|
||||
+ mServerListPreference.getEntries()[i]);
|
||||
+ } catch (ArrayIndexOutOfBoundsException oobe) {
|
||||
+ Log.e(TAG, "Error finding default value!");
|
||||
+ mServerListPreference.setSummary(R.string.dns_enc_server_summary);
|
||||
+ }
|
||||
+ Settings.Secure.putString(getContentResolver(), Settings.Secure
|
||||
+ .DNS_ENCRYPTION_SERVER, value);
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onConfigLoaded(CharSequence[] entries, CharSequence[] entryValues) {
|
||||
+ if (mServerListPreference != null && entries != null && entryValues != null) {
|
||||
+ mServerListPreference.setEntries(entries);
|
||||
+ mServerListPreference.setEntryValues(entryValues);
|
||||
+ String value = Settings.Secure.getString(getContentResolver(),
|
||||
+ Settings.Secure.DNS_ENCRYPTION_SERVER);
|
||||
+ value = (value == null) ? Settings.Secure.DNS_ENCRYPTION_SERVER_DEFAULT : value;
|
||||
+ mServerListPreference.setValue(value);
|
||||
+ int i;
|
||||
+ for (i = 0; i < mServerListPreference.getEntryValues().length; i++) {
|
||||
+ if (value.equals(mServerListPreference.getEntryValues()[i])) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ try {
|
||||
+ mServerListPreference.setSummary(mDnsResolverLabel
|
||||
+ + mServerListPreference.getEntries()[i]);
|
||||
+ } catch (ArrayIndexOutOfBoundsException oobe) {
|
||||
+ Log.e(TAG, "Error finding default value!", oobe);
|
||||
+ mServerListPreference.setSummary(R.string.dns_enc_server_summary);
|
||||
+ }
|
||||
+ mServerListPreference.setEnabled(mEncryptionSwitchPreference.isChecked());
|
||||
+ }
|
||||
+ mLoadConfigFileTask = null;
|
||||
+ mProgressDialog.dismiss();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/com/android/settings/dnscrypt/LoadConfigFileTask.java b/src/com/android/settings/dnscrypt/LoadConfigFileTask.java
|
||||
new file mode 100644
|
||||
index 0000000..910e6c1
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/dnscrypt/LoadConfigFileTask.java
|
||||
@@ -0,0 +1,152 @@
|
||||
+/*
|
||||
+* Copyright (C) 2014 The CyanogenMod Project
|
||||
+*
|
||||
+* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+* you may not use this file except in compliance with the License.
|
||||
+* You may obtain a copy of the License at
|
||||
+*
|
||||
+* http://www.apache.org/licenses/LICENSE-2.0
|
||||
+*
|
||||
+* Unless required by applicable law or agreed to in writing, software
|
||||
+* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+* See the License for the specific language governing permissions and
|
||||
+* limitations under the License.
|
||||
+*/
|
||||
+
|
||||
+package com.android.settings.dnscrypt;
|
||||
+
|
||||
+import android.app.ProgressDialog;
|
||||
+import android.os.AsyncTask;
|
||||
+import android.util.Log;
|
||||
+
|
||||
+import java.io.BufferedReader;
|
||||
+import java.io.File;
|
||||
+import java.io.FileInputStream;
|
||||
+import java.io.IOException;
|
||||
+import java.io.InputStreamReader;
|
||||
+import java.util.ArrayList;
|
||||
+import java.util.List;
|
||||
+
|
||||
+/**
|
||||
+ * LoadConfigFileTask
|
||||
+ * <pre>
|
||||
+ * This task will check if the config file exists in /system/etc and if so will load it for
|
||||
+ * configuration display in Settings
|
||||
+ * </pre>
|
||||
+ */
|
||||
+public class LoadConfigFileTask extends AsyncTask<Void, Integer, Void> {
|
||||
+
|
||||
+ // Constants
|
||||
+ private static final String TAG = LoadConfigFileTask.class.getSimpleName();
|
||||
+
|
||||
+ // Members
|
||||
+ private ILoadConfigListener mListener;
|
||||
+ private File mConfigFile;
|
||||
+ private ProgressDialog mProgressDialog;
|
||||
+ private CharSequence[] mEntries;
|
||||
+ private CharSequence[] mEntryValues;
|
||||
+
|
||||
+ /**
|
||||
+ * Constructor
|
||||
+ *
|
||||
+ * @param configFile {@link java.io.File}
|
||||
+ * @param progressDialog {@link android.app.ProgressDialog}
|
||||
+ * @throws IllegalArgumentException {@link java.lang.IllegalArgumentException}
|
||||
+ */
|
||||
+ public LoadConfigFileTask(File configFile, ProgressDialog progressDialog, ILoadConfigListener
|
||||
+ listener)
|
||||
+ throws IllegalArgumentException {
|
||||
+ if (configFile == null || !configFile.exists()) {
|
||||
+ throw new IllegalArgumentException("'configFile' must not be null and must exist!");
|
||||
+ }
|
||||
+ mConfigFile = configFile;
|
||||
+ mProgressDialog = progressDialog;
|
||||
+ mListener = listener;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onPreExecute() {
|
||||
+ if (mProgressDialog != null) {
|
||||
+ mProgressDialog.show();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onProgressUpdate(Integer... progress) {
|
||||
+ if (mProgressDialog != null) {
|
||||
+ mProgressDialog.setProgress(progress[0]);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Void doInBackground(Void... params) {
|
||||
+
|
||||
+ if (mConfigFile == null || !mConfigFile.exists()) {
|
||||
+ Log.w(TAG, "No config file found....such strange!");
|
||||
+ // [TODO][MSB]: Download that sucker!
|
||||
+ // [TODO][MSB]: Perform sig check?
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
+ FileInputStream fis = new FileInputStream(mConfigFile);
|
||||
+ InputStreamReader reader = new InputStreamReader(fis);
|
||||
+ BufferedReader bufferedReader = new BufferedReader(reader);
|
||||
+ List<String> configLines = new ArrayList<String>();
|
||||
+ String line = "";
|
||||
+ while((line = bufferedReader.readLine()) != null) {
|
||||
+ configLines.add(line);
|
||||
+ }
|
||||
+ mEntries = new CharSequence[configLines.size() - 1];
|
||||
+ mEntryValues = new CharSequence[configLines.size() - 1];
|
||||
+ if (mProgressDialog != null) {
|
||||
+ mProgressDialog.setMax(configLines.size());
|
||||
+ }
|
||||
+ boolean skippedTitle = false;
|
||||
+ int progress = 0;
|
||||
+ int i = 0;
|
||||
+ for (String configLine : configLines) {
|
||||
+ if (!skippedTitle) {
|
||||
+ skippedTitle = true;
|
||||
+ progress++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ String[] configParts = configLine.split(",");
|
||||
+ if (configParts.length > 3) {
|
||||
+ String name = configParts[0];
|
||||
+ String fullName = configParts[1];
|
||||
+ mEntries[i] = fullName;
|
||||
+ mEntryValues[i] = name;
|
||||
+ }
|
||||
+ i++;
|
||||
+ progress++;
|
||||
+ publishProgress(progress);
|
||||
+ }
|
||||
+ } catch (IOException e) {
|
||||
+ Log.e(TAG, e.getMessage());
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onPostExecute(Void result) {
|
||||
+ if (mListener != null) {
|
||||
+ mListener.onConfigLoaded(mEntries, mEntryValues);
|
||||
+ }
|
||||
+ if (mProgressDialog != null) {
|
||||
+ mProgressDialog.dismiss();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * ILoadConfigListener
|
||||
+ * <pre>
|
||||
+ * Callback interface for passing back results
|
||||
+ * </pre>
|
||||
+ */
|
||||
+ public interface ILoadConfigListener {
|
||||
+ public void onConfigLoaded(CharSequence[] entries, CharSequence[] entryValues);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/com/android/settings/dnscrypt/model/DnsCryptServerEntry.java b/src/com/android/settings/dnscrypt/model/DnsCryptServerEntry.java
|
||||
new file mode 100644
|
||||
index 0000000..c0f2c75
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/dnscrypt/model/DnsCryptServerEntry.java
|
||||
@@ -0,0 +1,155 @@
|
||||
+/*
|
||||
+* Copyright (C) 2014 The CyanogenMod Project
|
||||
+*
|
||||
+* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+* you may not use this file except in compliance with the License.
|
||||
+* You may obtain a copy of the License at
|
||||
+*
|
||||
+* http://www.apache.org/licenses/LICENSE-2.0
|
||||
+*
|
||||
+* Unless required by applicable law or agreed to in writing, software
|
||||
+* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+* See the License for the specific language governing permissions and
|
||||
+* limitations under the License.
|
||||
+*/
|
||||
+
|
||||
+package com.android.settings.dnscrypt.model;
|
||||
+
|
||||
+/**
|
||||
+ * DnsCryptServerEntry
|
||||
+ * <pre>
|
||||
+ * Model object for representing a dns crypt server entry
|
||||
+ * </pre>
|
||||
+ */
|
||||
+public class DnsCryptServerEntry {
|
||||
+
|
||||
+ // Members
|
||||
+ private String mName;
|
||||
+ private String mFullName;
|
||||
+ private String mDescription;
|
||||
+ private String mLocation;
|
||||
+ private String mCoords;
|
||||
+ private String mUrl;
|
||||
+ private String mVersion;
|
||||
+ private String mDnsSecValidation;
|
||||
+ private String mNoLogs;
|
||||
+ private String mNamecoin;
|
||||
+ private String mResolverAddress;
|
||||
+ private String mProviderName;
|
||||
+ private String mProviderPublicKey;
|
||||
+ private String mProviderPublicKeyTextRecord;
|
||||
+
|
||||
+ public String getName() {
|
||||
+ return mName;
|
||||
+ }
|
||||
+
|
||||
+ public void setName(String name) {
|
||||
+ mName = name;
|
||||
+ }
|
||||
+
|
||||
+ public String getFullName() {
|
||||
+ return mFullName;
|
||||
+ }
|
||||
+
|
||||
+ public void setFullName(String fullName) {
|
||||
+ mFullName = fullName;
|
||||
+ }
|
||||
+
|
||||
+ public String getDescription() {
|
||||
+ return mDescription;
|
||||
+ }
|
||||
+
|
||||
+ public void setDescription(String description) {
|
||||
+ mDescription = description;
|
||||
+ }
|
||||
+
|
||||
+ public String getLocation() {
|
||||
+ return mLocation;
|
||||
+ }
|
||||
+
|
||||
+ public void setLocation(String location) {
|
||||
+ mLocation = location;
|
||||
+ }
|
||||
+
|
||||
+ public String getCoords() {
|
||||
+ return mCoords;
|
||||
+ }
|
||||
+
|
||||
+ public void setCoords(String coords) {
|
||||
+ mCoords = coords;
|
||||
+ }
|
||||
+
|
||||
+ public String getUrl() {
|
||||
+ return mUrl;
|
||||
+ }
|
||||
+
|
||||
+ public void setUrl(String url) {
|
||||
+ mUrl = url;
|
||||
+ }
|
||||
+
|
||||
+ public String getVersion() {
|
||||
+ return mVersion;
|
||||
+ }
|
||||
+
|
||||
+ public void setVersion(String version) {
|
||||
+ mVersion = version;
|
||||
+ }
|
||||
+
|
||||
+ public String getDnsSecValidation() {
|
||||
+ return mDnsSecValidation;
|
||||
+ }
|
||||
+
|
||||
+ public void setDnsSecValidation(String dnsSecValidation) {
|
||||
+ mDnsSecValidation = dnsSecValidation;
|
||||
+ }
|
||||
+
|
||||
+ public String getNoLogs() {
|
||||
+ return mNoLogs;
|
||||
+ }
|
||||
+
|
||||
+ public void setNoLogs(String noLogs) {
|
||||
+ mNoLogs = noLogs;
|
||||
+ }
|
||||
+
|
||||
+ public String getNamecoin() {
|
||||
+ return mNamecoin;
|
||||
+ }
|
||||
+
|
||||
+ public void setNamecoin(String namecoin) {
|
||||
+ mNamecoin = namecoin;
|
||||
+ }
|
||||
+
|
||||
+ public String getResolverAddress() {
|
||||
+ return mResolverAddress;
|
||||
+ }
|
||||
+
|
||||
+ public void setResolverAddress(String resolverAddress) {
|
||||
+ mResolverAddress = resolverAddress;
|
||||
+ }
|
||||
+
|
||||
+ public String getProviderName() {
|
||||
+ return mProviderName;
|
||||
+ }
|
||||
+
|
||||
+ public void setProviderName(String providerName) {
|
||||
+ mProviderName = providerName;
|
||||
+ }
|
||||
+
|
||||
+ public String getProviderPublicKey() {
|
||||
+ return mProviderPublicKey;
|
||||
+ }
|
||||
+
|
||||
+ public void setProviderPublicKey(String providerPublicKey) {
|
||||
+ mProviderPublicKey = providerPublicKey;
|
||||
+ }
|
||||
+
|
||||
+ public String getProviderPublicKeyTextRecord() {
|
||||
+ return mProviderPublicKeyTextRecord;
|
||||
+ }
|
||||
+
|
||||
+ public void setProviderPublicKeyTextRecord(String providerPublicKeyTextRecord) {
|
||||
+ mProviderPublicKeyTextRecord = providerPublicKeyTextRecord;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,231 +0,0 @@
|
||||
From ef32dacb30b5c938d48ba294ff660b0cd5777dd6 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 18 Apr 2016 09:27:27 -0400
|
||||
Subject: [PATCH] Implement hostname Randomization
|
||||
|
||||
Change-Id: I00bfb9235979c2c80191cb0871716adaa3583e06
|
||||
---
|
||||
MAC_Rand.patch | 120 +++++++++++++++++++++++++
|
||||
res/values/cm_strings.xml | 4 +
|
||||
res/xml/wireless_settings.xml | 6 ++
|
||||
src/com/android/settings/WirelessSettings.java | 14 +++
|
||||
4 files changed, 144 insertions(+)
|
||||
create mode 100644 MAC_Rand.patch
|
||||
|
||||
diff --git a/MAC_Rand.patch b/MAC_Rand.patch
|
||||
new file mode 100644
|
||||
index 0000000..48ad1ec
|
||||
--- /dev/null
|
||||
+++ b/MAC_Rand.patch
|
||||
@@ -0,0 +1,120 @@
|
||||
+From e84a1e030313cbc2875c9d3ee1f016808d33dab3 Mon Sep 17 00:00:00 2001
|
||||
+From: Tad <tad@spotco.us>
|
||||
+Date: Mon, 18 Apr 2016 08:53:03 -0400
|
||||
+Subject: [PATCH] Implement MAC Randomization
|
||||
+
|
||||
+Change-Id: Id074d011eac7c33af267de4c1649670c32770cb5
|
||||
+---
|
||||
+ res/values/cm_strings.xml | 4 ++++
|
||||
+ res/xml/wireless_settings.xml | 6 ++++++
|
||||
+ src/com/android/settings/WirelessSettings.java | 24 +++++++++++++++++++++++-
|
||||
+ 3 files changed, 33 insertions(+), 1 deletion(-)
|
||||
+
|
||||
+diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||
+index 128660e..8aa4785 100644
|
||||
+--- a/res/values/cm_strings.xml
|
||||
++++ b/res/values/cm_strings.xml
|
||||
+@@ -1187,4 +1187,8 @@
|
||||
+
|
||||
+ <!-- Label for settings shortcut: carrier selection -->
|
||||
+ <string name="shortcut_carrier_title">Network operators</string>
|
||||
++
|
||||
++ <!-- randomize MAC addresses -->
|
||||
++ <string name="randomize_mac_title">Randomize MAC addresses</string>
|
||||
++ <string name="randomize_mac_summary">Assign random MAC addresses when network devices are enabled</string>
|
||||
+ </resources>
|
||||
+diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
|
||||
+index 8882003..4a2d5d0 100644
|
||||
+--- a/res/xml/wireless_settings.xml
|
||||
++++ b/res/xml/wireless_settings.xml
|
||||
+@@ -19,6 +19,12 @@
|
||||
+ android:title="@string/radio_controls_title">
|
||||
+
|
||||
+ <SwitchPreference
|
||||
++ android:key="randomize_mac"
|
||||
++ android:title="@string/randomize_mac_title"
|
||||
++ android:summary="@string/randomize_mac_summary"
|
||||
++ android:persistent="false" />
|
||||
++
|
||||
++ <SwitchPreference
|
||||
+ android:key="toggle_airplane"
|
||||
+ android:title="@string/airplane_mode"
|
||||
+ android:persistent="false"
|
||||
+diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
|
||||
+index 4a0c9e3..4432940 100644
|
||||
+--- a/src/com/android/settings/WirelessSettings.java
|
||||
++++ b/src/com/android/settings/WirelessSettings.java
|
||||
+@@ -37,6 +37,7 @@ import android.os.SystemProperties;
|
||||
+ import android.os.UserHandle;
|
||||
+ import android.os.UserManager;
|
||||
+ import android.preference.Preference;
|
||||
++import android.preference.Preference.OnPreferenceChangeListener;
|
||||
+ import android.preference.PreferenceCategory;
|
||||
+ import android.preference.PreferenceScreen;
|
||||
+ import android.preference.SwitchPreference;
|
||||
+@@ -58,9 +59,11 @@ import java.util.ArrayList;
|
||||
+ import java.util.Arrays;
|
||||
+ import java.util.List;
|
||||
+
|
||||
+-public class WirelessSettings extends SettingsPreferenceFragment implements Indexable {
|
||||
++public class WirelessSettings extends SettingsPreferenceFragment
|
||||
++ implements OnPreferenceChangeListener, Indexable {
|
||||
+ private static final String TAG = "WirelessSettings";
|
||||
+
|
||||
++ private static final String KEY_RANDOMIZE_MAC = "randomize_mac";
|
||||
+ private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane";
|
||||
+ private static final String KEY_NFC_CATEGORY_SETTINGS = "nfc_category_settings";
|
||||
+ private static final String KEY_TOGGLE_NFC = "toggle_nfc";
|
||||
+@@ -76,9 +79,12 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
+ private static final String KEY_WFC_SETTINGS = "wifi_calling_settings";
|
||||
+ private static final String KEY_NFC_PAYMENT_SETTINGS = "nfc_payment_settings";
|
||||
+
|
||||
++ private static final String RANDOMIZE_PERSIST_PROP = "persist.privacy.randomize_mac";
|
||||
++
|
||||
+ public static final String EXIT_ECM_RESULT = "exit_ecm_result";
|
||||
+ public static final int REQUEST_CODE_EXIT_ECM = 1;
|
||||
+
|
||||
++ private SwitchPreference mRandomizeMac;
|
||||
+ private AirplaneModeEnabler mAirplaneModeEnabler;
|
||||
+ private SwitchPreference mAirplaneModePreference;
|
||||
+ private NfcEnabler mNfcEnabler;
|
||||
+@@ -232,6 +238,8 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
+ final boolean isSecondaryUser = myUserId != UserHandle.USER_OWNER;
|
||||
+
|
||||
+ final Activity activity = getActivity();
|
||||
++ mRandomizeMac = (SwitchPreference) findPreference(KEY_RANDOMIZE_MAC);
|
||||
++ mRandomizeMac.setOnPreferenceChangeListener(this);
|
||||
+ mAirplaneModePreference = (SwitchPreference) findPreference(KEY_TOGGLE_AIRPLANE);
|
||||
+ SwitchPreference nfc = (SwitchPreference) findPreference(KEY_TOGGLE_NFC);
|
||||
+ PreferenceScreen androidBeam = (PreferenceScreen) findPreference(KEY_ANDROID_BEAM_SETTINGS);
|
||||
+@@ -370,6 +378,10 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
+ public void onResume() {
|
||||
+ super.onResume();
|
||||
+
|
||||
++ if (mRandomizeMac != null) {
|
||||
++ mRandomizeMac.setChecked(SystemProperties.getBoolean(RANDOMIZE_PERSIST_PROP, true));
|
||||
++ }
|
||||
++
|
||||
+ mAirplaneModeEnabler.resume();
|
||||
+ if (mNfcEnabler != null) {
|
||||
+ mNfcEnabler.resume();
|
||||
+@@ -390,6 +402,16 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
++ @Override
|
||||
++ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
++ if (preference == mRandomizeMac) {
|
||||
++ SystemProperties.set(RANDOMIZE_PERSIST_PROP, (Boolean) newValue ? "1" : "0");
|
||||
++ return true;
|
||||
++ }
|
||||
++
|
||||
++ return false;
|
||||
++ }
|
||||
++
|
||||
+ @Override
|
||||
+ public void onSaveInstanceState(Bundle outState) {
|
||||
+ super.onSaveInstanceState(outState);
|
||||
+--
|
||||
+2.8.0
|
||||
+
|
||||
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||
index 8aa4785..cb825c2 100644
|
||||
--- a/res/values/cm_strings.xml
|
||||
+++ b/res/values/cm_strings.xml
|
||||
@@ -1191,4 +1191,8 @@
|
||||
<!-- randomize MAC addresses -->
|
||||
<string name="randomize_mac_title">Randomize MAC addresses</string>
|
||||
<string name="randomize_mac_summary">Assign random MAC addresses when network devices are enabled</string>
|
||||
+
|
||||
+ <!-- randomize hostname -->
|
||||
+ <string name="randomize_hostname_title">Randomize network hostname</string>
|
||||
+ <string name="randomize_hostname_summary">Assign random network hostname on boot</string>
|
||||
</resources>
|
||||
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
|
||||
index 4a2d5d0..905e8de 100644
|
||||
--- a/res/xml/wireless_settings.xml
|
||||
+++ b/res/xml/wireless_settings.xml
|
||||
@@ -25,6 +25,12 @@
|
||||
android:persistent="false" />
|
||||
|
||||
<SwitchPreference
|
||||
+ android:key="randomize_hostname"
|
||||
+ android:title="@string/randomize_hostname_title"
|
||||
+ android:summary="@string/randomize_hostname_summary"
|
||||
+ android:persistent="false" />
|
||||
+
|
||||
+ <SwitchPreference
|
||||
android:key="toggle_airplane"
|
||||
android:title="@string/airplane_mode"
|
||||
android:persistent="false"
|
||||
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
|
||||
index 4432940..6ce772e 100644
|
||||
--- a/src/com/android/settings/WirelessSettings.java
|
||||
+++ b/src/com/android/settings/WirelessSettings.java
|
||||
@@ -64,6 +64,7 @@ public class WirelessSettings extends SettingsPreferenceFragment
|
||||
private static final String TAG = "WirelessSettings";
|
||||
|
||||
private static final String KEY_RANDOMIZE_MAC = "randomize_mac";
|
||||
+ private static final String KEY_RANDOMIZE_HOST = "randomize_hostname";
|
||||
private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane";
|
||||
private static final String KEY_NFC_CATEGORY_SETTINGS = "nfc_category_settings";
|
||||
private static final String KEY_TOGGLE_NFC = "toggle_nfc";
|
||||
@@ -80,11 +81,13 @@ public class WirelessSettings extends SettingsPreferenceFragment
|
||||
private static final String KEY_NFC_PAYMENT_SETTINGS = "nfc_payment_settings";
|
||||
|
||||
private static final String RANDOMIZE_PERSIST_PROP = "persist.privacy.randomize_mac";
|
||||
+ private static final String RANDOMIZE_HOST_PERSIST_PROP = "persist.privacy.randomize_host";
|
||||
|
||||
public static final String EXIT_ECM_RESULT = "exit_ecm_result";
|
||||
public static final int REQUEST_CODE_EXIT_ECM = 1;
|
||||
|
||||
private SwitchPreference mRandomizeMac;
|
||||
+ private SwitchPreference mRandomizeHost;
|
||||
private AirplaneModeEnabler mAirplaneModeEnabler;
|
||||
private SwitchPreference mAirplaneModePreference;
|
||||
private NfcEnabler mNfcEnabler;
|
||||
@@ -240,6 +243,8 @@ public class WirelessSettings extends SettingsPreferenceFragment
|
||||
final Activity activity = getActivity();
|
||||
mRandomizeMac = (SwitchPreference) findPreference(KEY_RANDOMIZE_MAC);
|
||||
mRandomizeMac.setOnPreferenceChangeListener(this);
|
||||
+ mRandomizeHost = (SwitchPreference) findPreference(KEY_RANDOMIZE_HOST);
|
||||
+ mRandomizeHost.setOnPreferenceChangeListener(this);
|
||||
mAirplaneModePreference = (SwitchPreference) findPreference(KEY_TOGGLE_AIRPLANE);
|
||||
SwitchPreference nfc = (SwitchPreference) findPreference(KEY_TOGGLE_NFC);
|
||||
PreferenceScreen androidBeam = (PreferenceScreen) findPreference(KEY_ANDROID_BEAM_SETTINGS);
|
||||
@@ -382,6 +387,10 @@ public class WirelessSettings extends SettingsPreferenceFragment
|
||||
mRandomizeMac.setChecked(SystemProperties.getBoolean(RANDOMIZE_PERSIST_PROP, true));
|
||||
}
|
||||
|
||||
+ if (mRandomizeHost != null) {
|
||||
+ mRandomizeHost.setChecked(SystemProperties.getBoolean(RANDOMIZE_HOST_PERSIST_PROP, true));
|
||||
+ }
|
||||
+
|
||||
mAirplaneModeEnabler.resume();
|
||||
if (mNfcEnabler != null) {
|
||||
mNfcEnabler.resume();
|
||||
@@ -409,6 +418,11 @@ public class WirelessSettings extends SettingsPreferenceFragment
|
||||
return true;
|
||||
}
|
||||
|
||||
+ if (preference == mRandomizeHost) {
|
||||
+ SystemProperties.set(RANDOMIZE_HOST_PERSIST_PROP, (Boolean) newValue ? "1" : "0");
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,120 +0,0 @@
|
||||
From e84a1e030313cbc2875c9d3ee1f016808d33dab3 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 18 Apr 2016 08:53:03 -0400
|
||||
Subject: [PATCH] Implement MAC Randomization
|
||||
|
||||
Change-Id: Id074d011eac7c33af267de4c1649670c32770cb5
|
||||
---
|
||||
res/values/cm_strings.xml | 4 ++++
|
||||
res/xml/wireless_settings.xml | 6 ++++++
|
||||
src/com/android/settings/WirelessSettings.java | 24 +++++++++++++++++++++++-
|
||||
3 files changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
|
||||
index 128660e..8aa4785 100644
|
||||
--- a/res/values/cm_strings.xml
|
||||
+++ b/res/values/cm_strings.xml
|
||||
@@ -1187,4 +1187,8 @@
|
||||
|
||||
<!-- Label for settings shortcut: carrier selection -->
|
||||
<string name="shortcut_carrier_title">Network operators</string>
|
||||
+
|
||||
+ <!-- randomize MAC addresses -->
|
||||
+ <string name="randomize_mac_title">Randomize MAC addresses</string>
|
||||
+ <string name="randomize_mac_summary">Assign random MAC addresses when network devices are enabled</string>
|
||||
</resources>
|
||||
diff --git a/res/xml/wireless_settings.xml b/res/xml/wireless_settings.xml
|
||||
index 8882003..4a2d5d0 100644
|
||||
--- a/res/xml/wireless_settings.xml
|
||||
+++ b/res/xml/wireless_settings.xml
|
||||
@@ -19,6 +19,12 @@
|
||||
android:title="@string/radio_controls_title">
|
||||
|
||||
<SwitchPreference
|
||||
+ android:key="randomize_mac"
|
||||
+ android:title="@string/randomize_mac_title"
|
||||
+ android:summary="@string/randomize_mac_summary"
|
||||
+ android:persistent="false" />
|
||||
+
|
||||
+ <SwitchPreference
|
||||
android:key="toggle_airplane"
|
||||
android:title="@string/airplane_mode"
|
||||
android:persistent="false"
|
||||
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java
|
||||
index 4a0c9e3..4432940 100644
|
||||
--- a/src/com/android/settings/WirelessSettings.java
|
||||
+++ b/src/com/android/settings/WirelessSettings.java
|
||||
@@ -37,6 +37,7 @@ import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.preference.Preference;
|
||||
+import android.preference.Preference.OnPreferenceChangeListener;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.preference.SwitchPreference;
|
||||
@@ -58,9 +59,11 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
-public class WirelessSettings extends SettingsPreferenceFragment implements Indexable {
|
||||
+public class WirelessSettings extends SettingsPreferenceFragment
|
||||
+ implements OnPreferenceChangeListener, Indexable {
|
||||
private static final String TAG = "WirelessSettings";
|
||||
|
||||
+ private static final String KEY_RANDOMIZE_MAC = "randomize_mac";
|
||||
private static final String KEY_TOGGLE_AIRPLANE = "toggle_airplane";
|
||||
private static final String KEY_NFC_CATEGORY_SETTINGS = "nfc_category_settings";
|
||||
private static final String KEY_TOGGLE_NFC = "toggle_nfc";
|
||||
@@ -76,9 +79,12 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
private static final String KEY_WFC_SETTINGS = "wifi_calling_settings";
|
||||
private static final String KEY_NFC_PAYMENT_SETTINGS = "nfc_payment_settings";
|
||||
|
||||
+ private static final String RANDOMIZE_PERSIST_PROP = "persist.privacy.randomize_mac";
|
||||
+
|
||||
public static final String EXIT_ECM_RESULT = "exit_ecm_result";
|
||||
public static final int REQUEST_CODE_EXIT_ECM = 1;
|
||||
|
||||
+ private SwitchPreference mRandomizeMac;
|
||||
private AirplaneModeEnabler mAirplaneModeEnabler;
|
||||
private SwitchPreference mAirplaneModePreference;
|
||||
private NfcEnabler mNfcEnabler;
|
||||
@@ -232,6 +238,8 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
final boolean isSecondaryUser = myUserId != UserHandle.USER_OWNER;
|
||||
|
||||
final Activity activity = getActivity();
|
||||
+ mRandomizeMac = (SwitchPreference) findPreference(KEY_RANDOMIZE_MAC);
|
||||
+ mRandomizeMac.setOnPreferenceChangeListener(this);
|
||||
mAirplaneModePreference = (SwitchPreference) findPreference(KEY_TOGGLE_AIRPLANE);
|
||||
SwitchPreference nfc = (SwitchPreference) findPreference(KEY_TOGGLE_NFC);
|
||||
PreferenceScreen androidBeam = (PreferenceScreen) findPreference(KEY_ANDROID_BEAM_SETTINGS);
|
||||
@@ -370,6 +378,10 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
+ if (mRandomizeMac != null) {
|
||||
+ mRandomizeMac.setChecked(SystemProperties.getBoolean(RANDOMIZE_PERSIST_PROP, true));
|
||||
+ }
|
||||
+
|
||||
mAirplaneModeEnabler.resume();
|
||||
if (mNfcEnabler != null) {
|
||||
mNfcEnabler.resume();
|
||||
@@ -390,6 +402,16 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde
|
||||
}
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
+ if (preference == mRandomizeMac) {
|
||||
+ SystemProperties.set(RANDOMIZE_PERSIST_PROP, (Boolean) newValue ? "1" : "0");
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,971 +0,0 @@
|
||||
From 20b2e611f53c505bfeb5d76176bc0efab9fdf216 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Wed, 24 Feb 2016 08:41:10 -0500
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: I8ef6bc93aa3e8a256bfd137a982d50c15100d4f0
|
||||
---
|
||||
AndroidManifest.xml | 26 --
|
||||
res/xml/anonymous_stats.xml | 32 ---
|
||||
res/xml/privacy_settings_cyanogenmod.xml | 8 -
|
||||
.../android/settings/cmstats/AnonymousStats.java | 107 --------
|
||||
src/com/android/settings/cmstats/PreviewData.java | 55 ----
|
||||
.../android/settings/cmstats/ReportingService.java | 106 --------
|
||||
.../settings/cmstats/ReportingServiceManager.java | 123 ---------
|
||||
.../settings/cmstats/StatsUploadJobService.java | 291 ---------------------
|
||||
src/com/android/settings/cmstats/Utilities.java | 102 --------
|
||||
.../settings/cyanogenmod/PrivacySettings.java | 3 -
|
||||
10 files changed, 853 deletions(-)
|
||||
delete mode 100644 res/xml/anonymous_stats.xml
|
||||
delete mode 100644 src/com/android/settings/cmstats/AnonymousStats.java
|
||||
delete mode 100644 src/com/android/settings/cmstats/PreviewData.java
|
||||
delete mode 100644 src/com/android/settings/cmstats/ReportingService.java
|
||||
delete mode 100644 src/com/android/settings/cmstats/ReportingServiceManager.java
|
||||
delete mode 100644 src/com/android/settings/cmstats/StatsUploadJobService.java
|
||||
delete mode 100644 src/com/android/settings/cmstats/Utilities.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index 775dbf0..f0ca92f 100755
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -1556,12 +1556,6 @@
|
||||
|
||||
<activity android:name=".EncryptionInterstitial"/>
|
||||
|
||||
- <service android:label="ReportingService"
|
||||
- android:enabled="true"
|
||||
- android:exported="false"
|
||||
- android:name=".cmstats.ReportingService">
|
||||
- </service>
|
||||
-
|
||||
<!-- Runs in the phone process since it needs access to the Phone object -->
|
||||
<activity android:name=".deviceinfo.Status"
|
||||
android:label="@string/device_status_activity_title"
|
||||
@@ -2674,26 +2668,6 @@
|
||||
</intent-filter>$
|
||||
</receiver>
|
||||
|
||||
- <!-- Anonymous Statistics -->
|
||||
- <receiver android:name=".cmstats.ReportingServiceManager"
|
||||
- android:enabled="true"
|
||||
- android:exported="false"
|
||||
- android:label="ReportingServiceManager">
|
||||
- <intent-filter>
|
||||
- <action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
- <action android:name="com.android.settings.action.TRIGGER_REPORT_METRICS" />
|
||||
- </intent-filter>
|
||||
- </receiver>
|
||||
-
|
||||
- <service android:label="ReportingService"
|
||||
- android:enabled="true"
|
||||
- android:exported="false"
|
||||
- android:name=".cmstats.ReportingService">
|
||||
- </service>
|
||||
-
|
||||
- <service android:name=".cmstats.StatsUploadJobService"
|
||||
- android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||
-
|
||||
<!-- Watch for ContactsContract.Profile changes and update the user's photo. -->
|
||||
<receiver android:name=".users.ProfileUpdateReceiver">
|
||||
<intent-filter>
|
||||
diff --git a/res/xml/anonymous_stats.xml b/res/xml/anonymous_stats.xml
|
||||
deleted file mode 100644
|
||||
index 0f3b8e2..0000000
|
||||
--- a/res/xml/anonymous_stats.xml
|
||||
+++ /dev/null
|
||||
@@ -1,32 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!-- Copyright (C) 2012 The CyanogenMod Project
|
||||
-
|
||||
- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- you may not use this file except in compliance with the License.
|
||||
- You may obtain a copy of the License at
|
||||
-
|
||||
- http://www.apache.org/licenses/LICENSE-2.0
|
||||
-
|
||||
- Unless required by applicable law or agreed to in writing, software
|
||||
- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- See the License for the specific language governing permissions and
|
||||
- limitations under the License.
|
||||
--->
|
||||
-
|
||||
-<PreferenceScreen
|
||||
- xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- android:title="@string/anonymous_statistics_title"
|
||||
- xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
-
|
||||
- <com.android.settings.cyanogenmod.CMSecureSettingSwitchPreference
|
||||
- android:key="stats_collection"
|
||||
- android:title="@string/stats_collection_title"
|
||||
- android:summary="@string/stats_collection_summary"
|
||||
- android:defaultValue="true" />
|
||||
-
|
||||
- <PreferenceScreen
|
||||
- android:title="@string/preview_data_title"
|
||||
- android:fragment="com.android.settings.cmstats.PreviewData" />
|
||||
-
|
||||
-</PreferenceScreen>
|
||||
diff --git a/res/xml/privacy_settings_cyanogenmod.xml b/res/xml/privacy_settings_cyanogenmod.xml
|
||||
index 256ca00..04f8643 100644
|
||||
--- a/res/xml/privacy_settings_cyanogenmod.xml
|
||||
+++ b/res/xml/privacy_settings_cyanogenmod.xml
|
||||
@@ -29,14 +29,6 @@
|
||||
android:summary="@string/blacklist_summary"
|
||||
android:fragment="com.android.settings.blacklist.BlacklistSettings" />
|
||||
|
||||
- <!-- Anonymous statistics - (CMStats) -->
|
||||
- <PreferenceScreen
|
||||
- android:key="cmstats"
|
||||
- android:title="@string/anonymous_statistics_title"
|
||||
- android:summary="@string/anonymous_statistics_summary"
|
||||
- android:fragment="com.android.settings.cmstats.AnonymousStats" >
|
||||
- </PreferenceScreen>
|
||||
-
|
||||
<!-- Protected Apps! -->
|
||||
<Preference
|
||||
android:key="protected_apps_manager"
|
||||
diff --git a/src/com/android/settings/cmstats/AnonymousStats.java b/src/com/android/settings/cmstats/AnonymousStats.java
|
||||
deleted file mode 100644
|
||||
index 232a533..0000000
|
||||
--- a/src/com/android/settings/cmstats/AnonymousStats.java
|
||||
+++ /dev/null
|
||||
@@ -1,107 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2015 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.android.settings.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.SharedPreferences;
|
||||
-import android.os.Bundle;
|
||||
-
|
||||
-import android.os.UserHandle;
|
||||
-import android.preference.Preference;
|
||||
-import android.preference.PreferenceScreen;
|
||||
-import android.preference.SwitchPreference;
|
||||
-import com.android.settings.R;
|
||||
-import com.android.settings.SettingsPreferenceFragment;
|
||||
-
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-import org.cyanogenmod.internal.logging.CMMetricsLogger;
|
||||
-
|
||||
-public class AnonymousStats extends SettingsPreferenceFragment {
|
||||
-
|
||||
- private static final String PREF_FILE_NAME = "CMStats";
|
||||
- /* package */ static final String ANONYMOUS_OPT_IN = "pref_anonymous_opt_in";
|
||||
- /* package */ static final String ANONYMOUS_LAST_CHECKED = "pref_anonymous_checked_in";
|
||||
-
|
||||
- /* package */ static final String KEY_LAST_JOB_ID = "last_job_id";
|
||||
- /* package */ static final int QUEUE_MAX_THRESHOLD = 1000;
|
||||
-
|
||||
- public static final String KEY_STATS = "stats_collection";
|
||||
-
|
||||
- SwitchPreference mStatsSwitch;
|
||||
-
|
||||
- public static SharedPreferences getPreferences(Context context) {
|
||||
- return context.getSharedPreferences(PREF_FILE_NAME, 0);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void onCreate(Bundle savedInstanceState) {
|
||||
- super.onCreate(savedInstanceState);
|
||||
- addPreferencesFromResource(R.xml.anonymous_stats);
|
||||
- mStatsSwitch = (SwitchPreference) findPreference(KEY_STATS);
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
|
||||
- if (preference == mStatsSwitch) {
|
||||
- boolean checked = mStatsSwitch.isChecked();
|
||||
- if (checked) {
|
||||
- // clear opt out flags
|
||||
- CMSettings.Secure.putIntForUser(getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION_REPORTED, 0, UserHandle.USER_OWNER);
|
||||
- }
|
||||
- // will initiate opt out sequence if necessary
|
||||
- ReportingServiceManager.setAlarm(getActivity());
|
||||
- return true;
|
||||
- }
|
||||
- return super.onPreferenceTreeClick(preferenceScreen, preference);
|
||||
- }
|
||||
-
|
||||
- public static void updateLastSynced(Context context) {
|
||||
- getPreferences(context)
|
||||
- .edit()
|
||||
- .putLong(ANONYMOUS_LAST_CHECKED,System.currentTimeMillis())
|
||||
- .commit();
|
||||
- }
|
||||
-
|
||||
- private static int getLastJobId(Context context) {
|
||||
- return getPreferences(context).getInt(KEY_LAST_JOB_ID, 0);
|
||||
- }
|
||||
-
|
||||
- private static void setLastJobId(Context context, int id) {
|
||||
- getPreferences(context)
|
||||
- .edit()
|
||||
- .putInt(KEY_LAST_JOB_ID, id)
|
||||
- .commit();
|
||||
- }
|
||||
-
|
||||
- public static int getNextJobId(Context context) {
|
||||
- int lastId = getLastJobId(context);
|
||||
- if (lastId >= QUEUE_MAX_THRESHOLD) {
|
||||
- lastId = 1;
|
||||
- } else {
|
||||
- lastId += 1;
|
||||
- }
|
||||
- setLastJobId(context, lastId);
|
||||
- return lastId;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected int getMetricsCategory() {
|
||||
- return CMMetricsLogger.ANONYMOUS_STATS;
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/android/settings/cmstats/PreviewData.java b/src/com/android/settings/cmstats/PreviewData.java
|
||||
deleted file mode 100644
|
||||
index 0adacad..0000000
|
||||
--- a/src/com/android/settings/cmstats/PreviewData.java
|
||||
+++ /dev/null
|
||||
@@ -1,55 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2012 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.android.settings.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.os.Bundle;
|
||||
-import android.preference.Preference;
|
||||
-import android.preference.PreferenceScreen;
|
||||
-
|
||||
-import com.android.settings.R;
|
||||
-import com.android.settings.SettingsPreferenceFragment;
|
||||
-import org.cyanogenmod.internal.logging.CMMetricsLogger;
|
||||
-
|
||||
-public class PreviewData extends SettingsPreferenceFragment {
|
||||
- private static final String UNIQUE_ID = "preview_id";
|
||||
- private static final String DEVICE = "preview_device";
|
||||
- private static final String VERSION = "preview_version";
|
||||
- private static final String COUNTRY = "preview_country";
|
||||
- private static final String CARRIER = "preview_carrier";
|
||||
-
|
||||
- @Override
|
||||
- public void onCreate(Bundle savedInstanceState) {
|
||||
- super.onCreate(savedInstanceState);
|
||||
-
|
||||
- addPreferencesFromResource(R.xml.preview_data);
|
||||
-
|
||||
- final PreferenceScreen prefSet = getPreferenceScreen();
|
||||
- final Context context = getActivity();
|
||||
-
|
||||
- prefSet.findPreference(UNIQUE_ID).setSummary(Utilities.getUniqueID(context));
|
||||
- prefSet.findPreference(DEVICE).setSummary(Utilities.getDevice());
|
||||
- prefSet.findPreference(VERSION).setSummary(Utilities.getModVersion());
|
||||
- prefSet.findPreference(COUNTRY).setSummary(Utilities.getCountryCode(context));
|
||||
- prefSet.findPreference(CARRIER).setSummary(Utilities.getCarrier(context));
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected int getMetricsCategory() {
|
||||
- return CMMetricsLogger.PREVIEW_DATA;
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/android/settings/cmstats/ReportingService.java b/src/com/android/settings/cmstats/ReportingService.java
|
||||
deleted file mode 100644
|
||||
index 8410143..0000000
|
||||
--- a/src/com/android/settings/cmstats/ReportingService.java
|
||||
+++ /dev/null
|
||||
@@ -1,106 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2015 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.android.settings.cmstats;
|
||||
-
|
||||
-import android.app.IntentService;
|
||||
-import android.app.job.JobInfo;
|
||||
-import android.app.job.JobScheduler;
|
||||
-import android.content.ComponentName;
|
||||
-import android.content.Context;
|
||||
-import android.content.Intent;
|
||||
-import android.os.PersistableBundle;
|
||||
-import android.os.UserHandle;
|
||||
-import android.util.Log;
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-import java.util.List;
|
||||
-
|
||||
-public class ReportingService extends IntentService {
|
||||
- /* package */ static final String TAG = "CMStats";
|
||||
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
|
||||
-
|
||||
- public static final String EXTRA_OPTING_OUT = "cmstats::opt_out";
|
||||
-
|
||||
- public ReportingService() {
|
||||
- super(ReportingService.class.getSimpleName());
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected void onHandleIntent(Intent intent) {
|
||||
- JobScheduler js = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);
|
||||
-
|
||||
- String deviceId = Utilities.getUniqueID(getApplicationContext());
|
||||
- String deviceName = Utilities.getDevice();
|
||||
- String deviceVersion = Utilities.getModVersion();
|
||||
- String deviceCountry = Utilities.getCountryCode(getApplicationContext());
|
||||
- String deviceCarrier = Utilities.getCarrier(getApplicationContext());
|
||||
- String deviceCarrierId = Utilities.getCarrierId(getApplicationContext());
|
||||
- boolean optOut = intent.getBooleanExtra(EXTRA_OPTING_OUT, false);
|
||||
-
|
||||
- final int cyanogenJobId = AnonymousStats.getNextJobId(getApplicationContext());
|
||||
- final int cmOrgJobId = AnonymousStats.getNextJobId(getApplicationContext());
|
||||
-
|
||||
- if (DEBUG) Log.d(TAG, "scheduling jobs id: " + cyanogenJobId + ", " + cmOrgJobId);
|
||||
-
|
||||
- PersistableBundle cyanogenBundle = new PersistableBundle();
|
||||
- cyanogenBundle.putBoolean(StatsUploadJobService.KEY_OPT_OUT, optOut);
|
||||
- cyanogenBundle.putString(StatsUploadJobService.KEY_DEVICE_NAME, deviceName);
|
||||
- cyanogenBundle.putString(StatsUploadJobService.KEY_UNIQUE_ID, deviceId);
|
||||
- cyanogenBundle.putString(StatsUploadJobService.KEY_VERSION, deviceVersion);
|
||||
- cyanogenBundle.putString(StatsUploadJobService.KEY_COUNTRY, deviceCountry);
|
||||
- cyanogenBundle.putString(StatsUploadJobService.KEY_CARRIER, deviceCarrier);
|
||||
- cyanogenBundle.putString(StatsUploadJobService.KEY_CARRIER_ID, deviceCarrierId);
|
||||
- cyanogenBundle.putLong(StatsUploadJobService.KEY_TIMESTAMP, System.currentTimeMillis());
|
||||
-
|
||||
- // get snapshot and persist it
|
||||
- PersistableBundle cmBundle = new PersistableBundle(cyanogenBundle);
|
||||
-
|
||||
- // set job types
|
||||
- cyanogenBundle.putInt(StatsUploadJobService.KEY_JOB_TYPE,
|
||||
- StatsUploadJobService.JOB_TYPE_CYANOGEN);
|
||||
- cmBundle.putInt(StatsUploadJobService.KEY_JOB_TYPE,
|
||||
- StatsUploadJobService.JOB_TYPE_CMORG);
|
||||
-
|
||||
- // schedule cyanogen stats upload
|
||||
- js.schedule(new JobInfo.Builder(cyanogenJobId, new ComponentName(getPackageName(),
|
||||
- StatsUploadJobService.class.getName()))
|
||||
- .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
|
||||
- .setMinimumLatency(1000)
|
||||
- .setExtras(cyanogenBundle)
|
||||
- .setPersisted(true)
|
||||
- .build());
|
||||
-
|
||||
- // schedule cmorg stats upload
|
||||
- js.schedule(new JobInfo.Builder(cmOrgJobId, new ComponentName(getPackageName(),
|
||||
- StatsUploadJobService.class.getName()))
|
||||
- .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
|
||||
- .setMinimumLatency(1000)
|
||||
- .setExtras(cmBundle)
|
||||
- .setPersisted(true)
|
||||
- .build());
|
||||
-
|
||||
- if (optOut) {
|
||||
- // we've successfully scheduled the opt out.
|
||||
- CMSettings.Secure.putIntForUser(getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION_REPORTED, 1, UserHandle.USER_OWNER);
|
||||
- }
|
||||
-
|
||||
- // reschedule
|
||||
- AnonymousStats.updateLastSynced(this);
|
||||
- ReportingServiceManager.setAlarm(this);
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/android/settings/cmstats/ReportingServiceManager.java b/src/com/android/settings/cmstats/ReportingServiceManager.java
|
||||
deleted file mode 100644
|
||||
index bce1372..0000000
|
||||
--- a/src/com/android/settings/cmstats/ReportingServiceManager.java
|
||||
+++ /dev/null
|
||||
@@ -1,123 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2012 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.android.settings.cmstats;
|
||||
-
|
||||
-import android.app.AlarmManager;
|
||||
-import android.app.PendingIntent;
|
||||
-import android.app.job.JobScheduler;
|
||||
-import android.content.BroadcastReceiver;
|
||||
-import android.content.Context;
|
||||
-import android.content.Intent;
|
||||
-import android.content.SharedPreferences;
|
||||
-import android.os.UserHandle;
|
||||
-import android.util.Log;
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-public class ReportingServiceManager extends BroadcastReceiver {
|
||||
- private static final long MILLIS_PER_HOUR = 60L * 60L * 1000L;
|
||||
- private static final long MILLIS_PER_DAY = 24L * MILLIS_PER_HOUR;
|
||||
- private static final long UPDATE_INTERVAL = 1L * MILLIS_PER_DAY;
|
||||
-
|
||||
- private static final String TAG = ReportingServiceManager.class.getSimpleName();
|
||||
-
|
||||
- public static final String ACTION_LAUNCH_SERVICE =
|
||||
- "com.android.settings.action.TRIGGER_REPORT_METRICS";
|
||||
- public static final String EXTRA_FORCE = "force";
|
||||
-
|
||||
- @Override
|
||||
- public void onReceive(Context context, Intent intent) {
|
||||
- if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
|
||||
- setAlarm(context);
|
||||
- } else if (intent.getAction().equals(ACTION_LAUNCH_SERVICE)){
|
||||
- launchService(context, intent.getBooleanExtra(EXTRA_FORCE, false));
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * opt out if we haven't yet
|
||||
- */
|
||||
- public static void initiateOptOut(Context context) {
|
||||
- final boolean optOutReported = CMSettings.Secure.getIntForUser(context.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION_REPORTED, 0, UserHandle.USER_OWNER) == 1;
|
||||
- if (!optOutReported) {
|
||||
- Intent intent = new Intent();
|
||||
- intent.setClass(context, ReportingService.class);
|
||||
- intent.putExtra(ReportingService.EXTRA_OPTING_OUT, true);
|
||||
- context.startServiceAsUser(intent, UserHandle.OWNER);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public static void setAlarm(Context context) {
|
||||
- SharedPreferences prefs = AnonymousStats.getPreferences(context);
|
||||
- if (prefs.contains(AnonymousStats.ANONYMOUS_OPT_IN)) {
|
||||
- migrate(context, prefs);
|
||||
- }
|
||||
- if (!Utilities.isStatsCollectionEnabled(context)) {
|
||||
- initiateOptOut(context);
|
||||
- return;
|
||||
- }
|
||||
- long lastSynced = prefs.getLong(AnonymousStats.ANONYMOUS_LAST_CHECKED, 0);
|
||||
- if (lastSynced == 0) {
|
||||
- launchService(context, true); // service will reschedule the next alarm
|
||||
- return;
|
||||
- }
|
||||
- long millisFromNow = (lastSynced + UPDATE_INTERVAL) - System.currentTimeMillis();
|
||||
-
|
||||
- Intent intent = new Intent(ACTION_LAUNCH_SERVICE);
|
||||
- intent.setClass(context, ReportingServiceManager.class);
|
||||
-
|
||||
- AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||
- alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + millisFromNow,
|
||||
- PendingIntent.getBroadcast(context, 0, intent, 0));
|
||||
- Log.d(TAG, "Next sync attempt in : "
|
||||
- + (millisFromNow / MILLIS_PER_HOUR) + " hours");
|
||||
- }
|
||||
-
|
||||
- public static void launchService(Context context, boolean force) {
|
||||
- SharedPreferences prefs = AnonymousStats.getPreferences(context);
|
||||
-
|
||||
- if (!Utilities.isStatsCollectionEnabled(context)) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (!force) {
|
||||
- long lastSynced = prefs.getLong(AnonymousStats.ANONYMOUS_LAST_CHECKED, 0);
|
||||
- if (lastSynced == 0) {
|
||||
- setAlarm(context);
|
||||
- return;
|
||||
- }
|
||||
- long timeElapsed = System.currentTimeMillis() - lastSynced;
|
||||
- if (timeElapsed < UPDATE_INTERVAL) {
|
||||
- long timeLeft = UPDATE_INTERVAL - timeElapsed;
|
||||
- Log.d(TAG, "Waiting for next sync : "
|
||||
- + timeLeft / MILLIS_PER_HOUR + " hours");
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- Intent intent = new Intent();
|
||||
- intent.setClass(context, ReportingService.class);
|
||||
- context.startServiceAsUser(intent, UserHandle.OWNER);
|
||||
- }
|
||||
-
|
||||
- private static void migrate(Context context, SharedPreferences prefs) {
|
||||
- Utilities.setStatsCollectionEnabled(context,
|
||||
- prefs.getBoolean(AnonymousStats.ANONYMOUS_OPT_IN, true));
|
||||
- prefs.edit().remove(AnonymousStats.ANONYMOUS_OPT_IN).commit();
|
||||
- }
|
||||
-
|
||||
-}
|
||||
diff --git a/src/com/android/settings/cmstats/StatsUploadJobService.java b/src/com/android/settings/cmstats/StatsUploadJobService.java
|
||||
deleted file mode 100644
|
||||
index 580a20f..0000000
|
||||
--- a/src/com/android/settings/cmstats/StatsUploadJobService.java
|
||||
+++ /dev/null
|
||||
@@ -1,291 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2015 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.android.settings.cmstats;
|
||||
-
|
||||
-import android.app.job.JobParameters;
|
||||
-import android.app.job.JobService;
|
||||
-import android.net.Uri;
|
||||
-import android.os.AsyncTask;
|
||||
-import android.os.PersistableBundle;
|
||||
-import android.util.ArrayMap;
|
||||
-import android.util.Log;
|
||||
-import com.android.settings.R;
|
||||
-import org.json.JSONException;
|
||||
-import org.json.JSONObject;
|
||||
-
|
||||
-import java.io.BufferedInputStream;
|
||||
-import java.io.BufferedReader;
|
||||
-import java.io.BufferedWriter;
|
||||
-import java.io.IOException;
|
||||
-import java.io.InputStream;
|
||||
-import java.io.InputStreamReader;
|
||||
-import java.io.OutputStream;
|
||||
-import java.io.OutputStreamWriter;
|
||||
-import java.net.HttpURLConnection;
|
||||
-import java.net.URL;
|
||||
-import java.util.Collections;
|
||||
-import java.util.Map;
|
||||
-
|
||||
-public class StatsUploadJobService extends JobService {
|
||||
-
|
||||
- private static final String TAG = StatsUploadJobService.class.getSimpleName();
|
||||
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
|
||||
-
|
||||
- public static final String KEY_JOB_TYPE = "job_type";
|
||||
- public static final int JOB_TYPE_CYANOGEN = 1;
|
||||
- public static final int JOB_TYPE_CMORG = 2;
|
||||
-
|
||||
- public static final String KEY_UNIQUE_ID = "uniqueId";
|
||||
- public static final String KEY_DEVICE_NAME = "deviceName";
|
||||
- public static final String KEY_VERSION = "version";
|
||||
- public static final String KEY_COUNTRY = "country";
|
||||
- public static final String KEY_CARRIER = "carrier";
|
||||
- public static final String KEY_CARRIER_ID = "carrierId";
|
||||
- public static final String KEY_TIMESTAMP = "timeStamp";
|
||||
- public static final String KEY_OPT_OUT = "optOut";
|
||||
-
|
||||
- private final Map<JobParameters, StatsUploadTask> mCurrentJobs
|
||||
- = Collections.synchronizedMap(new ArrayMap<JobParameters, StatsUploadTask>());
|
||||
-
|
||||
- @Override
|
||||
- public boolean onStartJob(JobParameters jobParameters) {
|
||||
- if (DEBUG)
|
||||
- Log.d(TAG, "onStartJob() called with " + "jobParameters = [" + jobParameters + "]");
|
||||
- final StatsUploadTask uploadTask = new StatsUploadTask(jobParameters);
|
||||
- mCurrentJobs.put(jobParameters, uploadTask);
|
||||
- uploadTask.execute((Void) null);
|
||||
- return true;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean onStopJob(JobParameters jobParameters) {
|
||||
- if (DEBUG)
|
||||
- Log.d(TAG, "onStopJob() called with " + "jobParameters = [" + jobParameters + "]");
|
||||
-
|
||||
- final StatsUploadTask cancelledJob;
|
||||
- cancelledJob = mCurrentJobs.remove(jobParameters);
|
||||
-
|
||||
- if (cancelledJob != null) {
|
||||
- // cancel the ongoing background task
|
||||
- cancelledJob.cancel(true);
|
||||
- return true; // reschedule
|
||||
- }
|
||||
-
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- private class StatsUploadTask extends AsyncTask<Void, Void, Boolean> {
|
||||
-
|
||||
- private JobParameters mJobParams;
|
||||
-
|
||||
- public StatsUploadTask(JobParameters jobParams) {
|
||||
- this.mJobParams = jobParams;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected Boolean doInBackground(Void... params) {
|
||||
-
|
||||
- PersistableBundle extras = mJobParams.getExtras();
|
||||
-
|
||||
- String deviceId = extras.getString(KEY_UNIQUE_ID);
|
||||
- String deviceName = extras.getString(KEY_DEVICE_NAME);
|
||||
- String deviceVersion = extras.getString(KEY_VERSION);
|
||||
- String deviceCountry = extras.getString(KEY_COUNTRY);
|
||||
- String deviceCarrier = extras.getString(KEY_CARRIER);
|
||||
- String deviceCarrierId = extras.getString(KEY_CARRIER_ID);
|
||||
- long timeStamp = extras.getLong(KEY_TIMESTAMP);
|
||||
- boolean optOut = extras.getBoolean(KEY_OPT_OUT);
|
||||
-
|
||||
- boolean success = false;
|
||||
- int jobType = extras.getInt(KEY_JOB_TYPE, -1);
|
||||
- if (!isCancelled()) {
|
||||
- switch (jobType) {
|
||||
- case JOB_TYPE_CYANOGEN:
|
||||
- try {
|
||||
- JSONObject json = new JSONObject();
|
||||
- json.put("optOut", optOut);
|
||||
- json.put("uniqueId", deviceId);
|
||||
- json.put("deviceName", deviceName);
|
||||
- json.put("version", deviceVersion);
|
||||
- json.put("country", deviceCountry);
|
||||
- json.put("carrier", deviceCarrier);
|
||||
- json.put("carrierId", deviceCarrierId);
|
||||
- json.put("timestamp", timeStamp);
|
||||
-
|
||||
- success = uploadToCyanogen(json);
|
||||
- } catch (IOException | JSONException e) {
|
||||
- Log.e(TAG, "Could not upload stats checkin to cyanogen server", e);
|
||||
- success = false;
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
- case JOB_TYPE_CMORG:
|
||||
- try {
|
||||
- success = uploadToCM(deviceId, deviceName, deviceVersion, deviceCountry,
|
||||
- deviceCarrier, deviceCarrierId, optOut);
|
||||
- } catch (IOException e) {
|
||||
- Log.e(TAG, "Could not upload stats checkin to commnity server", e);
|
||||
- success = false;
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if (DEBUG)
|
||||
- Log.d(TAG, "job id " + mJobParams.getJobId() + ", has finished with success="
|
||||
- + success);
|
||||
- return success;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected void onPostExecute(Boolean success) {
|
||||
- mCurrentJobs.remove(mJobParams);
|
||||
- jobFinished(mJobParams, !success);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-
|
||||
- private boolean uploadToCM(String deviceId, String deviceName, String deviceVersion,
|
||||
- String deviceCountry, String deviceCarrier, String deviceCarrierId,
|
||||
- boolean optOut)
|
||||
- throws IOException {
|
||||
-
|
||||
- final Uri uri = Uri.parse(getString(R.string.stats_cm_url)).buildUpon()
|
||||
- .appendQueryParameter("opt_out", optOut ? "1" : "0")
|
||||
- .appendQueryParameter("device_hash", deviceId)
|
||||
- .appendQueryParameter("device_name", deviceName)
|
||||
- .appendQueryParameter("device_version", deviceVersion)
|
||||
- .appendQueryParameter("device_country", deviceCountry)
|
||||
- .appendQueryParameter("device_carrier", deviceCarrier)
|
||||
- .appendQueryParameter("device_carrier_id", deviceCarrierId).build();
|
||||
- URL url = new URL(uri.toString());
|
||||
- HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
|
||||
- try {
|
||||
- urlConnection.setInstanceFollowRedirects(true);
|
||||
- urlConnection.setDoOutput(true);
|
||||
- urlConnection.connect();
|
||||
-
|
||||
- final int responseCode = urlConnection.getResponseCode();
|
||||
- if (DEBUG) Log.d(TAG, "cm server response code=" + responseCode);
|
||||
- final boolean success = responseCode == HttpURLConnection.HTTP_OK;
|
||||
- if (!success) {
|
||||
- Log.w(TAG, "failed sending, server returned: " + getResponse(urlConnection,
|
||||
- !success));
|
||||
- }
|
||||
- return success;
|
||||
- } finally {
|
||||
- urlConnection.disconnect();
|
||||
- }
|
||||
-
|
||||
- }
|
||||
-
|
||||
- private boolean uploadToCyanogen(JSONObject json)
|
||||
- throws IOException, JSONException {
|
||||
- String authToken = getAuthToken();
|
||||
-
|
||||
- if (authToken.isEmpty()) {
|
||||
- Log.w(TAG, "no auth token!");
|
||||
- }
|
||||
-
|
||||
- URL url = new URL(getString(R.string.stats_cyanogen_url));
|
||||
- HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
|
||||
- try {
|
||||
- urlConnection.setInstanceFollowRedirects(true);
|
||||
- urlConnection.setDoInput(true);
|
||||
- urlConnection.setDoOutput(true);
|
||||
-
|
||||
- urlConnection.setRequestProperty("Accept-Encoding", "identity");
|
||||
- urlConnection.setRequestProperty("Authorization", authToken);
|
||||
- urlConnection.setRequestProperty("Content-Type", "application/json");
|
||||
-
|
||||
- OutputStream os = urlConnection.getOutputStream();
|
||||
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
|
||||
- writer.write(json.toString());
|
||||
- writer.flush();
|
||||
- writer.close();
|
||||
- os.close();
|
||||
-
|
||||
- urlConnection.connect();
|
||||
-
|
||||
- final int responseCode = urlConnection.getResponseCode();
|
||||
- final boolean success = responseCode == HttpURLConnection.HTTP_OK;
|
||||
-
|
||||
- final String response = getResponse(urlConnection, !success);
|
||||
- if (DEBUG)
|
||||
- Log.d(TAG, "server responseCode: " + responseCode +", response=" + response);
|
||||
-
|
||||
- if (!success) {
|
||||
- Log.w(TAG, "failed sending, server returned: " + response);
|
||||
- }
|
||||
- return success;
|
||||
- } finally {
|
||||
- urlConnection.disconnect();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private String getAuthToken() {
|
||||
- HttpURLConnection urlConnection = null;
|
||||
- try {
|
||||
- URL url = new URL(getString(R.string.stats_cyanogen_token_url));
|
||||
- urlConnection = (HttpURLConnection) url.openConnection();
|
||||
- urlConnection.setInstanceFollowRedirects(true);
|
||||
- urlConnection.setDoInput(true);
|
||||
-
|
||||
- urlConnection.setRequestProperty("Accept-Encoding", "identity");
|
||||
- urlConnection.setRequestProperty("Content-Type", "text/plain");
|
||||
-
|
||||
- urlConnection.connect();
|
||||
-
|
||||
- final int responseCode = urlConnection.getResponseCode();
|
||||
- final boolean success = responseCode == HttpURLConnection.HTTP_OK;
|
||||
- if (DEBUG) Log.d(TAG, "server auth response code=" + responseCode);
|
||||
- final String response = getResponse(urlConnection, !success);
|
||||
- if (DEBUG)
|
||||
- Log.d(TAG, "server auth response=" + response);
|
||||
-
|
||||
- if (success) {
|
||||
- return response;
|
||||
- }
|
||||
- } catch (IOException e) {
|
||||
- Log.e(TAG, "error getting auth token", e);
|
||||
- } finally {
|
||||
- if (urlConnection != null) {
|
||||
- urlConnection.disconnect();
|
||||
- }
|
||||
- }
|
||||
- return "";
|
||||
- }
|
||||
-
|
||||
- private String getResponse(HttpURLConnection httpUrlConnection, boolean errorStream)
|
||||
- throws IOException {
|
||||
- InputStream responseStream = new BufferedInputStream(errorStream
|
||||
- ? httpUrlConnection.getErrorStream()
|
||||
- : httpUrlConnection.getInputStream());
|
||||
-
|
||||
- BufferedReader responseStreamReader = new BufferedReader(
|
||||
- new InputStreamReader(responseStream));
|
||||
- String line = "";
|
||||
- StringBuilder stringBuilder = new StringBuilder();
|
||||
- while ((line = responseStreamReader.readLine()) != null) {
|
||||
- stringBuilder.append(line).append("\n");
|
||||
- }
|
||||
- responseStreamReader.close();
|
||||
- responseStream.close();
|
||||
-
|
||||
- return stringBuilder.toString();
|
||||
- }
|
||||
-
|
||||
-}
|
||||
diff --git a/src/com/android/settings/cmstats/Utilities.java b/src/com/android/settings/cmstats/Utilities.java
|
||||
deleted file mode 100644
|
||||
index 1e98888..0000000
|
||||
--- a/src/com/android/settings/cmstats/Utilities.java
|
||||
+++ /dev/null
|
||||
@@ -1,102 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2012 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.android.settings.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.os.Build;
|
||||
-import android.os.SystemProperties;
|
||||
-import android.provider.Settings;
|
||||
-import android.telephony.TelephonyManager;
|
||||
-import android.text.TextUtils;
|
||||
-
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-import java.math.BigInteger;
|
||||
-import java.net.NetworkInterface;
|
||||
-import java.security.MessageDigest;
|
||||
-
|
||||
-public class Utilities {
|
||||
- public static String getUniqueID(Context context) {
|
||||
- final String id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
|
||||
- return digest(context.getPackageName() + id);
|
||||
- }
|
||||
-
|
||||
- public static String getCarrier(Context context) {
|
||||
- TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
- String carrier = tm.getNetworkOperatorName();
|
||||
- if (TextUtils.isEmpty(carrier)) {
|
||||
- carrier = "Unknown";
|
||||
- }
|
||||
- return carrier;
|
||||
- }
|
||||
-
|
||||
- public static String getCarrierId(Context context) {
|
||||
- TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
- String carrierId = tm.getNetworkOperator();
|
||||
- if (TextUtils.isEmpty(carrierId)) {
|
||||
- carrierId = "0";
|
||||
- }
|
||||
- return carrierId;
|
||||
- }
|
||||
-
|
||||
- public static String getCountryCode(Context context) {
|
||||
- TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
- String countryCode = tm.getNetworkCountryIso();
|
||||
- if (TextUtils.isEmpty(countryCode)) {
|
||||
- countryCode = "Unknown";
|
||||
- }
|
||||
- return countryCode;
|
||||
- }
|
||||
-
|
||||
- public static String getDevice() {
|
||||
- return SystemProperties.get("ro.cm.device", Build.PRODUCT);
|
||||
- }
|
||||
-
|
||||
- public static String getModVersion() {
|
||||
- return SystemProperties.get("ro.cm.version", Build.DISPLAY);
|
||||
- }
|
||||
-
|
||||
- public static String digest(String input) {
|
||||
- try {
|
||||
- MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
- return new BigInteger(1, md.digest(input.getBytes())).toString(16).toUpperCase();
|
||||
- } catch (Exception e) {
|
||||
- return null;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Check to see if global stats are enabled.
|
||||
- * @param context
|
||||
- * @return Whether or not stats collection is enabled.
|
||||
- */
|
||||
- public static boolean isStatsCollectionEnabled(Context context) {
|
||||
- return CMSettings.Secure.getInt(context.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, 1) != 0;
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Enabled or disable stats collection
|
||||
- * @param context
|
||||
- * @param enabled Boolean that sets collection being enabled.
|
||||
- */
|
||||
- public static void setStatsCollectionEnabled(Context context, boolean enabled) {
|
||||
- int enable = (enabled) ? 1 : 0;
|
||||
- CMSettings.Secure.putInt(context.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, enable);
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/android/settings/cyanogenmod/PrivacySettings.java b/src/com/android/settings/cyanogenmod/PrivacySettings.java
|
||||
index f6a9c15..066063a 100644
|
||||
--- a/src/com/android/settings/cyanogenmod/PrivacySettings.java
|
||||
+++ b/src/com/android/settings/cyanogenmod/PrivacySettings.java
|
||||
@@ -32,7 +32,6 @@ import org.cyanogenmod.internal.logging.CMMetricsLogger;
|
||||
public class PrivacySettings extends SettingsPreferenceFragment {
|
||||
|
||||
private static final String KEY_BLACKLIST = "blacklist";
|
||||
- private static final String KEY_STATS = "cmstats";
|
||||
|
||||
private PreferenceScreen mBlacklist;
|
||||
|
||||
@@ -48,8 +47,6 @@ public class PrivacySettings extends SettingsPreferenceFragment {
|
||||
|
||||
boolean isOwner = Utils.isUserOwner();
|
||||
if (!isOwner) {
|
||||
- PreferenceScreen root = getPreferenceScreen();
|
||||
- root.removePreference(findPreference(KEY_STATS));
|
||||
}
|
||||
|
||||
// Determine options based on device telephony support
|
||||
--
|
||||
2.7.2
|
||||
|
@ -1,954 +0,0 @@
|
||||
From 353e522115eca684a4036f2005f64ab14123218f Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 8 Apr 2016 20:43:21 -0400
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: I4d38768fc22791f9e5085c56a22f94f335526c31
|
||||
---
|
||||
AndroidManifest.xml | 1 -
|
||||
.../setupwizard/cmstats/SetupStats.java | 162 ---------------------
|
||||
.../setupwizard/cmstats/StatsUtils.java | 44 ------
|
||||
.../setupwizard/setup/BluetoothSetupPage.java | 7 -
|
||||
.../setupwizard/setup/ChooseDataSimPage.java | 4 -
|
||||
.../setupwizard/setup/CyanogenServicesPage.java | 13 --
|
||||
.../setupwizard/setup/CyanogenSettingsPage.java | 56 -------
|
||||
.../setupwizard/setup/DateTimePage.java | 19 ---
|
||||
.../setupwizard/setup/FingerprintSetupPage.java | 4 -
|
||||
.../setupwizard/setup/GmsAccountPage.java | 23 ---
|
||||
.../setupwizard/setup/MobileDataPage.java | 4 -
|
||||
.../setupwizard/setup/OtherSettingsPage.java | 17 +--
|
||||
.../cyanogenmod/setupwizard/setup/SetupPage.java | 7 -
|
||||
.../cyanogenmod/setupwizard/setup/WelcomePage.java | 14 --
|
||||
.../setupwizard/setup/WifiSetupPage.java | 25 ----
|
||||
.../setupwizard/ui/SetupPageFragment.java | 3 -
|
||||
.../setupwizard/ui/SetupWizardActivity.java | 6 -
|
||||
.../util/EnableAccessibilityController.java | 3 -
|
||||
18 files changed, 1 insertion(+), 411 deletions(-)
|
||||
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index d8c7617..8e2ec08 100644
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -43,7 +43,6 @@
|
||||
<uses-permission android:name="android.permission.BACKUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.LEGALESE" />
|
||||
- <uses-permission android:name="com.cyngn.stats.SEND_ANALYTICS" />
|
||||
<uses-permission android:name="com.cyanogen.permission.REQUEST_KILL_SWITCH_OP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS"/>
|
||||
<uses-permission android:name="cyanogenmod.permission.WRITE_SECURE_SETTINGS"/>
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java b/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
deleted file mode 100644
|
||||
index 6eb527f..0000000
|
||||
--- a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
+++ /dev/null
|
||||
@@ -1,162 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2014 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.cyanogenmod.setupwizard.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.Intent;
|
||||
-import android.os.UserHandle;
|
||||
-import android.util.Log;
|
||||
-
|
||||
-import java.util.LinkedList;
|
||||
-
|
||||
-
|
||||
-public class SetupStats {
|
||||
-
|
||||
- private static final String TAG = SetupStats.class.getSimpleName();
|
||||
-
|
||||
- private static final String ANALYTIC_INTENT = "com.cyngn.stats.action.SEND_ANALYTIC_EVENT";
|
||||
- private static final String ANALYTIC_PERMISSION = "com.cyngn.stats.SEND_ANALYTICS";
|
||||
-
|
||||
- public static final String TRACKING_ID = "tracking_id";
|
||||
-
|
||||
- private final LinkedList<Event> mEvents = new LinkedList<Event>();
|
||||
-
|
||||
- private static final SetupStats sInstance = new SetupStats();
|
||||
-
|
||||
- private static final boolean DEBUG = false;
|
||||
-
|
||||
- private SetupStats() {}
|
||||
-
|
||||
- public static void addEvent(String category, String action,
|
||||
- String label, String value) {
|
||||
- sInstance.mEvents.add(new Event(category, action, label, value));
|
||||
- }
|
||||
-
|
||||
- public static void addEvent(String category, String action) {
|
||||
- sInstance.mEvents.add(new Event(category, action, null, null));
|
||||
- }
|
||||
-
|
||||
- public static void sendEvents(Context context) {
|
||||
- while (!sInstance.mEvents.isEmpty()) {
|
||||
- sInstance.sendEvent(context, sInstance.mEvents.remove());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private void sendEvent(Context context, Event event) {
|
||||
-
|
||||
- if (!StatsUtils.isStatsPackageInstalled(context)
|
||||
- || !StatsUtils.isStatsCollectionEnabled(context)) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Create new intent
|
||||
- Intent intent = new Intent();
|
||||
- intent.setAction(ANALYTIC_INTENT);
|
||||
-
|
||||
- // add tracking id
|
||||
- intent.putExtra(TRACKING_ID, context.getPackageName());
|
||||
- // append
|
||||
- intent.putExtra(Fields.EVENT_CATEGORY, event.category);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_CATEGORY + "=" + event.category);
|
||||
- intent.putExtra(Fields.EVENT_ACTION, event.action);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_ACTION + "=" + event.action);
|
||||
- // check if exist
|
||||
- if (event.label != null) {
|
||||
- intent.putExtra(Fields.EVENT_LABEL, event.label);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_LABEL + "=" + event.label);
|
||||
- }
|
||||
-
|
||||
- if (event.value != null) {
|
||||
- intent.putExtra(Fields.EVENT_VALUE, event.value);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_VALUE + "=" + event.value);
|
||||
- }
|
||||
-
|
||||
- // broadcast for internal package
|
||||
- context.sendBroadcastAsUser(intent,
|
||||
- new UserHandle(UserHandle.USER_CURRENT), ANALYTIC_PERMISSION);
|
||||
- }
|
||||
-
|
||||
- private static final class Event {
|
||||
- private final String category;
|
||||
- private final String action;
|
||||
- private final String label;
|
||||
- private final String value;
|
||||
-
|
||||
- public Event(String category, String action, String label, String value) {
|
||||
- this.action = action;
|
||||
- this.category = category;
|
||||
- this.label = label;
|
||||
- this.value = value;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public static final class Fields {
|
||||
- public static final String EVENT_CATEGORY = "category";
|
||||
- public static final String EVENT_ACTION = "action";
|
||||
- public static final String EVENT_LABEL = "label";
|
||||
- public static final String EVENT_VALUE = "value";
|
||||
- }
|
||||
-
|
||||
- public static final class Categories {
|
||||
- public static final String APP_LAUNCH = "app_launch";
|
||||
- public static final String APP_FINISHED = "app_finish";
|
||||
- public static final String PAGE_LOAD = "page_load";
|
||||
- public static final String EXTERNAL_PAGE_LOAD = "external_page_load";
|
||||
- public static final String BUTTON_CLICK = "button_click";
|
||||
- public static final String SETTING_CHANGED = "setting_changed";
|
||||
- }
|
||||
-
|
||||
- public static final class Action {
|
||||
- public static final String PAGE_LOADED = "page_loaded";
|
||||
- public static final String PREVIOUS_BUTTON = "previous_button";
|
||||
- public static final String NEXT_BUTTON = "next_button";
|
||||
- public static final String CHANGE_LOCALE = "change_local";
|
||||
- public static final String EXTERNAL_PAGE_LAUNCH = "external_page_launch";
|
||||
- public static final String EXTERNAL_PAGE_RESULT = "external_page_result";
|
||||
- public static final String ENABLE_MOBILE_DATA = "enable_mobile_data";
|
||||
- public static final String PREFERRED_DATA_SIM = "preferred_data_sim";
|
||||
- public static final String APPLY_CUSTOM_THEME = "apply_custom_theme";
|
||||
- public static final String USE_SECURE_SMS = "use_secure_sms";
|
||||
- public static final String ENABLE_BACKUP = "enable_backup";
|
||||
- public static final String ENABLE_NAV_KEYS = "enable_nav_keys";
|
||||
- public static final String ENABLE_LOCATION = "enable_location";
|
||||
- public static final String ENABLE_NETWORK_LOCATION = "enable_network_location";
|
||||
- public static final String ENABLE_GPS_LOCATION = "enable_gps_location";
|
||||
- public static final String DATE_CHANGED = "date_changed";
|
||||
- public static final String TIME_CHANGED = "time_changed";
|
||||
- public static final String TIMEZONE_CHANGED = "timezone_changed";
|
||||
- }
|
||||
-
|
||||
- public static final class Label {
|
||||
- public static final String PAGE = "page";
|
||||
- public static final String LOCALE = "local";
|
||||
- public static final String RESULT = "result";
|
||||
- public static final String WIFI_SETUP = "wifi_setup";
|
||||
- public static final String BLUETOOTH_SETUP = "bluetooth_setup";
|
||||
- public static final String CYANOGEN_ACCOUNT = "cyanogen_account_setup";
|
||||
- public static final String CAPTIVE_PORTAL_LOGIN = "captive_portal_login";
|
||||
- public static final String EMERGENCY_CALL = "emergency_call";
|
||||
- public static final String GMS_ACCOUNT = "gms_account";
|
||||
- public static final String RESTORE = "restore";
|
||||
- public static final String CHECKED = "checked";
|
||||
- public static final String VALUE = "value";
|
||||
- public static final String SLOT = "slot";
|
||||
- public static final String TOTAL_TIME = "total_time";
|
||||
- public static final String FINGERPRINT_SETUP = "fingerprint_setup";
|
||||
- }
|
||||
-
|
||||
-}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java b/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
deleted file mode 100644
|
||||
index 8be8fad..0000000
|
||||
--- a/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
+++ /dev/null
|
||||
@@ -1,44 +0,0 @@
|
||||
-
|
||||
-/*
|
||||
- * Copyright (C) 2014 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.cyanogenmod.setupwizard.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.pm.ApplicationInfo;
|
||||
-import android.content.pm.PackageInfo;
|
||||
-import android.content.pm.PackageManager;
|
||||
-
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-public class StatsUtils {
|
||||
- private static final String STATS_PACKAGE = "com.cyngn.stats";
|
||||
-
|
||||
- public static boolean isStatsCollectionEnabled(Context context) {
|
||||
- return CMSettings.Secure.getInt(context.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, 1) != 0;
|
||||
- }
|
||||
-
|
||||
- public static boolean isStatsPackageInstalled(Context context) {
|
||||
- try {
|
||||
- PackageInfo pi = context.getPackageManager().getPackageInfo(STATS_PACKAGE, 0);
|
||||
- return pi.applicationInfo.enabled
|
||||
- && ((pi.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0);
|
||||
- } catch (PackageManager.NameNotFoundException e) {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
index 915abec..8609dbb 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
@@ -28,7 +28,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -91,9 +90,6 @@ public class BluetoothSetupPage extends SetupPage {
|
||||
@Override
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.BLUETOOTH_SETUP, "success");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
return false;
|
||||
@@ -111,9 +107,6 @@ public class BluetoothSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.BLUETOOTH_SETUP);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH, options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
index 255cbad..a3282af 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
@@ -47,7 +47,6 @@ import com.android.internal.telephony.TelephonyIntents;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -356,9 +355,6 @@ public class ChooseDataSimPage extends SetupPage {
|
||||
for (int i = 0; i < mCheckBoxes.size(); i++) {
|
||||
if (subInfoRecord.getSimSlotIndex() == i) {
|
||||
mCheckBoxes.get(i).setChecked(true);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.PREFERRED_DATA_SIM,
|
||||
- SetupStats.Label.SLOT, String.valueOf(i + 1));
|
||||
} else {
|
||||
mCheckBoxes.get(i).setChecked(false);
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
index e71dd79..5bfe3b0 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
@@ -32,7 +32,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -95,10 +94,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN) {
|
||||
if (resultCode == Activity.RESULT_OK || resultCode == Activity.RESULT_FIRST_USER) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT,
|
||||
- resultCode == Activity.RESULT_OK ? "success" : "skipped");
|
||||
if (SetupWizardUtils.accountExists(mContext,
|
||||
mContext.getString(R.string.cm_account_type))) {
|
||||
if (SetupWizardUtils.isDeviceLocked()) {
|
||||
@@ -108,9 +103,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
}
|
||||
getCallbacks().onNextPage();
|
||||
} else if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
}
|
||||
}
|
||||
@@ -136,11 +128,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats
|
||||
- .addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT);
|
||||
mFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN,
|
||||
options.toBundle());
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
index d17d64b..2c95253 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -54,7 +53,6 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
|
||||
public static final String TAG = "CyanogenSettingsPage";
|
||||
|
||||
- public static final String KEY_SEND_METRICS = "send_metrics";
|
||||
public static final String DISABLE_NAV_KEYS = "disable_nav_keys";
|
||||
public static final String KEY_APPLY_DEFAULT_THEME = "apply_default_theme";
|
||||
public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight";
|
||||
@@ -116,37 +114,18 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getData().containsKey(DISABLE_NAV_KEYS)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_NAV_KEYS,
|
||||
- SetupStats.Label.CHECKED,
|
||||
- String.valueOf(getData().getBoolean(DISABLE_NAV_KEYS)));
|
||||
writeDisableNavkeysOption(mContext, getData().getBoolean(DISABLE_NAV_KEYS));
|
||||
}
|
||||
}
|
||||
});
|
||||
- handleEnableMetrics();
|
||||
handleDefaultThemeSetup();
|
||||
}
|
||||
|
||||
- private void handleEnableMetrics() {
|
||||
- Bundle privacyData = getData();
|
||||
- if (privacyData != null
|
||||
- && privacyData.containsKey(KEY_SEND_METRICS)) {
|
||||
- CMSettings.Secure.putInt(mContext.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, privacyData.getBoolean(KEY_SEND_METRICS)
|
||||
- ? 1 : 0);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private void handleDefaultThemeSetup() {
|
||||
Bundle privacyData = getData();
|
||||
if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals(
|
||||
ThemeConfig.SYSTEM_DEFAULT) && privacyData != null &&
|
||||
privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.APPLY_CUSTOM_THEME,
|
||||
- SetupStats.Label.CHECKED,
|
||||
- String.valueOf(privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)));
|
||||
Log.i(TAG, "Applying default theme");
|
||||
final ThemeManager tm = ThemeManager.getInstance(mContext);
|
||||
tm.applyDefaultTheme();
|
||||
@@ -176,26 +155,14 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
private View mKillSwitchView;
|
||||
private TextView mKillSwitchTitle;
|
||||
private ImageView mKillSwitchStatus;
|
||||
- private View mMetricsRow;
|
||||
private View mDefaultThemeRow;
|
||||
private View mNavKeysRow;
|
||||
- private CheckBox mMetrics;
|
||||
private CheckBox mDefaultTheme;
|
||||
private CheckBox mNavKeys;
|
||||
|
||||
private boolean mHideNavKeysRow = false;
|
||||
private boolean mHideThemeRow = false;
|
||||
|
||||
-
|
||||
- private View.OnClickListener mMetricsClickListener = new View.OnClickListener() {
|
||||
- @Override
|
||||
- public void onClick(View view) {
|
||||
- boolean checked = !mMetrics.isChecked();
|
||||
- mMetrics.setChecked(checked);
|
||||
- mPage.getData().putBoolean(KEY_SEND_METRICS, checked);
|
||||
- }
|
||||
- };
|
||||
-
|
||||
private View.OnClickListener mDefaultThemeClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -253,19 +220,6 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
}
|
||||
}
|
||||
|
||||
- mMetricsRow = mRootView.findViewById(R.id.metrics);
|
||||
- mMetricsRow.setOnClickListener(mMetricsClickListener);
|
||||
- String metricsHelpImproveCM =
|
||||
- getString(R.string.services_help_improve_cm, getString(R.string.os_name));
|
||||
- String metricsSummary = getString(R.string.services_metrics_label,
|
||||
- metricsHelpImproveCM, getString(R.string.os_name));
|
||||
- final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary);
|
||||
- metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
|
||||
- 0, metricsHelpImproveCM.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
- TextView metrics = (TextView) mRootView.findViewById(R.id.enable_metrics_summary);
|
||||
- metrics.setText(metricsSpan);
|
||||
- mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox);
|
||||
-
|
||||
mDefaultThemeRow = mRootView.findViewById(R.id.theme);
|
||||
mHideThemeRow = hideThemeSwitch(getActivity());
|
||||
if (mHideThemeRow) {
|
||||
@@ -314,19 +268,9 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateDisableNavkeysOption();
|
||||
- updateMetricsOption();
|
||||
updateThemeOption();
|
||||
}
|
||||
|
||||
- private void updateMetricsOption() {
|
||||
- final Bundle myPageBundle = mPage.getData();
|
||||
- boolean metricsChecked =
|
||||
- !myPageBundle.containsKey(KEY_SEND_METRICS) || myPageBundle
|
||||
- .getBoolean(KEY_SEND_METRICS);
|
||||
- mMetrics.setChecked(metricsChecked);
|
||||
- myPageBundle.putBoolean(KEY_SEND_METRICS, metricsChecked);
|
||||
- }
|
||||
-
|
||||
private void updateThemeOption() {
|
||||
if (!mHideThemeRow) {
|
||||
final Bundle myPageBundle = mPage.getData();
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
index 7a5922b..a669163 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.TextView;
|
||||
import android.widget.TimePicker;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
@@ -136,8 +135,6 @@ public class DateTimePage extends SetupPage {
|
||||
mDateView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "date_picker");
|
||||
showDatePicker();
|
||||
}
|
||||
});
|
||||
@@ -145,8 +142,6 @@ public class DateTimePage extends SetupPage {
|
||||
mTimeView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "time_picker");
|
||||
showTimePicker();
|
||||
}
|
||||
});
|
||||
@@ -167,17 +162,11 @@ public class DateTimePage extends SetupPage {
|
||||
final Map<?, ?> map = (Map<?, ?>) adapterView.getItemAtPosition(position);
|
||||
final String tzId = (String) map.get(KEY_ID);
|
||||
if (mCurrentTimeZone != null && !mCurrentTimeZone.getID().equals(tzId)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "timezone_picker");
|
||||
// Update the system timezone value
|
||||
final Activity activity = getActivity();
|
||||
final AlarmManager alarm = (AlarmManager) activity.getSystemService(Context.ALARM_SERVICE);
|
||||
alarm.setTimeZone(tzId);
|
||||
mCurrentTimeZone = TimeZone.getTimeZone(tzId);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.TIMEZONE_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- mCurrentTimeZone.getDisplayName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -232,10 +221,6 @@ public class DateTimePage extends SetupPage {
|
||||
if (activity != null) {
|
||||
setDate(activity, year, month, day);
|
||||
updateTimeAndDateDisplay(activity);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.DATE_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- month+"/"+day+"/"+year);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,10 +230,6 @@ public class DateTimePage extends SetupPage {
|
||||
if (activity != null) {
|
||||
setTime(activity, hourOfDay, minute);
|
||||
updateTimeAndDateDisplay(activity);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.TIME_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- hourOfDay+":"+minute);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
index 890a4f6..c9174c6 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
@@ -28,7 +28,6 @@ import android.widget.TextView;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
|
||||
public class FingerprintSetupPage extends SetupPage {
|
||||
@@ -113,9 +112,6 @@ public class FingerprintSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(getActivity(),
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.FINGERPRINT_SETUP);
|
||||
startActivityForResult(intent, SetupWizardApp.REQUEST_CODE_SETUP_FINGERPRINT,
|
||||
options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
index 9bcce42..64b84da 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
@@ -34,7 +34,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -116,10 +115,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
boolean restorePicker = !data.hasExtra(EXTRA_RESTORE_TOKEN)
|
||||
&& !data.hasExtra(EXTRA_RESTORE_ACCOUNT) &&
|
||||
data.hasExtra(EXTRA_AUTH_ACCOUNT);
|
||||
-
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.GMS_ACCOUNT, "success");
|
||||
launchGmsRestorePage(restorePicker);
|
||||
} else {
|
||||
handleResult(requestCode, resultCode);
|
||||
@@ -140,24 +135,12 @@ public class GmsAccountPage extends SetupPage {
|
||||
|
||||
private void handleResult(int requestCode, int resultCode) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
} else {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "success");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
if (canSkip()) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "skipped");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
getCallbacks().onPreviousPage();
|
||||
@@ -194,9 +177,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.RESTORE);
|
||||
mFragment.startActivityForResult(
|
||||
intent,
|
||||
SetupWizardApp.REQUEST_CODE_RESTORE_GMS, options.toBundle());
|
||||
@@ -240,9 +220,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.GMS_ACCOUNT);
|
||||
mFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle());
|
||||
} catch (OperationCanceledException e) {
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
index 8940fd3..02ee1b6 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
@@ -38,7 +38,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -147,9 +146,6 @@ public class MobileDataPage extends SetupPage {
|
||||
} else {
|
||||
onDataStateReady();
|
||||
}
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_MOBILE_DATA,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
index 0ed17ff..0bea90b 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
@@ -40,7 +40,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -233,9 +232,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
private void onToggleBackup(boolean checked) {
|
||||
try {
|
||||
mBackupManager.setBackupEnabled(checked);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_BACKUP,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
} catch (RemoteException e) {}
|
||||
updateBackupToggle();
|
||||
}
|
||||
@@ -309,9 +305,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleLocationAccess(boolean checked) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
|
||||
if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
|
||||
@@ -321,10 +314,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleBatterySaving(boolean checked) {
|
||||
- /* SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_BATTERY_SAVING_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked)); */
|
||||
-
|
||||
if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_BATTERY_SAVING);
|
||||
} else {
|
||||
@@ -333,11 +322,7 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleNetwork(boolean checked) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_NETWORK_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
-
|
||||
- if (checked) {
|
||||
+ if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);
|
||||
} else {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
index 1a19fb0..9804049 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
@@ -26,7 +26,6 @@ import android.transition.Transition;
|
||||
import android.view.Gravity;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
|
||||
public abstract class SetupPage implements Page {
|
||||
@@ -76,18 +75,12 @@ public abstract class SetupPage implements Page {
|
||||
public void doLoadAction(FragmentManager fragmentManager, int action) {
|
||||
Fragment fragment = getFragment(fragmentManager, action);
|
||||
if (action == Page.ACTION_NEXT) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- SetupStats.Action.NEXT_BUTTON, getKey(),
|
||||
- String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.RIGHT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
.replace(R.id.content,fragment, getKey())
|
||||
.commit();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- SetupStats.Action.PREVIOUS_BUTTON, getKey(),
|
||||
- String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.LEFT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
index e09c2a1..eedb24d 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.Toast;
|
||||
import com.android.internal.telephony.MccTable;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LocalePicker;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -87,7 +86,6 @@ public class WelcomePage extends SetupPage {
|
||||
return true;
|
||||
} else {
|
||||
if (mWelcomeFragment != null) {
|
||||
- mWelcomeFragment.sendLocaleStats();
|
||||
}
|
||||
return super.doNextAction();
|
||||
}
|
||||
@@ -102,10 +100,6 @@ public class WelcomePage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK, SetupStats.Label.EMERGENCY_CALL);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.EMERGENCY_CALL);
|
||||
mContext.startActivity(intent, options.toBundle());
|
||||
return true;
|
||||
}
|
||||
@@ -269,14 +263,6 @@ public class WelcomePage extends SetupPage {
|
||||
return R.layout.setup_welcome_page;
|
||||
}
|
||||
|
||||
- public void sendLocaleStats() {
|
||||
- if (!mCurrentLocale.equals(mInitialLocale)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.CHANGE_LOCALE, SetupStats.Label.LOCALE,
|
||||
- mCurrentLocale.getDisplayName());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
public void fetchAndUpdateSimLocale() {
|
||||
if (mIgnoreSimLocale || isDetached()) {
|
||||
return;
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
index 2d8084a..3a131f7 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
@@ -31,7 +31,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -86,9 +85,6 @@ public class WifiSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.CAPTIVE_PORTAL_LOGIN);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL,
|
||||
options.toBundle());
|
||||
@@ -157,19 +153,10 @@ public class WifiSetupPage extends SetupPage {
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_WIFI) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
} else if (resultCode == Activity.RESULT_OK) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "success");
|
||||
checkForCaptivePortal();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "skipped");
|
||||
getCallbacks().onNextPage();
|
||||
}
|
||||
} else if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL) {
|
||||
@@ -179,20 +166,11 @@ public class WifiSetupPage extends SetupPage {
|
||||
}
|
||||
String token = data.getStringExtra("response_token");
|
||||
if (token != null && !token.equals(mResponseToken)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "token_mismatch");
|
||||
launchWifiSetup();
|
||||
} else {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "canceled");
|
||||
launchWifiSetup();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "success");
|
||||
getCallbacks().onNextPage();
|
||||
}
|
||||
}
|
||||
@@ -256,9 +234,6 @@ public class WifiSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.WIFI_SETUP);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_WIFI, options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
index b0df440..33c61c7 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
@@ -26,7 +26,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.setup.Page;
|
||||
import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks;
|
||||
|
||||
@@ -43,8 +42,6 @@ public abstract class SetupPageFragment extends Fragment {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setRetainInstance(true);
|
||||
- SetupStats.addEvent(SetupStats.Categories.PAGE_LOAD, SetupStats.Action.PAGE_LOADED,
|
||||
- mKey, String.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
index 6005347..05b2939 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
@@ -43,7 +43,6 @@ import android.widget.ProgressBar;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.setup.CMSetupWizardData;
|
||||
import com.cyanogenmod.setupwizard.setup.GmsAccountPage;
|
||||
import com.cyanogenmod.setupwizard.setup.Page;
|
||||
@@ -106,7 +105,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
}
|
||||
});
|
||||
if (sLaunchTime == 0) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.APP_LAUNCH, TAG);
|
||||
sLaunchTime = System.nanoTime();
|
||||
}
|
||||
setContentView(R.layout.setup_main);
|
||||
@@ -381,9 +379,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
@Override
|
||||
public void finishSetup() {
|
||||
if (!mIsFinishing) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG,
|
||||
- SetupStats.Label.TOTAL_TIME, String.valueOf(
|
||||
- System.nanoTime() - sLaunchTime));
|
||||
final SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
|
||||
setupWizardApp.sendStickyBroadcastAsUser(
|
||||
new Intent(SetupWizardApp.ACTION_FINISHED),
|
||||
@@ -471,7 +466,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
}
|
||||
final ThemeManager tm = ThemeManager.getInstance(SetupWizardActivity.this);
|
||||
tm.removeClient(SetupWizardActivity.this);
|
||||
- SetupStats.sendEvents(SetupWizardActivity.this);
|
||||
SetupWizardUtils.disableGMSSetupWizard(SetupWizardActivity.this);
|
||||
final WallpaperManager wallpaperManager =
|
||||
WallpaperManager.getInstance(SetupWizardActivity.this);
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
index 440129b..47d6de5 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
@@ -39,7 +39,6 @@ import android.view.accessibility.AccessibilityManager;
|
||||
import android.view.accessibility.IAccessibilityManager;
|
||||
|
||||
import com.android.internal.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -284,8 +283,6 @@ public class EnableAccessibilityController {
|
||||
// Turn on accessibility mode last.
|
||||
Settings.Secure.putIntForUser(resolver, Settings.Secure.ACCESSIBILITY_ENABLED,
|
||||
1, userId);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- "accessibility_enabled");
|
||||
} else if (keyguardLocked) {
|
||||
try {
|
||||
mAccessibilityManager.temporaryEnableAccessibilityStateUntilKeyguardRemoved(
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,954 +0,0 @@
|
||||
From 4a66cf8f67b5941037ae566db6c74a748a5351a2 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 8 Apr 2016 20:43:21 -0400
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: I4d38768fc22791f9e5085c56a22f94f335526c31
|
||||
---
|
||||
AndroidManifest.xml | 1 -
|
||||
.../setupwizard/cmstats/SetupStats.java | 162 ---------------------
|
||||
.../setupwizard/cmstats/StatsUtils.java | 44 ------
|
||||
.../setupwizard/setup/BluetoothSetupPage.java | 7 -
|
||||
.../setupwizard/setup/ChooseDataSimPage.java | 4 -
|
||||
.../setupwizard/setup/CyanogenServicesPage.java | 13 --
|
||||
.../setupwizard/setup/CyanogenSettingsPage.java | 56 -------
|
||||
.../setupwizard/setup/DateTimePage.java | 19 ---
|
||||
.../setupwizard/setup/FingerprintSetupPage.java | 4 -
|
||||
.../setupwizard/setup/GmsAccountPage.java | 23 ---
|
||||
.../setupwizard/setup/MobileDataPage.java | 4 -
|
||||
.../setupwizard/setup/OtherSettingsPage.java | 17 +--
|
||||
.../cyanogenmod/setupwizard/setup/SetupPage.java | 7 -
|
||||
.../cyanogenmod/setupwizard/setup/WelcomePage.java | 14 --
|
||||
.../setupwizard/setup/WifiSetupPage.java | 25 ----
|
||||
.../setupwizard/ui/SetupPageFragment.java | 3 -
|
||||
.../setupwizard/ui/SetupWizardActivity.java | 6 -
|
||||
.../util/EnableAccessibilityController.java | 3 -
|
||||
18 files changed, 1 insertion(+), 411 deletions(-)
|
||||
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index d8c7617..8e2ec08 100644
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -43,7 +43,6 @@
|
||||
<uses-permission android:name="android.permission.BACKUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.LEGALESE" />
|
||||
- <uses-permission android:name="com.cyngn.stats.SEND_ANALYTICS" />
|
||||
<uses-permission android:name="com.cyanogen.permission.REQUEST_KILL_SWITCH_OP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS"/>
|
||||
<uses-permission android:name="cyanogenmod.permission.WRITE_SECURE_SETTINGS"/>
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java b/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
deleted file mode 100644
|
||||
index 6eb527f..0000000
|
||||
--- a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
+++ /dev/null
|
||||
@@ -1,162 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2014 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.cyanogenmod.setupwizard.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.Intent;
|
||||
-import android.os.UserHandle;
|
||||
-import android.util.Log;
|
||||
-
|
||||
-import java.util.LinkedList;
|
||||
-
|
||||
-
|
||||
-public class SetupStats {
|
||||
-
|
||||
- private static final String TAG = SetupStats.class.getSimpleName();
|
||||
-
|
||||
- private static final String ANALYTIC_INTENT = "com.cyngn.stats.action.SEND_ANALYTIC_EVENT";
|
||||
- private static final String ANALYTIC_PERMISSION = "com.cyngn.stats.SEND_ANALYTICS";
|
||||
-
|
||||
- public static final String TRACKING_ID = "tracking_id";
|
||||
-
|
||||
- private final LinkedList<Event> mEvents = new LinkedList<Event>();
|
||||
-
|
||||
- private static final SetupStats sInstance = new SetupStats();
|
||||
-
|
||||
- private static final boolean DEBUG = false;
|
||||
-
|
||||
- private SetupStats() {}
|
||||
-
|
||||
- public static void addEvent(String category, String action,
|
||||
- String label, String value) {
|
||||
- sInstance.mEvents.add(new Event(category, action, label, value));
|
||||
- }
|
||||
-
|
||||
- public static void addEvent(String category, String action) {
|
||||
- sInstance.mEvents.add(new Event(category, action, null, null));
|
||||
- }
|
||||
-
|
||||
- public static void sendEvents(Context context) {
|
||||
- while (!sInstance.mEvents.isEmpty()) {
|
||||
- sInstance.sendEvent(context, sInstance.mEvents.remove());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private void sendEvent(Context context, Event event) {
|
||||
-
|
||||
- if (!StatsUtils.isStatsPackageInstalled(context)
|
||||
- || !StatsUtils.isStatsCollectionEnabled(context)) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Create new intent
|
||||
- Intent intent = new Intent();
|
||||
- intent.setAction(ANALYTIC_INTENT);
|
||||
-
|
||||
- // add tracking id
|
||||
- intent.putExtra(TRACKING_ID, context.getPackageName());
|
||||
- // append
|
||||
- intent.putExtra(Fields.EVENT_CATEGORY, event.category);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_CATEGORY + "=" + event.category);
|
||||
- intent.putExtra(Fields.EVENT_ACTION, event.action);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_ACTION + "=" + event.action);
|
||||
- // check if exist
|
||||
- if (event.label != null) {
|
||||
- intent.putExtra(Fields.EVENT_LABEL, event.label);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_LABEL + "=" + event.label);
|
||||
- }
|
||||
-
|
||||
- if (event.value != null) {
|
||||
- intent.putExtra(Fields.EVENT_VALUE, event.value);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_VALUE + "=" + event.value);
|
||||
- }
|
||||
-
|
||||
- // broadcast for internal package
|
||||
- context.sendBroadcastAsUser(intent,
|
||||
- new UserHandle(UserHandle.USER_CURRENT), ANALYTIC_PERMISSION);
|
||||
- }
|
||||
-
|
||||
- private static final class Event {
|
||||
- private final String category;
|
||||
- private final String action;
|
||||
- private final String label;
|
||||
- private final String value;
|
||||
-
|
||||
- public Event(String category, String action, String label, String value) {
|
||||
- this.action = action;
|
||||
- this.category = category;
|
||||
- this.label = label;
|
||||
- this.value = value;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public static final class Fields {
|
||||
- public static final String EVENT_CATEGORY = "category";
|
||||
- public static final String EVENT_ACTION = "action";
|
||||
- public static final String EVENT_LABEL = "label";
|
||||
- public static final String EVENT_VALUE = "value";
|
||||
- }
|
||||
-
|
||||
- public static final class Categories {
|
||||
- public static final String APP_LAUNCH = "app_launch";
|
||||
- public static final String APP_FINISHED = "app_finish";
|
||||
- public static final String PAGE_LOAD = "page_load";
|
||||
- public static final String EXTERNAL_PAGE_LOAD = "external_page_load";
|
||||
- public static final String BUTTON_CLICK = "button_click";
|
||||
- public static final String SETTING_CHANGED = "setting_changed";
|
||||
- }
|
||||
-
|
||||
- public static final class Action {
|
||||
- public static final String PAGE_LOADED = "page_loaded";
|
||||
- public static final String PREVIOUS_BUTTON = "previous_button";
|
||||
- public static final String NEXT_BUTTON = "next_button";
|
||||
- public static final String CHANGE_LOCALE = "change_local";
|
||||
- public static final String EXTERNAL_PAGE_LAUNCH = "external_page_launch";
|
||||
- public static final String EXTERNAL_PAGE_RESULT = "external_page_result";
|
||||
- public static final String ENABLE_MOBILE_DATA = "enable_mobile_data";
|
||||
- public static final String PREFERRED_DATA_SIM = "preferred_data_sim";
|
||||
- public static final String APPLY_CUSTOM_THEME = "apply_custom_theme";
|
||||
- public static final String USE_SECURE_SMS = "use_secure_sms";
|
||||
- public static final String ENABLE_BACKUP = "enable_backup";
|
||||
- public static final String ENABLE_NAV_KEYS = "enable_nav_keys";
|
||||
- public static final String ENABLE_LOCATION = "enable_location";
|
||||
- public static final String ENABLE_NETWORK_LOCATION = "enable_network_location";
|
||||
- public static final String ENABLE_GPS_LOCATION = "enable_gps_location";
|
||||
- public static final String DATE_CHANGED = "date_changed";
|
||||
- public static final String TIME_CHANGED = "time_changed";
|
||||
- public static final String TIMEZONE_CHANGED = "timezone_changed";
|
||||
- }
|
||||
-
|
||||
- public static final class Label {
|
||||
- public static final String PAGE = "page";
|
||||
- public static final String LOCALE = "local";
|
||||
- public static final String RESULT = "result";
|
||||
- public static final String WIFI_SETUP = "wifi_setup";
|
||||
- public static final String BLUETOOTH_SETUP = "bluetooth_setup";
|
||||
- public static final String CYANOGEN_ACCOUNT = "cyanogen_account_setup";
|
||||
- public static final String CAPTIVE_PORTAL_LOGIN = "captive_portal_login";
|
||||
- public static final String EMERGENCY_CALL = "emergency_call";
|
||||
- public static final String GMS_ACCOUNT = "gms_account";
|
||||
- public static final String RESTORE = "restore";
|
||||
- public static final String CHECKED = "checked";
|
||||
- public static final String VALUE = "value";
|
||||
- public static final String SLOT = "slot";
|
||||
- public static final String TOTAL_TIME = "total_time";
|
||||
- public static final String FINGERPRINT_SETUP = "fingerprint_setup";
|
||||
- }
|
||||
-
|
||||
-}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java b/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
deleted file mode 100644
|
||||
index 8be8fad..0000000
|
||||
--- a/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
+++ /dev/null
|
||||
@@ -1,44 +0,0 @@
|
||||
-
|
||||
-/*
|
||||
- * Copyright (C) 2014 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.cyanogenmod.setupwizard.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.pm.ApplicationInfo;
|
||||
-import android.content.pm.PackageInfo;
|
||||
-import android.content.pm.PackageManager;
|
||||
-
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-public class StatsUtils {
|
||||
- private static final String STATS_PACKAGE = "com.cyngn.stats";
|
||||
-
|
||||
- public static boolean isStatsCollectionEnabled(Context context) {
|
||||
- return CMSettings.Secure.getInt(context.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, 1) != 0;
|
||||
- }
|
||||
-
|
||||
- public static boolean isStatsPackageInstalled(Context context) {
|
||||
- try {
|
||||
- PackageInfo pi = context.getPackageManager().getPackageInfo(STATS_PACKAGE, 0);
|
||||
- return pi.applicationInfo.enabled
|
||||
- && ((pi.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0);
|
||||
- } catch (PackageManager.NameNotFoundException e) {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
index 915abec..8609dbb 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
@@ -28,7 +28,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -91,9 +90,6 @@ public class BluetoothSetupPage extends SetupPage {
|
||||
@Override
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.BLUETOOTH_SETUP, "success");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
return false;
|
||||
@@ -111,9 +107,6 @@ public class BluetoothSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.BLUETOOTH_SETUP);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH, options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
index a0a4312..42e7ea2 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
@@ -47,7 +47,6 @@ import com.android.internal.telephony.TelephonyIntents;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -356,9 +355,6 @@ public class ChooseDataSimPage extends SetupPage {
|
||||
for (int i = 0; i < mCheckBoxes.size(); i++) {
|
||||
if (subInfoRecord.getSimSlotIndex() == i) {
|
||||
mCheckBoxes.get(i).setChecked(true);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.PREFERRED_DATA_SIM,
|
||||
- SetupStats.Label.SLOT, String.valueOf(i + 1));
|
||||
} else {
|
||||
mCheckBoxes.get(i).setChecked(false);
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
index e71dd79..5bfe3b0 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
@@ -32,7 +32,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -95,10 +94,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN) {
|
||||
if (resultCode == Activity.RESULT_OK || resultCode == Activity.RESULT_FIRST_USER) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT,
|
||||
- resultCode == Activity.RESULT_OK ? "success" : "skipped");
|
||||
if (SetupWizardUtils.accountExists(mContext,
|
||||
mContext.getString(R.string.cm_account_type))) {
|
||||
if (SetupWizardUtils.isDeviceLocked()) {
|
||||
@@ -108,9 +103,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
}
|
||||
getCallbacks().onNextPage();
|
||||
} else if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
}
|
||||
}
|
||||
@@ -136,11 +128,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats
|
||||
- .addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT);
|
||||
mFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN,
|
||||
options.toBundle());
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
index d17d64b..2c95253 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -54,7 +53,6 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
|
||||
public static final String TAG = "CyanogenSettingsPage";
|
||||
|
||||
- public static final String KEY_SEND_METRICS = "send_metrics";
|
||||
public static final String DISABLE_NAV_KEYS = "disable_nav_keys";
|
||||
public static final String KEY_APPLY_DEFAULT_THEME = "apply_default_theme";
|
||||
public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight";
|
||||
@@ -116,37 +114,18 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getData().containsKey(DISABLE_NAV_KEYS)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_NAV_KEYS,
|
||||
- SetupStats.Label.CHECKED,
|
||||
- String.valueOf(getData().getBoolean(DISABLE_NAV_KEYS)));
|
||||
writeDisableNavkeysOption(mContext, getData().getBoolean(DISABLE_NAV_KEYS));
|
||||
}
|
||||
}
|
||||
});
|
||||
- handleEnableMetrics();
|
||||
handleDefaultThemeSetup();
|
||||
}
|
||||
|
||||
- private void handleEnableMetrics() {
|
||||
- Bundle privacyData = getData();
|
||||
- if (privacyData != null
|
||||
- && privacyData.containsKey(KEY_SEND_METRICS)) {
|
||||
- CMSettings.Secure.putInt(mContext.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, privacyData.getBoolean(KEY_SEND_METRICS)
|
||||
- ? 1 : 0);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private void handleDefaultThemeSetup() {
|
||||
Bundle privacyData = getData();
|
||||
if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals(
|
||||
ThemeConfig.SYSTEM_DEFAULT) && privacyData != null &&
|
||||
privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.APPLY_CUSTOM_THEME,
|
||||
- SetupStats.Label.CHECKED,
|
||||
- String.valueOf(privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)));
|
||||
Log.i(TAG, "Applying default theme");
|
||||
final ThemeManager tm = ThemeManager.getInstance(mContext);
|
||||
tm.applyDefaultTheme();
|
||||
@@ -176,26 +155,14 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
private View mKillSwitchView;
|
||||
private TextView mKillSwitchTitle;
|
||||
private ImageView mKillSwitchStatus;
|
||||
- private View mMetricsRow;
|
||||
private View mDefaultThemeRow;
|
||||
private View mNavKeysRow;
|
||||
- private CheckBox mMetrics;
|
||||
private CheckBox mDefaultTheme;
|
||||
private CheckBox mNavKeys;
|
||||
|
||||
private boolean mHideNavKeysRow = false;
|
||||
private boolean mHideThemeRow = false;
|
||||
|
||||
-
|
||||
- private View.OnClickListener mMetricsClickListener = new View.OnClickListener() {
|
||||
- @Override
|
||||
- public void onClick(View view) {
|
||||
- boolean checked = !mMetrics.isChecked();
|
||||
- mMetrics.setChecked(checked);
|
||||
- mPage.getData().putBoolean(KEY_SEND_METRICS, checked);
|
||||
- }
|
||||
- };
|
||||
-
|
||||
private View.OnClickListener mDefaultThemeClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -253,19 +220,6 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
}
|
||||
}
|
||||
|
||||
- mMetricsRow = mRootView.findViewById(R.id.metrics);
|
||||
- mMetricsRow.setOnClickListener(mMetricsClickListener);
|
||||
- String metricsHelpImproveCM =
|
||||
- getString(R.string.services_help_improve_cm, getString(R.string.os_name));
|
||||
- String metricsSummary = getString(R.string.services_metrics_label,
|
||||
- metricsHelpImproveCM, getString(R.string.os_name));
|
||||
- final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary);
|
||||
- metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
|
||||
- 0, metricsHelpImproveCM.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
- TextView metrics = (TextView) mRootView.findViewById(R.id.enable_metrics_summary);
|
||||
- metrics.setText(metricsSpan);
|
||||
- mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox);
|
||||
-
|
||||
mDefaultThemeRow = mRootView.findViewById(R.id.theme);
|
||||
mHideThemeRow = hideThemeSwitch(getActivity());
|
||||
if (mHideThemeRow) {
|
||||
@@ -314,19 +268,9 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateDisableNavkeysOption();
|
||||
- updateMetricsOption();
|
||||
updateThemeOption();
|
||||
}
|
||||
|
||||
- private void updateMetricsOption() {
|
||||
- final Bundle myPageBundle = mPage.getData();
|
||||
- boolean metricsChecked =
|
||||
- !myPageBundle.containsKey(KEY_SEND_METRICS) || myPageBundle
|
||||
- .getBoolean(KEY_SEND_METRICS);
|
||||
- mMetrics.setChecked(metricsChecked);
|
||||
- myPageBundle.putBoolean(KEY_SEND_METRICS, metricsChecked);
|
||||
- }
|
||||
-
|
||||
private void updateThemeOption() {
|
||||
if (!mHideThemeRow) {
|
||||
final Bundle myPageBundle = mPage.getData();
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
index 7a5922b..a669163 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.TextView;
|
||||
import android.widget.TimePicker;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
@@ -136,8 +135,6 @@ public class DateTimePage extends SetupPage {
|
||||
mDateView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "date_picker");
|
||||
showDatePicker();
|
||||
}
|
||||
});
|
||||
@@ -145,8 +142,6 @@ public class DateTimePage extends SetupPage {
|
||||
mTimeView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "time_picker");
|
||||
showTimePicker();
|
||||
}
|
||||
});
|
||||
@@ -167,17 +162,11 @@ public class DateTimePage extends SetupPage {
|
||||
final Map<?, ?> map = (Map<?, ?>) adapterView.getItemAtPosition(position);
|
||||
final String tzId = (String) map.get(KEY_ID);
|
||||
if (mCurrentTimeZone != null && !mCurrentTimeZone.getID().equals(tzId)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "timezone_picker");
|
||||
// Update the system timezone value
|
||||
final Activity activity = getActivity();
|
||||
final AlarmManager alarm = (AlarmManager) activity.getSystemService(Context.ALARM_SERVICE);
|
||||
alarm.setTimeZone(tzId);
|
||||
mCurrentTimeZone = TimeZone.getTimeZone(tzId);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.TIMEZONE_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- mCurrentTimeZone.getDisplayName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -232,10 +221,6 @@ public class DateTimePage extends SetupPage {
|
||||
if (activity != null) {
|
||||
setDate(activity, year, month, day);
|
||||
updateTimeAndDateDisplay(activity);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.DATE_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- month+"/"+day+"/"+year);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,10 +230,6 @@ public class DateTimePage extends SetupPage {
|
||||
if (activity != null) {
|
||||
setTime(activity, hourOfDay, minute);
|
||||
updateTimeAndDateDisplay(activity);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.TIME_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- hourOfDay+":"+minute);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
index 890a4f6..c9174c6 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
@@ -28,7 +28,6 @@ import android.widget.TextView;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
|
||||
public class FingerprintSetupPage extends SetupPage {
|
||||
@@ -113,9 +112,6 @@ public class FingerprintSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(getActivity(),
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.FINGERPRINT_SETUP);
|
||||
startActivityForResult(intent, SetupWizardApp.REQUEST_CODE_SETUP_FINGERPRINT,
|
||||
options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
index eebf3f5..1de9c82 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
@@ -34,7 +34,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -138,10 +137,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
boolean restorePicker = !data.hasExtra(EXTRA_RESTORE_TOKEN)
|
||||
&& !data.hasExtra(EXTRA_RESTORE_ACCOUNT) &&
|
||||
data.hasExtra(EXTRA_AUTH_ACCOUNT);
|
||||
-
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.GMS_ACCOUNT, "success");
|
||||
launchGmsRestorePage(restorePicker);
|
||||
} else {
|
||||
handleResult(requestCode, resultCode);
|
||||
@@ -169,24 +164,12 @@ public class GmsAccountPage extends SetupPage {
|
||||
|
||||
private void handleResult(int requestCode, int resultCode) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
} else {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "success");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
if (canSkip()) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "skipped");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
getCallbacks().onPreviousPage();
|
||||
@@ -226,9 +209,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.RESTORE);
|
||||
mFragment.startActivityForResult(
|
||||
intent,
|
||||
SetupWizardApp.REQUEST_CODE_RESTORE_GMS, options.toBundle());
|
||||
@@ -275,9 +255,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.GMS_ACCOUNT);
|
||||
mFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle());
|
||||
} catch (OperationCanceledException e) {
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
index da3872e..36d9ad5 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
@@ -38,7 +38,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -147,9 +146,6 @@ public class MobileDataPage extends SetupPage {
|
||||
} else {
|
||||
onDataStateReady();
|
||||
}
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_MOBILE_DATA,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
index 0ed17ff..0bea90b 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
@@ -40,7 +40,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -233,9 +232,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
private void onToggleBackup(boolean checked) {
|
||||
try {
|
||||
mBackupManager.setBackupEnabled(checked);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_BACKUP,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
} catch (RemoteException e) {}
|
||||
updateBackupToggle();
|
||||
}
|
||||
@@ -309,9 +305,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleLocationAccess(boolean checked) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
|
||||
if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
|
||||
@@ -321,10 +314,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleBatterySaving(boolean checked) {
|
||||
- /* SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_BATTERY_SAVING_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked)); */
|
||||
-
|
||||
if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_BATTERY_SAVING);
|
||||
} else {
|
||||
@@ -333,11 +322,7 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleNetwork(boolean checked) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_NETWORK_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
-
|
||||
- if (checked) {
|
||||
+ if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);
|
||||
} else {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
index 1a19fb0..9804049 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
@@ -26,7 +26,6 @@ import android.transition.Transition;
|
||||
import android.view.Gravity;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
|
||||
public abstract class SetupPage implements Page {
|
||||
@@ -76,18 +75,12 @@ public abstract class SetupPage implements Page {
|
||||
public void doLoadAction(FragmentManager fragmentManager, int action) {
|
||||
Fragment fragment = getFragment(fragmentManager, action);
|
||||
if (action == Page.ACTION_NEXT) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- SetupStats.Action.NEXT_BUTTON, getKey(),
|
||||
- String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.RIGHT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
.replace(R.id.content,fragment, getKey())
|
||||
.commit();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- SetupStats.Action.PREVIOUS_BUTTON, getKey(),
|
||||
- String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.LEFT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
index e09c2a1..eedb24d 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.Toast;
|
||||
import com.android.internal.telephony.MccTable;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LocalePicker;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -87,7 +86,6 @@ public class WelcomePage extends SetupPage {
|
||||
return true;
|
||||
} else {
|
||||
if (mWelcomeFragment != null) {
|
||||
- mWelcomeFragment.sendLocaleStats();
|
||||
}
|
||||
return super.doNextAction();
|
||||
}
|
||||
@@ -102,10 +100,6 @@ public class WelcomePage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK, SetupStats.Label.EMERGENCY_CALL);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.EMERGENCY_CALL);
|
||||
mContext.startActivity(intent, options.toBundle());
|
||||
return true;
|
||||
}
|
||||
@@ -269,14 +263,6 @@ public class WelcomePage extends SetupPage {
|
||||
return R.layout.setup_welcome_page;
|
||||
}
|
||||
|
||||
- public void sendLocaleStats() {
|
||||
- if (!mCurrentLocale.equals(mInitialLocale)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.CHANGE_LOCALE, SetupStats.Label.LOCALE,
|
||||
- mCurrentLocale.getDisplayName());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
public void fetchAndUpdateSimLocale() {
|
||||
if (mIgnoreSimLocale || isDetached()) {
|
||||
return;
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
index 2d8084a..3a131f7 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
@@ -31,7 +31,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -86,9 +85,6 @@ public class WifiSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.CAPTIVE_PORTAL_LOGIN);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL,
|
||||
options.toBundle());
|
||||
@@ -157,19 +153,10 @@ public class WifiSetupPage extends SetupPage {
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_WIFI) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
} else if (resultCode == Activity.RESULT_OK) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "success");
|
||||
checkForCaptivePortal();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "skipped");
|
||||
getCallbacks().onNextPage();
|
||||
}
|
||||
} else if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL) {
|
||||
@@ -179,20 +166,11 @@ public class WifiSetupPage extends SetupPage {
|
||||
}
|
||||
String token = data.getStringExtra("response_token");
|
||||
if (token != null && !token.equals(mResponseToken)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "token_mismatch");
|
||||
launchWifiSetup();
|
||||
} else {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "canceled");
|
||||
launchWifiSetup();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "success");
|
||||
getCallbacks().onNextPage();
|
||||
}
|
||||
}
|
||||
@@ -256,9 +234,6 @@ public class WifiSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.WIFI_SETUP);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_WIFI, options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
index b0df440..33c61c7 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
@@ -26,7 +26,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.setup.Page;
|
||||
import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks;
|
||||
|
||||
@@ -43,8 +42,6 @@ public abstract class SetupPageFragment extends Fragment {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setRetainInstance(true);
|
||||
- SetupStats.addEvent(SetupStats.Categories.PAGE_LOAD, SetupStats.Action.PAGE_LOADED,
|
||||
- mKey, String.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
index 7ba58e0..68255c4 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
@@ -44,7 +44,6 @@ import android.widget.ProgressBar;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.setup.CMSetupWizardData;
|
||||
import com.cyanogenmod.setupwizard.setup.GmsAccountPage;
|
||||
import com.cyanogenmod.setupwizard.setup.Page;
|
||||
@@ -108,7 +107,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
}
|
||||
});
|
||||
if (sLaunchTime == 0) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.APP_LAUNCH, TAG);
|
||||
sLaunchTime = System.nanoTime();
|
||||
}
|
||||
setContentView(R.layout.setup_main);
|
||||
@@ -387,9 +385,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
@Override
|
||||
public void finishSetup() {
|
||||
if (!mIsFinishing) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG,
|
||||
- SetupStats.Label.TOTAL_TIME, String.valueOf(
|
||||
- System.nanoTime() - sLaunchTime));
|
||||
final SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
|
||||
setupWizardApp.sendStickyBroadcastAsUser(
|
||||
new Intent(SetupWizardApp.ACTION_FINISHED),
|
||||
@@ -479,7 +474,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
}
|
||||
final ThemeManager tm = ThemeManager.getInstance(SetupWizardActivity.this);
|
||||
tm.unregisterThemeChangeListener(SetupWizardActivity.this);
|
||||
- SetupStats.sendEvents(SetupWizardActivity.this);
|
||||
SetupWizardUtils.disableGMSSetupWizard(SetupWizardActivity.this);
|
||||
final WallpaperManager wallpaperManager =
|
||||
WallpaperManager.getInstance(SetupWizardActivity.this);
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
index 440129b..47d6de5 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
@@ -39,7 +39,6 @@ import android.view.accessibility.AccessibilityManager;
|
||||
import android.view.accessibility.IAccessibilityManager;
|
||||
|
||||
import com.android.internal.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -284,8 +283,6 @@ public class EnableAccessibilityController {
|
||||
// Turn on accessibility mode last.
|
||||
Settings.Secure.putIntForUser(resolver, Settings.Secure.ACCESSIBILITY_ENABLED,
|
||||
1, userId);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- "accessibility_enabled");
|
||||
} else if (keyguardLocked) {
|
||||
try {
|
||||
mAccessibilityManager.temporaryEnableAccessibilityStateUntilKeyguardRemoved(
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,944 +0,0 @@
|
||||
From 149226a0a45a4a65447c4059b6e199dbc345bfde Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 28 Apr 2016 00:22:37 -0400
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: I1c9a4267c948013a9cd900cf046ed450d945ab4c
|
||||
---
|
||||
AndroidManifest.xml | 1 -
|
||||
.../setupwizard/cmstats/SetupStats.java | 162 ---------------------
|
||||
.../setupwizard/cmstats/StatsUtils.java | 44 ------
|
||||
.../setupwizard/setup/BluetoothSetupPage.java | 7 -
|
||||
.../setupwizard/setup/ChooseDataSimPage.java | 4 -
|
||||
.../setupwizard/setup/CyanogenServicesPage.java | 13 --
|
||||
.../setupwizard/setup/CyanogenSettingsPage.java | 56 -------
|
||||
.../setupwizard/setup/DateTimePage.java | 19 ---
|
||||
.../setupwizard/setup/FingerprintSetupPage.java | 4 -
|
||||
.../setupwizard/setup/GmsAccountPage.java | 23 ---
|
||||
.../setupwizard/setup/MobileDataPage.java | 4 -
|
||||
.../setupwizard/setup/OtherSettingsPage.java | 14 +-
|
||||
.../cyanogenmod/setupwizard/setup/SetupPage.java | 7 -
|
||||
.../cyanogenmod/setupwizard/setup/WelcomePage.java | 14 --
|
||||
.../setupwizard/setup/WifiSetupPage.java | 25 ----
|
||||
.../setupwizard/ui/SetupPageFragment.java | 3 -
|
||||
.../setupwizard/ui/SetupWizardActivity.java | 6 -
|
||||
.../util/EnableAccessibilityController.java | 3 -
|
||||
18 files changed, 1 insertion(+), 408 deletions(-)
|
||||
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
|
||||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index d8c7617..8e2ec08 100644
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -43,7 +43,6 @@
|
||||
<uses-permission android:name="android.permission.BACKUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.LEGALESE" />
|
||||
- <uses-permission android:name="com.cyngn.stats.SEND_ANALYTICS" />
|
||||
<uses-permission android:name="com.cyanogen.permission.REQUEST_KILL_SWITCH_OP" />
|
||||
<uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS"/>
|
||||
<uses-permission android:name="cyanogenmod.permission.WRITE_SECURE_SETTINGS"/>
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java b/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
deleted file mode 100644
|
||||
index 6eb527f..0000000
|
||||
--- a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
|
||||
+++ /dev/null
|
||||
@@ -1,162 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2014 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.cyanogenmod.setupwizard.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.Intent;
|
||||
-import android.os.UserHandle;
|
||||
-import android.util.Log;
|
||||
-
|
||||
-import java.util.LinkedList;
|
||||
-
|
||||
-
|
||||
-public class SetupStats {
|
||||
-
|
||||
- private static final String TAG = SetupStats.class.getSimpleName();
|
||||
-
|
||||
- private static final String ANALYTIC_INTENT = "com.cyngn.stats.action.SEND_ANALYTIC_EVENT";
|
||||
- private static final String ANALYTIC_PERMISSION = "com.cyngn.stats.SEND_ANALYTICS";
|
||||
-
|
||||
- public static final String TRACKING_ID = "tracking_id";
|
||||
-
|
||||
- private final LinkedList<Event> mEvents = new LinkedList<Event>();
|
||||
-
|
||||
- private static final SetupStats sInstance = new SetupStats();
|
||||
-
|
||||
- private static final boolean DEBUG = false;
|
||||
-
|
||||
- private SetupStats() {}
|
||||
-
|
||||
- public static void addEvent(String category, String action,
|
||||
- String label, String value) {
|
||||
- sInstance.mEvents.add(new Event(category, action, label, value));
|
||||
- }
|
||||
-
|
||||
- public static void addEvent(String category, String action) {
|
||||
- sInstance.mEvents.add(new Event(category, action, null, null));
|
||||
- }
|
||||
-
|
||||
- public static void sendEvents(Context context) {
|
||||
- while (!sInstance.mEvents.isEmpty()) {
|
||||
- sInstance.sendEvent(context, sInstance.mEvents.remove());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private void sendEvent(Context context, Event event) {
|
||||
-
|
||||
- if (!StatsUtils.isStatsPackageInstalled(context)
|
||||
- || !StatsUtils.isStatsCollectionEnabled(context)) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Create new intent
|
||||
- Intent intent = new Intent();
|
||||
- intent.setAction(ANALYTIC_INTENT);
|
||||
-
|
||||
- // add tracking id
|
||||
- intent.putExtra(TRACKING_ID, context.getPackageName());
|
||||
- // append
|
||||
- intent.putExtra(Fields.EVENT_CATEGORY, event.category);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_CATEGORY + "=" + event.category);
|
||||
- intent.putExtra(Fields.EVENT_ACTION, event.action);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_ACTION + "=" + event.action);
|
||||
- // check if exist
|
||||
- if (event.label != null) {
|
||||
- intent.putExtra(Fields.EVENT_LABEL, event.label);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_LABEL + "=" + event.label);
|
||||
- }
|
||||
-
|
||||
- if (event.value != null) {
|
||||
- intent.putExtra(Fields.EVENT_VALUE, event.value);
|
||||
- if (DEBUG) Log.d(TAG, Fields.EVENT_VALUE + "=" + event.value);
|
||||
- }
|
||||
-
|
||||
- // broadcast for internal package
|
||||
- context.sendBroadcastAsUser(intent,
|
||||
- new UserHandle(UserHandle.USER_CURRENT), ANALYTIC_PERMISSION);
|
||||
- }
|
||||
-
|
||||
- private static final class Event {
|
||||
- private final String category;
|
||||
- private final String action;
|
||||
- private final String label;
|
||||
- private final String value;
|
||||
-
|
||||
- public Event(String category, String action, String label, String value) {
|
||||
- this.action = action;
|
||||
- this.category = category;
|
||||
- this.label = label;
|
||||
- this.value = value;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public static final class Fields {
|
||||
- public static final String EVENT_CATEGORY = "category";
|
||||
- public static final String EVENT_ACTION = "action";
|
||||
- public static final String EVENT_LABEL = "label";
|
||||
- public static final String EVENT_VALUE = "value";
|
||||
- }
|
||||
-
|
||||
- public static final class Categories {
|
||||
- public static final String APP_LAUNCH = "app_launch";
|
||||
- public static final String APP_FINISHED = "app_finish";
|
||||
- public static final String PAGE_LOAD = "page_load";
|
||||
- public static final String EXTERNAL_PAGE_LOAD = "external_page_load";
|
||||
- public static final String BUTTON_CLICK = "button_click";
|
||||
- public static final String SETTING_CHANGED = "setting_changed";
|
||||
- }
|
||||
-
|
||||
- public static final class Action {
|
||||
- public static final String PAGE_LOADED = "page_loaded";
|
||||
- public static final String PREVIOUS_BUTTON = "previous_button";
|
||||
- public static final String NEXT_BUTTON = "next_button";
|
||||
- public static final String CHANGE_LOCALE = "change_local";
|
||||
- public static final String EXTERNAL_PAGE_LAUNCH = "external_page_launch";
|
||||
- public static final String EXTERNAL_PAGE_RESULT = "external_page_result";
|
||||
- public static final String ENABLE_MOBILE_DATA = "enable_mobile_data";
|
||||
- public static final String PREFERRED_DATA_SIM = "preferred_data_sim";
|
||||
- public static final String APPLY_CUSTOM_THEME = "apply_custom_theme";
|
||||
- public static final String USE_SECURE_SMS = "use_secure_sms";
|
||||
- public static final String ENABLE_BACKUP = "enable_backup";
|
||||
- public static final String ENABLE_NAV_KEYS = "enable_nav_keys";
|
||||
- public static final String ENABLE_LOCATION = "enable_location";
|
||||
- public static final String ENABLE_NETWORK_LOCATION = "enable_network_location";
|
||||
- public static final String ENABLE_GPS_LOCATION = "enable_gps_location";
|
||||
- public static final String DATE_CHANGED = "date_changed";
|
||||
- public static final String TIME_CHANGED = "time_changed";
|
||||
- public static final String TIMEZONE_CHANGED = "timezone_changed";
|
||||
- }
|
||||
-
|
||||
- public static final class Label {
|
||||
- public static final String PAGE = "page";
|
||||
- public static final String LOCALE = "local";
|
||||
- public static final String RESULT = "result";
|
||||
- public static final String WIFI_SETUP = "wifi_setup";
|
||||
- public static final String BLUETOOTH_SETUP = "bluetooth_setup";
|
||||
- public static final String CYANOGEN_ACCOUNT = "cyanogen_account_setup";
|
||||
- public static final String CAPTIVE_PORTAL_LOGIN = "captive_portal_login";
|
||||
- public static final String EMERGENCY_CALL = "emergency_call";
|
||||
- public static final String GMS_ACCOUNT = "gms_account";
|
||||
- public static final String RESTORE = "restore";
|
||||
- public static final String CHECKED = "checked";
|
||||
- public static final String VALUE = "value";
|
||||
- public static final String SLOT = "slot";
|
||||
- public static final String TOTAL_TIME = "total_time";
|
||||
- public static final String FINGERPRINT_SETUP = "fingerprint_setup";
|
||||
- }
|
||||
-
|
||||
-}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java b/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
deleted file mode 100644
|
||||
index 8be8fad..0000000
|
||||
--- a/src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
|
||||
+++ /dev/null
|
||||
@@ -1,44 +0,0 @@
|
||||
-
|
||||
-/*
|
||||
- * Copyright (C) 2014 The CyanogenMod Project
|
||||
- *
|
||||
- * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
- * you may not use this file except in compliance with the License.
|
||||
- * You may obtain a copy of the License at
|
||||
- *
|
||||
- * http://www.apache.org/licenses/LICENSE-2.0
|
||||
- *
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
- * See the License for the specific language governing permissions and
|
||||
- * limitations under the License.
|
||||
- */
|
||||
-
|
||||
-package com.cyanogenmod.setupwizard.cmstats;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.content.pm.ApplicationInfo;
|
||||
-import android.content.pm.PackageInfo;
|
||||
-import android.content.pm.PackageManager;
|
||||
-
|
||||
-import cyanogenmod.providers.CMSettings;
|
||||
-
|
||||
-public class StatsUtils {
|
||||
- private static final String STATS_PACKAGE = "com.cyngn.stats";
|
||||
-
|
||||
- public static boolean isStatsCollectionEnabled(Context context) {
|
||||
- return CMSettings.Secure.getInt(context.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, 1) != 0;
|
||||
- }
|
||||
-
|
||||
- public static boolean isStatsPackageInstalled(Context context) {
|
||||
- try {
|
||||
- PackageInfo pi = context.getPackageManager().getPackageInfo(STATS_PACKAGE, 0);
|
||||
- return pi.applicationInfo.enabled
|
||||
- && ((pi.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0);
|
||||
- } catch (PackageManager.NameNotFoundException e) {
|
||||
- return false;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
index 915abec..8609dbb 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
|
||||
@@ -28,7 +28,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -91,9 +90,6 @@ public class BluetoothSetupPage extends SetupPage {
|
||||
@Override
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.BLUETOOTH_SETUP, "success");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
return false;
|
||||
@@ -111,9 +107,6 @@ public class BluetoothSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.BLUETOOTH_SETUP);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH, options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
index a0a4312..42e7ea2 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
|
||||
@@ -47,7 +47,6 @@ import com.android.internal.telephony.TelephonyIntents;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -356,9 +355,6 @@ public class ChooseDataSimPage extends SetupPage {
|
||||
for (int i = 0; i < mCheckBoxes.size(); i++) {
|
||||
if (subInfoRecord.getSimSlotIndex() == i) {
|
||||
mCheckBoxes.get(i).setChecked(true);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.PREFERRED_DATA_SIM,
|
||||
- SetupStats.Label.SLOT, String.valueOf(i + 1));
|
||||
} else {
|
||||
mCheckBoxes.get(i).setChecked(false);
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
index e71dd79..5bfe3b0 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
|
||||
@@ -32,7 +32,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -95,10 +94,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN) {
|
||||
if (resultCode == Activity.RESULT_OK || resultCode == Activity.RESULT_FIRST_USER) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT,
|
||||
- resultCode == Activity.RESULT_OK ? "success" : "skipped");
|
||||
if (SetupWizardUtils.accountExists(mContext,
|
||||
mContext.getString(R.string.cm_account_type))) {
|
||||
if (SetupWizardUtils.isDeviceLocked()) {
|
||||
@@ -108,9 +103,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
}
|
||||
getCallbacks().onNextPage();
|
||||
} else if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
}
|
||||
}
|
||||
@@ -136,11 +128,6 @@ public class CyanogenServicesPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats
|
||||
- .addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE,
|
||||
- SetupStats.Label.CYANOGEN_ACCOUNT);
|
||||
mFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN,
|
||||
options.toBundle());
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
index d17d64b..2c95253 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -54,7 +53,6 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
|
||||
public static final String TAG = "CyanogenSettingsPage";
|
||||
|
||||
- public static final String KEY_SEND_METRICS = "send_metrics";
|
||||
public static final String DISABLE_NAV_KEYS = "disable_nav_keys";
|
||||
public static final String KEY_APPLY_DEFAULT_THEME = "apply_default_theme";
|
||||
public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight";
|
||||
@@ -116,37 +114,18 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
@Override
|
||||
public void run() {
|
||||
if (getData().containsKey(DISABLE_NAV_KEYS)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_NAV_KEYS,
|
||||
- SetupStats.Label.CHECKED,
|
||||
- String.valueOf(getData().getBoolean(DISABLE_NAV_KEYS)));
|
||||
writeDisableNavkeysOption(mContext, getData().getBoolean(DISABLE_NAV_KEYS));
|
||||
}
|
||||
}
|
||||
});
|
||||
- handleEnableMetrics();
|
||||
handleDefaultThemeSetup();
|
||||
}
|
||||
|
||||
- private void handleEnableMetrics() {
|
||||
- Bundle privacyData = getData();
|
||||
- if (privacyData != null
|
||||
- && privacyData.containsKey(KEY_SEND_METRICS)) {
|
||||
- CMSettings.Secure.putInt(mContext.getContentResolver(),
|
||||
- CMSettings.Secure.STATS_COLLECTION, privacyData.getBoolean(KEY_SEND_METRICS)
|
||||
- ? 1 : 0);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
private void handleDefaultThemeSetup() {
|
||||
Bundle privacyData = getData();
|
||||
if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals(
|
||||
ThemeConfig.SYSTEM_DEFAULT) && privacyData != null &&
|
||||
privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.APPLY_CUSTOM_THEME,
|
||||
- SetupStats.Label.CHECKED,
|
||||
- String.valueOf(privacyData.getBoolean(KEY_APPLY_DEFAULT_THEME)));
|
||||
Log.i(TAG, "Applying default theme");
|
||||
final ThemeManager tm = ThemeManager.getInstance(mContext);
|
||||
tm.applyDefaultTheme();
|
||||
@@ -176,26 +155,14 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
private View mKillSwitchView;
|
||||
private TextView mKillSwitchTitle;
|
||||
private ImageView mKillSwitchStatus;
|
||||
- private View mMetricsRow;
|
||||
private View mDefaultThemeRow;
|
||||
private View mNavKeysRow;
|
||||
- private CheckBox mMetrics;
|
||||
private CheckBox mDefaultTheme;
|
||||
private CheckBox mNavKeys;
|
||||
|
||||
private boolean mHideNavKeysRow = false;
|
||||
private boolean mHideThemeRow = false;
|
||||
|
||||
-
|
||||
- private View.OnClickListener mMetricsClickListener = new View.OnClickListener() {
|
||||
- @Override
|
||||
- public void onClick(View view) {
|
||||
- boolean checked = !mMetrics.isChecked();
|
||||
- mMetrics.setChecked(checked);
|
||||
- mPage.getData().putBoolean(KEY_SEND_METRICS, checked);
|
||||
- }
|
||||
- };
|
||||
-
|
||||
private View.OnClickListener mDefaultThemeClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -253,19 +220,6 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
}
|
||||
}
|
||||
|
||||
- mMetricsRow = mRootView.findViewById(R.id.metrics);
|
||||
- mMetricsRow.setOnClickListener(mMetricsClickListener);
|
||||
- String metricsHelpImproveCM =
|
||||
- getString(R.string.services_help_improve_cm, getString(R.string.os_name));
|
||||
- String metricsSummary = getString(R.string.services_metrics_label,
|
||||
- metricsHelpImproveCM, getString(R.string.os_name));
|
||||
- final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary);
|
||||
- metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD),
|
||||
- 0, metricsHelpImproveCM.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
- TextView metrics = (TextView) mRootView.findViewById(R.id.enable_metrics_summary);
|
||||
- metrics.setText(metricsSpan);
|
||||
- mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox);
|
||||
-
|
||||
mDefaultThemeRow = mRootView.findViewById(R.id.theme);
|
||||
mHideThemeRow = hideThemeSwitch(getActivity());
|
||||
if (mHideThemeRow) {
|
||||
@@ -314,19 +268,9 @@ public class CyanogenSettingsPage extends SetupPage {
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateDisableNavkeysOption();
|
||||
- updateMetricsOption();
|
||||
updateThemeOption();
|
||||
}
|
||||
|
||||
- private void updateMetricsOption() {
|
||||
- final Bundle myPageBundle = mPage.getData();
|
||||
- boolean metricsChecked =
|
||||
- !myPageBundle.containsKey(KEY_SEND_METRICS) || myPageBundle
|
||||
- .getBoolean(KEY_SEND_METRICS);
|
||||
- mMetrics.setChecked(metricsChecked);
|
||||
- myPageBundle.putBoolean(KEY_SEND_METRICS, metricsChecked);
|
||||
- }
|
||||
-
|
||||
private void updateThemeOption() {
|
||||
if (!mHideThemeRow) {
|
||||
final Bundle myPageBundle = mPage.getData();
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
index 7a5922b..a669163 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.TextView;
|
||||
import android.widget.TimePicker;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
@@ -136,8 +135,6 @@ public class DateTimePage extends SetupPage {
|
||||
mDateView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "date_picker");
|
||||
showDatePicker();
|
||||
}
|
||||
});
|
||||
@@ -145,8 +142,6 @@ public class DateTimePage extends SetupPage {
|
||||
mTimeView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "time_picker");
|
||||
showTimePicker();
|
||||
}
|
||||
});
|
||||
@@ -167,17 +162,11 @@ public class DateTimePage extends SetupPage {
|
||||
final Map<?, ?> map = (Map<?, ?>) adapterView.getItemAtPosition(position);
|
||||
final String tzId = (String) map.get(KEY_ID);
|
||||
if (mCurrentTimeZone != null && !mCurrentTimeZone.getID().equals(tzId)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- "timezone_picker");
|
||||
// Update the system timezone value
|
||||
final Activity activity = getActivity();
|
||||
final AlarmManager alarm = (AlarmManager) activity.getSystemService(Context.ALARM_SERVICE);
|
||||
alarm.setTimeZone(tzId);
|
||||
mCurrentTimeZone = TimeZone.getTimeZone(tzId);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.TIMEZONE_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- mCurrentTimeZone.getDisplayName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -232,10 +221,6 @@ public class DateTimePage extends SetupPage {
|
||||
if (activity != null) {
|
||||
setDate(activity, year, month, day);
|
||||
updateTimeAndDateDisplay(activity);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.DATE_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- month+"/"+day+"/"+year);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,10 +230,6 @@ public class DateTimePage extends SetupPage {
|
||||
if (activity != null) {
|
||||
setTime(activity, hourOfDay, minute);
|
||||
updateTimeAndDateDisplay(activity);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.TIME_CHANGED,
|
||||
- SetupStats.Label.VALUE,
|
||||
- hourOfDay+":"+minute);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
index 890a4f6..c9174c6 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
|
||||
@@ -28,7 +28,6 @@ import android.widget.TextView;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
|
||||
public class FingerprintSetupPage extends SetupPage {
|
||||
@@ -113,9 +112,6 @@ public class FingerprintSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(getActivity(),
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.FINGERPRINT_SETUP);
|
||||
startActivityForResult(intent, SetupWizardApp.REQUEST_CODE_SETUP_FINGERPRINT,
|
||||
options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
index 2b4741a..e8b4ef4 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
|
||||
@@ -35,7 +35,6 @@ import android.util.Log;
|
||||
import com.android.setupwizardlib.util.ResultCodes;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -143,10 +142,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
boolean restorePicker = !data.hasExtra(EXTRA_RESTORE_TOKEN)
|
||||
&& !data.hasExtra(EXTRA_RESTORE_ACCOUNT) &&
|
||||
data.hasExtra(EXTRA_AUTH_ACCOUNT);
|
||||
-
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.GMS_ACCOUNT, "success");
|
||||
launchGmsRestorePage(restorePicker);
|
||||
} else {
|
||||
handleResult(requestCode, resultCode);
|
||||
@@ -174,24 +169,12 @@ public class GmsAccountPage extends SetupPage {
|
||||
|
||||
private void handleResult(int requestCode, int resultCode) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
} else {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "success");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
if (canSkip()) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- requestCode == SetupWizardApp.REQUEST_CODE_SETUP_GMS ?
|
||||
- SetupStats.Label.GMS_ACCOUNT : SetupStats.Label.RESTORE, "skipped");
|
||||
getCallbacks().onNextPage();
|
||||
} else {
|
||||
getCallbacks().onPreviousPage();
|
||||
@@ -231,9 +214,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.RESTORE);
|
||||
mFragment.startActivityForResult(
|
||||
intent,
|
||||
SetupWizardApp.REQUEST_CODE_RESTORE_GMS, options.toBundle());
|
||||
@@ -305,9 +285,6 @@ public class GmsAccountPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.GMS_ACCOUNT);
|
||||
mFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle());
|
||||
} catch (OperationCanceledException e) {
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
index da3872e..36d9ad5 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
|
||||
@@ -38,7 +38,6 @@ import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -147,9 +146,6 @@ public class MobileDataPage extends SetupPage {
|
||||
} else {
|
||||
onDataStateReady();
|
||||
}
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_MOBILE_DATA,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
index 7ed23dc..69b0100 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.cyanogenmod.setupwizard.setup;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
|
||||
@@ -229,9 +228,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleLocationAccess(boolean checked) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
|
||||
if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
|
||||
@@ -241,10 +237,6 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleBatterySaving(boolean checked) {
|
||||
- /* SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_BATTERY_SAVING_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked)); */
|
||||
-
|
||||
if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_BATTERY_SAVING);
|
||||
} else {
|
||||
@@ -253,11 +245,7 @@ public class OtherSettingsPage extends SetupPage {
|
||||
}
|
||||
|
||||
private void onToggleNetwork(boolean checked) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.ENABLE_NETWORK_LOCATION,
|
||||
- SetupStats.Label.CHECKED, String.valueOf(checked));
|
||||
-
|
||||
- if (checked) {
|
||||
+ if (checked) {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);
|
||||
} else {
|
||||
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
index 1a19fb0..9804049 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java
|
||||
@@ -26,7 +26,6 @@ import android.transition.Transition;
|
||||
import android.view.Gravity;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
|
||||
public abstract class SetupPage implements Page {
|
||||
@@ -76,18 +75,12 @@ public abstract class SetupPage implements Page {
|
||||
public void doLoadAction(FragmentManager fragmentManager, int action) {
|
||||
Fragment fragment = getFragment(fragmentManager, action);
|
||||
if (action == Page.ACTION_NEXT) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- SetupStats.Action.NEXT_BUTTON, getKey(),
|
||||
- String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.RIGHT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
.replace(R.id.content,fragment, getKey())
|
||||
.commit();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK,
|
||||
- SetupStats.Action.PREVIOUS_BUTTON, getKey(),
|
||||
- String.valueOf(System.currentTimeMillis()));
|
||||
Transition t = new Slide(Gravity.LEFT);
|
||||
fragment.setEnterTransition(t);
|
||||
fragmentManager.beginTransaction()
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
index e09c2a1..eedb24d 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
|
||||
@@ -42,7 +42,6 @@ import android.widget.Toast;
|
||||
import com.android.internal.telephony.MccTable;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LocalePicker;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -87,7 +86,6 @@ public class WelcomePage extends SetupPage {
|
||||
return true;
|
||||
} else {
|
||||
if (mWelcomeFragment != null) {
|
||||
- mWelcomeFragment.sendLocaleStats();
|
||||
}
|
||||
return super.doNextAction();
|
||||
}
|
||||
@@ -102,10 +100,6 @@ public class WelcomePage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.BUTTON_CLICK, SetupStats.Label.EMERGENCY_CALL);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.EMERGENCY_CALL);
|
||||
mContext.startActivity(intent, options.toBundle());
|
||||
return true;
|
||||
}
|
||||
@@ -269,14 +263,6 @@ public class WelcomePage extends SetupPage {
|
||||
return R.layout.setup_welcome_page;
|
||||
}
|
||||
|
||||
- public void sendLocaleStats() {
|
||||
- if (!mCurrentLocale.equals(mInitialLocale)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- SetupStats.Action.CHANGE_LOCALE, SetupStats.Label.LOCALE,
|
||||
- mCurrentLocale.getDisplayName());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
public void fetchAndUpdateSimLocale() {
|
||||
if (mIgnoreSimLocale || isDetached()) {
|
||||
return;
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
index 2d8084a..3a131f7 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
|
||||
@@ -31,7 +31,6 @@ import android.util.Log;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
|
||||
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
|
||||
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
|
||||
@@ -86,9 +85,6 @@ public class WifiSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.CAPTIVE_PORTAL_LOGIN);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL,
|
||||
options.toBundle());
|
||||
@@ -157,19 +153,10 @@ public class WifiSetupPage extends SetupPage {
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_WIFI) {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "canceled");
|
||||
getCallbacks().onPreviousPage();
|
||||
} else if (resultCode == Activity.RESULT_OK) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "success");
|
||||
checkForCaptivePortal();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.WIFI_SETUP, "skipped");
|
||||
getCallbacks().onNextPage();
|
||||
}
|
||||
} else if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL) {
|
||||
@@ -179,20 +166,11 @@ public class WifiSetupPage extends SetupPage {
|
||||
}
|
||||
String token = data.getStringExtra("response_token");
|
||||
if (token != null && !token.equals(mResponseToken)) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "token_mismatch");
|
||||
launchWifiSetup();
|
||||
} else {
|
||||
if (resultCode == Activity.RESULT_CANCELED) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "canceled");
|
||||
launchWifiSetup();
|
||||
} else {
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
|
||||
- SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "success");
|
||||
getCallbacks().onNextPage();
|
||||
}
|
||||
}
|
||||
@@ -256,9 +234,6 @@ public class WifiSetupPage extends SetupPage {
|
||||
ActivityOptions.makeCustomAnimation(mContext,
|
||||
android.R.anim.fade_in,
|
||||
android.R.anim.fade_out);
|
||||
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
|
||||
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
|
||||
- SetupStats.Label.PAGE, SetupStats.Label.WIFI_SETUP);
|
||||
mLoadingFragment.startActivityForResult(intent,
|
||||
SetupWizardApp.REQUEST_CODE_SETUP_WIFI, options.toBundle());
|
||||
}
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
index b0df440..33c61c7 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
|
||||
@@ -26,7 +26,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.setup.Page;
|
||||
import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks;
|
||||
|
||||
@@ -43,8 +42,6 @@ public abstract class SetupPageFragment extends Fragment {
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setRetainInstance(true);
|
||||
- SetupStats.addEvent(SetupStats.Categories.PAGE_LOAD, SetupStats.Action.PAGE_LOADED,
|
||||
- mKey, String.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
index 0d82a74..3e3657d 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
|
||||
@@ -45,7 +45,6 @@ import android.widget.ProgressBar;
|
||||
import com.android.setupwizardlib.util.SystemBarHelper;
|
||||
import com.cyanogenmod.setupwizard.R;
|
||||
import com.cyanogenmod.setupwizard.SetupWizardApp;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
import com.cyanogenmod.setupwizard.setup.CMSetupWizardData;
|
||||
import com.cyanogenmod.setupwizard.setup.GmsAccountPage;
|
||||
import com.cyanogenmod.setupwizard.setup.Page;
|
||||
@@ -93,7 +92,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
}
|
||||
SystemBarHelper.hideSystemBars(getWindow());
|
||||
if (sLaunchTime == 0) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.APP_LAUNCH, TAG);
|
||||
sLaunchTime = System.nanoTime();
|
||||
}
|
||||
setContentView(R.layout.setup_main);
|
||||
@@ -369,9 +367,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
@Override
|
||||
public void finishSetup() {
|
||||
if (!mIsFinishing) {
|
||||
- SetupStats.addEvent(SetupStats.Categories.APP_FINISHED, TAG,
|
||||
- SetupStats.Label.TOTAL_TIME, String.valueOf(
|
||||
- System.nanoTime() - sLaunchTime));
|
||||
final SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
|
||||
setupWizardApp.sendStickyBroadcastAsUser(
|
||||
new Intent(SetupWizardApp.ACTION_FINISHED),
|
||||
@@ -461,7 +456,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
|
||||
}
|
||||
final ThemeManager tm = ThemeManager.getInstance(SetupWizardActivity.this);
|
||||
tm.unregisterThemeChangeListener(SetupWizardActivity.this);
|
||||
- SetupStats.sendEvents(SetupWizardActivity.this);
|
||||
SetupWizardUtils.disableGMSSetupWizard(SetupWizardActivity.this);
|
||||
final WallpaperManager wallpaperManager =
|
||||
WallpaperManager.getInstance(SetupWizardActivity.this);
|
||||
diff --git a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
index 440129b..47d6de5 100644
|
||||
--- a/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
+++ b/src/com/cyanogenmod/setupwizard/util/EnableAccessibilityController.java
|
||||
@@ -39,7 +39,6 @@ import android.view.accessibility.AccessibilityManager;
|
||||
import android.view.accessibility.IAccessibilityManager;
|
||||
|
||||
import com.android.internal.R;
|
||||
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -284,8 +283,6 @@ public class EnableAccessibilityController {
|
||||
// Turn on accessibility mode last.
|
||||
Settings.Secure.putIntForUser(resolver, Settings.Secure.ACCESSIBILITY_ENABLED,
|
||||
1, userId);
|
||||
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
|
||||
- "accessibility_enabled");
|
||||
} else if (keyguardLocked) {
|
||||
try {
|
||||
mAccessibilityManager.temporaryEnableAccessibilityStateUntilKeyguardRemoved(
|
||||
--
|
||||
2.8.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,89 +0,0 @@
|
||||
From b003454ab2ece62db5ae6c621aa6ec5c93c5c0b5 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sun, 20 Mar 2016 14:40:17 -0400
|
||||
Subject: [PATCH] Actually fix profiles failing to set users preferred network
|
||||
type
|
||||
|
||||
Change-Id: I325430f971b35b07d6852f3647fa60ec935a5b52
|
||||
---
|
||||
src/com/android/phone/PhoneToggler.java | 38 +++++++++++++++++++++++++++++----
|
||||
1 file changed, 34 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/com/android/phone/PhoneToggler.java b/src/com/android/phone/PhoneToggler.java
|
||||
index 90234f9..a38dd68 100644
|
||||
--- a/src/com/android/phone/PhoneToggler.java
|
||||
+++ b/src/com/android/phone/PhoneToggler.java
|
||||
@@ -21,6 +21,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.util.Log;
|
||||
+import android.os.Handler;
|
||||
+import android.os.Message;
|
||||
|
||||
import com.android.internal.telephony.Phone;
|
||||
import com.android.internal.telephony.PhoneFactory;
|
||||
@@ -42,6 +44,15 @@ public class PhoneToggler extends BroadcastReceiver {
|
||||
private static final String LOG_TAG = "PhoneToggler";
|
||||
private static final boolean DBG = false;
|
||||
|
||||
+ private MyHandler mHandler;
|
||||
+
|
||||
+ private MyHandler getHandler() {
|
||||
+ if (mHandler == null) {
|
||||
+ mHandler = new MyHandler();
|
||||
+ }
|
||||
+ return mHandler;
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String action = intent.getAction();
|
||||
@@ -51,8 +62,7 @@ public class PhoneToggler extends BroadcastReceiver {
|
||||
SubscriptionController subCtrl = SubscriptionController.getInstance();
|
||||
|
||||
int networkMode = intent.getExtras().getInt(EXTRA_NETWORK_MODE, -1);
|
||||
- int subId = intent.getExtras().getInt(EXTRA_SUB_ID,
|
||||
- SubscriptionManager.getDefaultDataSubId());
|
||||
+ int subId = SubscriptionManager.getDefaultDataSubId();
|
||||
|
||||
// since the caller must be a system app, it's assumed that they have already
|
||||
// chosen a valid network mode for this subId, so only basic validation is done
|
||||
@@ -60,8 +70,9 @@ public class PhoneToggler extends BroadcastReceiver {
|
||||
if (DBG) Log.d(LOG_TAG, "Changing network mode to " + networkMode);
|
||||
subCtrl.setUserNwMode(subId, networkMode);
|
||||
try {
|
||||
- PhoneFactory.getPhone(SubscriptionManager.getPhoneId(subId))
|
||||
- .setPreferredNetworkType(networkMode, null);
|
||||
+ Phone phone = PhoneFactory.getPhone(SubscriptionManager.getPhoneId(subId));
|
||||
+ Message response = getHandler().obtainMessage(MyHandler.MESSAGE_SET_PREFERRED_NETWORK_TYPE);
|
||||
+ phone.setPreferredNetworkType(networkMode, response);
|
||||
} catch (Throwable t) {
|
||||
Log.d(LOG_TAG, "error setting preferred network", t);
|
||||
}
|
||||
@@ -117,4 +128,23 @@ public class PhoneToggler extends BroadcastReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
+ private class MyHandler extends Handler {
|
||||
+ private static final int MESSAGE_SET_PREFERRED_NETWORK_TYPE = 0;
|
||||
+
|
||||
+ @Override
|
||||
+ public void handleMessage(Message msg) {
|
||||
+ switch (msg.what) {
|
||||
+ case MESSAGE_SET_PREFERRED_NETWORK_TYPE:
|
||||
+ handleSetPreferredNetworkTypeResponse(msg);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void handleSetPreferredNetworkTypeResponse(Message msg) {
|
||||
+ if (DBG) {
|
||||
+ Log.e(LOG_TAG, "handleSetPreferredNetworkTypeResponse() called");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 978d511140a6391ef82243fe6500e207697b9b41 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 18 Apr 2016 08:54:51 -0400
|
||||
Subject: [PATCH] Implement MAC Randomization
|
||||
|
||||
Change-Id: I3276bfb674801572ab9ff286fb1b036253eaf409
|
||||
---
|
||||
rootdir/init.rc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index 78adacc..8cff499 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -559,6 +559,8 @@ on property:sys.sysctl.extra_free_kbytes=*
|
||||
on property:sys.sysctl.tcp_def_init_rwnd=*
|
||||
write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd}
|
||||
|
||||
+on property:persist.privacy.randomize_mac=*
|
||||
+ write /proc/sys/net/core/randomize_mac ${persist.privacy.randomize_mac}
|
||||
|
||||
## Daemon processes to be run by init.
|
||||
##
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 28fec2a2867a8a0fea386038bc366e630ac1ed4e Mon Sep 17 00:00:00 2001
|
||||
From: Martin Brabham <optedoblivion@cyngn.com>
|
||||
Date: Thu, 7 May 2015 11:22:13 -0700
|
||||
Subject: [PATCH] DNSCrypt - Add sepolicy for dnscrypt proxy to run - Add
|
||||
service entry to init.local.rc
|
||||
|
||||
Change-Id: Id2ee42738c10a7a024fcf25edc3a6cbe2fe0bbc8
|
||||
---
|
||||
prebuilt/common/etc/init.local.rc | 6 ++++++
|
||||
sepolicy/dnscryptproxy.te | 8 ++++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
create mode 100644 sepolicy/dnscryptproxy.te
|
||||
|
||||
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
|
||||
index 1f66b77..8042c29 100644
|
||||
--- a/prebuilt/common/etc/init.local.rc
|
||||
+++ b/prebuilt/common/etc/init.local.rc
|
||||
@@ -128,6 +128,12 @@ on boot
|
||||
# Persistent properties (only created if persist exists)
|
||||
mkdir /persist/properties 0770 system system
|
||||
|
||||
+# For now default this to opendns until we modify the code to read a system propery
|
||||
+# dnscrypt proxy
|
||||
+service dnscrypt-proxy /system/xbin/dnscrypt-proxy
|
||||
+ class main
|
||||
+ disabled
|
||||
+
|
||||
# sysinit (/system/etc/init.d)
|
||||
service sysinit /system/bin/sysinit
|
||||
user root
|
||||
diff --git a/sepolicy/dnscryptproxy.te b/sepolicy/dnscryptproxy.te
|
||||
new file mode 100644
|
||||
index 0000000..3f143c9
|
||||
--- /dev/null
|
||||
+++ b/sepolicy/dnscryptproxy.te
|
||||
@@ -0,0 +1,8 @@
|
||||
+allow init self:udp_socket { bind setopt write read };
|
||||
+allow init port:udp_socket name_bind;
|
||||
+allow init node:udp_socket node_bind;
|
||||
+
|
||||
+allow init self:tcp_socket { create ioctl setopt bind listen };
|
||||
+allow init port:tcp_socket name_bind;
|
||||
+allow init node:tcp_socket node_bind;
|
||||
+
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,25 +0,0 @@
|
||||
From a32d4f29bb1ed433326eebe496df7c3b5483e192 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Wed, 24 Feb 2016 09:05:13 -0500
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: I44ad1e35e086eb6287ea1065a1d77474ca6c295a
|
||||
---
|
||||
.../vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml b/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
index eec242d..58fb154 100644
|
||||
--- a/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
+++ b/overlay/common/vendor/cmsdk/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
@@ -24,7 +24,4 @@
|
||||
<integer name="def_qs_quick_pulldown">1</integer>
|
||||
|
||||
<!-- Defaults for Secure -->
|
||||
-
|
||||
- <!-- Default for CMSettings.Secure.STATS_COLLECTION -->
|
||||
- <bool name="def_stats_collection">true</bool>
|
||||
</resources>
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 3698eabdc4057a2e977ffb4db60bffb1cea062fa Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sun, 19 Jun 2016 15:13:50 -0400
|
||||
Subject: [PATCH] Bring back the custom wallpaper picker [5/5]
|
||||
|
||||
Change-Id: Icb52423c63206927b45b72f1d1785c3574f2c0d6
|
||||
---
|
||||
config/common.mk | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/common.mk b/config/common.mk
|
||||
index 75191ba..c2a15ae 100644
|
||||
--- a/config/common.mk
|
||||
+++ b/config/common.mk
|
||||
@@ -154,7 +154,8 @@ PRODUCT_PACKAGES += \
|
||||
CMSettingsProvider \
|
||||
ExactCalculator \
|
||||
LiveLockScreenService \
|
||||
- WeatherProvider
|
||||
+ WeatherProvider \
|
||||
+ WallpaperPicker
|
||||
|
||||
# Exchange support
|
||||
PRODUCT_PACKAGES += \
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,33 +0,0 @@
|
||||
From aceee7358fa39da71425c6db7fe6c984c846128a Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 8 Aug 2016 16:04:56 -0400
|
||||
Subject: [PATCH] Add radio tile (2/2)
|
||||
|
||||
Change-Id: Iacc6ed7ce384d955ff2494e55c318e054b7ff206
|
||||
---
|
||||
sdk/src/java/org/cyanogenmod/internal/util/QSConstants.java | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/sdk/src/java/org/cyanogenmod/internal/util/QSConstants.java b/sdk/src/java/org/cyanogenmod/internal/util/QSConstants.java
|
||||
index c5e62eb..a2b5269 100644
|
||||
--- a/sdk/src/java/org/cyanogenmod/internal/util/QSConstants.java
|
||||
+++ b/sdk/src/java/org/cyanogenmod/internal/util/QSConstants.java
|
||||
@@ -48,6 +48,7 @@ public class QSConstants {
|
||||
public static final String TILE_SCREEN_TIMEOUT = "screen_timeout";
|
||||
public static final String TILE_USB_TETHER = "usb_tether";
|
||||
public static final String TILE_HEADS_UP = "heads_up";
|
||||
+ public static final String TILE_RADIO_POWER = "radio_power";
|
||||
public static final String TILE_AMBIENT_DISPLAY = "ambient_display";
|
||||
public static final String TILE_SYNC = "sync";
|
||||
public static final String TILE_BATTERY_SAVER = "battery_saver";
|
||||
@@ -96,6 +97,7 @@ public class QSConstants {
|
||||
STATIC_TILES_AVAILABLE.add(TILE_SCREEN_TIMEOUT);
|
||||
STATIC_TILES_AVAILABLE.add(TILE_USB_TETHER);
|
||||
STATIC_TILES_AVAILABLE.add(TILE_HEADS_UP);
|
||||
+ STATIC_TILES_AVAILABLE.add(TILE_RADIO_POWER);
|
||||
STATIC_TILES_AVAILABLE.add(TILE_AMBIENT_DISPLAY);
|
||||
STATIC_TILES_AVAILABLE.add(TILE_SYNC);
|
||||
STATIC_TILES_AVAILABLE.add(TILE_BATTERY_SAVER);
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,135 +0,0 @@
|
||||
From b90e97cdb84542a787f1361633a662f57852d9d3 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 2 Apr 2016 11:31:27 -0400
|
||||
Subject: [PATCH] Remove analytics
|
||||
|
||||
Change-Id: I4aa2a69fd7eb68d9ab8a4ba426532944901f2322
|
||||
---
|
||||
host/migration/example-cm12.1-settings.txt | 3 +--
|
||||
host/migration/src/CMSettings.java | 7 -------
|
||||
packages/CMSettingsProvider/res/values/defaults.xml | 3 ---
|
||||
.../src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java | 3 ---
|
||||
.../cmsettings/tests/CMSettingsProviderDefaultsTest.java | 3 ---
|
||||
sdk/src/java/cyanogenmod/providers/CMSettings.java | 13 -------------
|
||||
6 files changed, 1 insertion(+), 31 deletions(-)
|
||||
|
||||
diff --git a/host/migration/example-cm12.1-settings.txt b/host/migration/example-cm12.1-settings.txt
|
||||
index 7534be3..9f454aa 100644
|
||||
--- a/host/migration/example-cm12.1-settings.txt
|
||||
+++ b/host/migration/example-cm12.1-settings.txt
|
||||
@@ -64,7 +64,6 @@ Row: 60 name=swap_volume_keys_on_rotation, type=s, value=0, type=s
|
||||
Row: 61 name=status_bar_brightness_control, type=s, value=0, type=s
|
||||
Row: 62 name=status_bar_notif_count, type=s, value=1, type=s
|
||||
Row: 63 name=dev_force_show_navbar, type=s, value=0, type=s
|
||||
-Row: 64 name=stats_collection, type=s, value=1, type=s
|
||||
Row: 65 name=advanced_mode, type=s, value=1, type=s
|
||||
Row: 66 name=default_theme_package, type=s, value=com.cyngn.hexo, type=s
|
||||
Row: 67 name=default_theme_components, type=s, value=mods_overlays|mods_status_bar|mods_navigation_bar|mods_icons|mods_homescreen|mods_fonts, type=s
|
||||
@@ -118,4 +117,4 @@ Row: 114 name=ring_home_button_behavior, type=s, value=1, type=s
|
||||
Row: 115 name=show_alarm_icon, type=s, value=1, type=s
|
||||
Row: 116 name=status_bar_am_pm, type=s, value=1, type=s
|
||||
Row: 117 name=status_bar_quick_qs_pulldown, type=s, value=1, type=s
|
||||
-Row: 118 name=t9_search_input_locale, type=s, value=enUS, type=s
|
||||
\ No newline at end of file
|
||||
+Row: 118 name=t9_search_input_locale, type=s, value=enUS, type=s
|
||||
diff --git a/host/migration/src/CMSettings.java b/host/migration/src/CMSettings.java
|
||||
index 0d57b0d..b4f5be9 100644
|
||||
--- a/host/migration/src/CMSettings.java
|
||||
+++ b/host/migration/src/CMSettings.java
|
||||
@@ -833,12 +833,6 @@ public final class CMSettings {
|
||||
public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
|
||||
|
||||
/**
|
||||
- * Global stats collection
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION = "stats_collection";
|
||||
-
|
||||
- /**
|
||||
* Boolean value whether to link ringtone and notification volume
|
||||
*
|
||||
* @hide
|
||||
@@ -1021,7 +1015,6 @@ public final class CMSettings {
|
||||
CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
|
||||
CMSettings.Secure.KEYBOARD_BRIGHTNESS,
|
||||
CMSettings.Secure.POWER_MENU_ACTIONS,
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
|
||||
CMSettings.Secure.QS_TILES,
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
index 5d590ad..916bb10 100644
|
||||
--- a/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
+++ b/packages/CMSettingsProvider/res/values/defaults.xml
|
||||
@@ -48,9 +48,6 @@
|
||||
Comma-delimited, quick settings tiles. See QSConstants.java for a list of all available tiles
|
||||
<string name="def_qs_tiles">wifi,bt,cell,airplane,rotation,flashlight,location,cast,hotspot,live_display</string> -->
|
||||
|
||||
- <!-- Default for CMSettings.Secure.STATS_COLLECTION -->
|
||||
- <bool name="def_stats_collection">false</bool>
|
||||
-
|
||||
<!-- Default for CMSettings.System.STATUS_BAR_BATTERY_STYLE
|
||||
* 0: Display the battery as icon in portrait mode
|
||||
* 2: Display the battery as a circle
|
||||
diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
index 98064af..fff68da 100644
|
||||
--- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
+++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
|
||||
@@ -255,9 +255,6 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
|
||||
loadBooleanSetting(stmt, CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
R.bool.def_sysui_qs_main_tiles);
|
||||
|
||||
- loadBooleanSetting(stmt, CMSettings.Secure.STATS_COLLECTION,
|
||||
- R.bool.def_stats_collection);
|
||||
-
|
||||
loadBooleanSetting(stmt, CMSettings.Secure.LOCKSCREEN_VISUALIZER_ENABLED,
|
||||
R.bool.def_lockscreen_visualizer);
|
||||
|
||||
diff --git a/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java b/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java
|
||||
index a2c4269..ff5583d 100644
|
||||
--- a/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java
|
||||
+++ b/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java
|
||||
@@ -90,9 +90,6 @@ public class CMSettingsProviderDefaultsTest extends AndroidTestCase {
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
"R.bool.def_sysui_qs_main_tiles"));
|
||||
SECURE_SETTINGS_DEFAULTS.add(new Setting(
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
- "R.bool.def_stats_collection"));
|
||||
- SECURE_SETTINGS_DEFAULTS.add(new Setting(
|
||||
CMSettings.Secure.LOCKSCREEN_VISUALIZER_ENABLED,
|
||||
"R.bool.def_lockscreen_visualizer"));
|
||||
SECURE_SETTINGS_DEFAULTS.add(new Setting(
|
||||
diff --git a/sdk/src/java/cyanogenmod/providers/CMSettings.java b/sdk/src/java/cyanogenmod/providers/CMSettings.java
|
||||
index 47cc524..6675da8 100644
|
||||
--- a/sdk/src/java/cyanogenmod/providers/CMSettings.java
|
||||
+++ b/sdk/src/java/cyanogenmod/providers/CMSettings.java
|
||||
@@ -2484,18 +2484,6 @@ public final class CMSettings {
|
||||
public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
|
||||
|
||||
/**
|
||||
- * Global stats collection
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION = "stats_collection";
|
||||
-
|
||||
- /**
|
||||
- * Whether the global stats collection setting has been successfully reported to server
|
||||
- * @hide
|
||||
- */
|
||||
- public static final String STATS_COLLECTION_REPORTED = "stats_collection_reported";
|
||||
-
|
||||
- /**
|
||||
* Whether newly installed apps should run with privacy guard by default
|
||||
* @hide
|
||||
*/
|
||||
@@ -2724,7 +2712,6 @@ public final class CMSettings {
|
||||
CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
|
||||
CMSettings.Secure.KEYBOARD_BRIGHTNESS,
|
||||
CMSettings.Secure.POWER_MENU_ACTIONS,
|
||||
- CMSettings.Secure.STATS_COLLECTION,
|
||||
CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
|
||||
CMSettings.Secure.QS_TILES,
|
||||
CMSettings.Secure.QS_USE_MAIN_TILES,
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 1287da9da56cc8e074d7d2afed677e65cf77c720 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Mon, 17 Nov 2014 05:28:09 -0500
|
||||
Subject: [PATCH] add MAC randomization
|
||||
|
||||
based on https://grsecurity.net/~spender/random_mac.diff
|
||||
---
|
||||
net/core/dev.c | 19 +++++++++++++++++++
|
||||
net/core/sysctl_net_core.c | 10 ++++++++++
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index 70145dc..d662c0f 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -178,6 +178,7 @@
|
||||
static DEFINE_SPINLOCK(ptype_lock);
|
||||
static struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly;
|
||||
static struct list_head ptype_all __read_mostly; /* Taps */
|
||||
+int randomize_mac = 1;
|
||||
|
||||
/*
|
||||
* The @dev_base_head list is protected by @dev_base_lock and the rtnl
|
||||
@@ -4717,6 +4718,24 @@ int dev_change_flags(struct net_device *dev, unsigned int flags)
|
||||
rtmsg_ifinfo(RTM_NEWLINK, dev, changes);
|
||||
|
||||
__dev_notify_flags(dev, old_flags);
|
||||
+
|
||||
+ if (randomize_mac && (changes & IFF_UP) && !(old_flags & IFF_UP)) {
|
||||
+ /* randomize MAC whenever interface is brought up */
|
||||
+ struct sockaddr sa;
|
||||
+ unsigned int mac4;
|
||||
+ unsigned short mac2;
|
||||
+
|
||||
+ mac4 = random32();
|
||||
+ mac2 = random32();
|
||||
+ memcpy(sa.sa_data, &mac4, sizeof(mac4));
|
||||
+ memcpy((char *)sa.sa_data + sizeof(mac4), &mac2, sizeof(mac2));
|
||||
+ if (!is_valid_ether_addr(sa.sa_data))
|
||||
+ sa.sa_data[5] = 1;
|
||||
+ sa.sa_data[0] &= 0xFC;
|
||||
+ sa.sa_family = dev->type;
|
||||
+ dev_set_mac_address(dev, &sa);
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(dev_change_flags);
|
||||
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
|
||||
index 0c28508..42b3ad3 100644
|
||||
--- a/net/core/sysctl_net_core.c
|
||||
+++ b/net/core/sysctl_net_core.c
|
||||
@@ -84,9 +84,19 @@ static int rps_sock_flow_sysctl(ctl_table *table, int write,
|
||||
}
|
||||
#endif /* CONFIG_RPS */
|
||||
|
||||
+extern int randomize_mac;
|
||||
+
|
||||
static struct ctl_table net_core_table[] = {
|
||||
#ifdef CONFIG_NET
|
||||
{
|
||||
+ .procname = "randomize_mac",
|
||||
+ .data = &randomize_mac,
|
||||
+ .maxlen = sizeof(int),
|
||||
+ .mode = 0644,
|
||||
+ .proc_handler = proc_dointvec
|
||||
+ },
|
||||
+
|
||||
+ {
|
||||
.procname = "wmem_max",
|
||||
.data = &sysctl_wmem_max,
|
||||
.maxlen = sizeof(int),
|
@ -1,103 +0,0 @@
|
||||
From de2ba147b18528eda7ee943865f8569823fbf3f9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 23 Nov 2016 16:04:50 -0500
|
||||
Subject: [PATCH] Add optional automated signing
|
||||
|
||||
Change-Id: If5a888f12764c4928f5efbb2fda78f76fb445a2a
|
||||
---
|
||||
core/Makefile | 43 +++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 37 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/core/Makefile b/core/Makefile
|
||||
index 1d6bff0..d65fd27 100644
|
||||
--- a/core/Makefile
|
||||
+++ b/core/Makefile
|
||||
@@ -418,6 +418,11 @@ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
DEFAULT_KEY_CERT_PAIR := $(OTA_PACKAGE_SIGNING_KEY)
|
||||
endif
|
||||
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ KEY_CERT_DIR := $(SIGNING_KEY_DIR)
|
||||
+ DEFAULT_KEY_CERT_PAIR := $(SIGNING_KEY_DIR)/releasekey
|
||||
+endif
|
||||
+
|
||||
# Rules that need to be present for the all targets, even
|
||||
# if they don't do anything.
|
||||
.PHONY: systemimage
|
||||
@@ -1030,11 +1035,15 @@ endif
|
||||
# substitute other keys for this one.
|
||||
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
||||
|
||||
-ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
- OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
||||
- PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ OTA_PUBLIC_KEYS := $(SIGNING_KEY_DIR)/releasekey.x509.pem
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS += $(SIGNING_KEY_DIR)/extra
|
||||
+else
|
||||
+ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
+ OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
+ endif
|
||||
endif
|
||||
-
|
||||
# Generate a file containing the keys that will be read by the
|
||||
# recovery binary.
|
||||
RECOVERY_INSTALL_OTA_KEYS := \
|
||||
@@ -1818,6 +1827,13 @@ $(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
|
||||
$(BUILT_TARGET_FILES_PACKAGE): \
|
||||
zip_root := $(intermediates)/$(name)
|
||||
|
||||
+SIGNED_TARGET_FILES_PACKAGE := $(intermediates)/signed-$(name).zip
|
||||
+MAYBE_SIGNED_TARGET_FILES_PACKAGE := $(BUILT_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ MAYBE_SIGNED_TARGET_FILES_PACKAGE := $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+endif
|
||||
+
|
||||
# $(1): Directory to copy
|
||||
# $(2): Location to copy it to
|
||||
# The "ls -A" is to prevent "acp s/* d" from failing if s is empty.
|
||||
@@ -2182,6 +2198,12 @@ else
|
||||
OTA_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT)
|
||||
endif
|
||||
|
||||
+ifeq ($(TARGET_RELEASETOOL_SIGN_TARGET_SCRIPT),)
|
||||
+ SIGN_TARGET_SCRIPT := ./build/tools/releasetools/sign_target_files_apks
|
||||
+else
|
||||
+ SIGN_TARGET_SCRIPT := $(TARGET_RELEASETOOL_SIGN_TARGET_SCRIPT)
|
||||
+endif
|
||||
+
|
||||
ifeq ($(WITH_GMS),true)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false
|
||||
else
|
||||
@@ -2209,7 +2231,16 @@ ifneq ($(BLOCK_BASED_OTA),false)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): block_based := --block
|
||||
endif
|
||||
|
||||
-$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE)
|
||||
+$(SIGNED_TARGET_FILES_PACKAGE): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
+ @echo "$(SIGN_TARGET_SCRIPT)" > $(PRODUCT_OUT)/sign_script_path
|
||||
+ @echo -e ${CL_YLW}"Sign target files:"${CL_RST}" $@"
|
||||
+ $(hide) $(SIGN_TARGET_SCRIPT) \
|
||||
+ -d $(KEY_CERT_DIR) \
|
||||
+ -o \
|
||||
+ $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
+ $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
@echo "$(OTA_FROM_TARGET_SCRIPT)" > $(PRODUCT_OUT)/ota_script_path
|
||||
@echo "$(override_device)" > $(PRODUCT_OUT)/ota_override_device
|
||||
@echo "Package OTA: $@"
|
||||
@@ -2221,7 +2252,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE)
|
||||
--backup=$(backuptool) \
|
||||
--override_device=$(override_device) $(override_prop) \
|
||||
$(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \
|
||||
- $(BUILT_TARGET_FILES_PACKAGE) $@
|
||||
+ $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $@
|
||||
|
||||
CM_TARGET_PACKAGE := $(PRODUCT_OUT)/cm-$(CM_VERSION).zip
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 4edf341b3b70c3bfe391dff53a7e63691c9e7bcb Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 21 Nov 2016 21:30:33 -0500
|
||||
Subject: [PATCH] Enable LTE
|
||||
|
||||
Change-Id: I69afb82cc409bd2590b320f5b85636ee2f1de327
|
||||
---
|
||||
device.mk | 2 +-
|
||||
overlay/frameworks/base/core/res/res/values/config.xml | 2 +-
|
||||
overlay/packages/services/Telephony/res/values/config.xml | 3 +++
|
||||
3 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/device.mk b/device.mk
|
||||
index 1960be2..69fe0b8 100644
|
||||
--- a/device.mk
|
||||
+++ b/device.mk
|
||||
@@ -234,7 +234,7 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
|
||||
rild.libpath=/system/lib/libril-qc-qmi-1.so
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
- telephony.lteOnCdmaDevice=0
|
||||
+ telephony.lteOnCdmaDevice=1
|
||||
|
||||
ifeq ($(findstring tiny, $(TARGET_PRODUCT)),)
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
index 6c68c1d..6febaf2 100644
|
||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
@@ -231,7 +231,7 @@
|
||||
Empty is viewed as "all". Only used on devices which
|
||||
don't support RIL_REQUEST_GET_RADIO_CAPABILITY
|
||||
format is UMTS|LTE|... -->
|
||||
- <string translatable="false" name="config_radio_access_family">GSM|WCDMA</string>
|
||||
+ <string translatable="false" name="config_radio_access_family">GPRS|EDGE|UMTS|HSDPA|HSUPA|HSPA|LTE|HSPAP|GSM|WCDMA</string>
|
||||
|
||||
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
|
||||
<bool name="config_cellBroadcastAppLinks">true</bool>
|
||||
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
|
||||
index af352a4..22c65ea 100644
|
||||
--- a/overlay/packages/services/Telephony/res/values/config.xml
|
||||
+++ b/overlay/packages/services/Telephony/res/values/config.xml
|
||||
@@ -21,4 +21,7 @@
|
||||
are routed through the android.media.AudioManager class (true) or through
|
||||
the com.android.internal.telephony.Phone interface (false). -->
|
||||
<bool name="send_mic_mute_to_AudioManager">true</bool>
|
||||
+
|
||||
+ <!-- Show enabled lte option for lte device -->
|
||||
+ <bool name="config_enabled_lte" translatable="false">true</bool>
|
||||
</resources>
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 65d11ac33d0a3da260668c6dd18e5d28fefb272e Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Wed, 23 Nov 2016 18:38:32 -0500
|
||||
Subject: [PATCH] TWRP Support
|
||||
|
||||
Change-Id: Ib0a86923a40e21cddc1199141c70a7c776de3d1e
|
||||
---
|
||||
BoardConfig.mk | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/BoardConfig.mk b/BoardConfig.mk
|
||||
index ec97bae..ecf5253 100644
|
||||
--- a/BoardConfig.mk
|
||||
+++ b/BoardConfig.mk
|
||||
@@ -132,3 +132,19 @@ MALLOC_IMPL := dlmalloc
|
||||
BOARD_HAS_NO_SELECT_BUTTON := true
|
||||
|
||||
BOARD_HARDWARE_CLASS := device/lge/mako/cmhw/
|
||||
+
|
||||
+#TWRP
|
||||
+TW_THEME := portrait_hdpi
|
||||
+RECOVERY_SDCARD_ON_DATA := true
|
||||
+RECOVERY_GRAPHICS_USE_LINELENGTH := true
|
||||
+BOARD_HAS_NO_REAL_SDCARD := true
|
||||
+PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
|
||||
+TW_INCLUDE_JB_CRYPTO := true
|
||||
+TW_FLASH_FROM_STORAGE := true
|
||||
+TW_NO_USB_STORAGE := true
|
||||
+TW_MAX_BRIGHTNESS := 255
|
||||
+TW_BRIGHTNESS_PATH := /sys/class/leds/lcd-backlight/brightness
|
||||
+TW_INTERNAL_STORAGE_PATH := "/data/media"
|
||||
+TW_INTERNAL_STORAGE_MOUNT_POINT := "data"
|
||||
+TW_EXTERNAL_STORAGE_PATH := "/usb-otg"
|
||||
+TW_EXTERNAL_STORAGE_MOUNT_POINT := "usb-otg"
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 6fdf689f450e577750212ac5f0d3ffce50965651 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 17 Nov 2016 15:39:23 -0500
|
||||
Subject: [PATCH] Fix build failure
|
||||
|
||||
Change-Id: I94282a3df32daa97992c17476b0eb3e8f21e2499
|
||||
---
|
||||
overlay/frameworks/base/core/res/res/values/config.xml | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
index e0358e2..0b0549b 100644
|
||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
@@ -421,9 +421,6 @@
|
||||
format is UMTS|LTE|... -->
|
||||
<string translatable="false" name="config_radio_access_family">GSM | WCDMA | LTE | CDMA | EVDO</string>
|
||||
|
||||
- <!-- Component name of the service providing geofence API support. -->
|
||||
- <string name="config_geofenceProvider" translatable="false">com.qualcomm.location</string>
|
||||
-
|
||||
<string-array name="config_mobile_tcp_buffers">
|
||||
<item>"lte:2097152,4194304,8388608,262144,524288,1048576"</item>
|
||||
<item>"lte_ca:2097152,4194304,8388608,262144,524288,1048576"</item>
|
||||
@@ -442,9 +439,6 @@
|
||||
rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
|
||||
<string name="config_wifi_tcp_buffers" translatable="false">524288,2097152,4194304,262144,524288,1048576</string>
|
||||
|
||||
- <!-- Enable blur support -->
|
||||
- <bool name="config_ui_blur_enabled">true</bool>
|
||||
-
|
||||
<!-- Boolean indicating if current platform supports BLE peripheral mode -->
|
||||
<bool name="config_bluetooth_le_peripheral_mode_supported">true</bool>
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,39 +0,0 @@
|
||||
From 9e22fca4c687d84ba84428788d55b356069e29c7 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 17 Nov 2016 15:40:05 -0500
|
||||
Subject: [PATCH] Remove Sprint DM
|
||||
|
||||
Change-Id: I94d44bb4753cac72106f7c49997d69a0ec5556bd
|
||||
---
|
||||
proprietary-files.txt | 15 ---------------
|
||||
1 file changed, 15 deletions(-)
|
||||
|
||||
diff --git a/proprietary-files.txt b/proprietary-files.txt
|
||||
index f97d3e6..3675ce9 100644
|
||||
--- a/proprietary-files.txt
|
||||
+++ b/proprietary-files.txt
|
||||
@@ -290,21 +290,6 @@ lib64/libqti-iop.so
|
||||
vendor/lib/libqti-iop-client.so
|
||||
vendor/lib64/libqti-iop-client.so
|
||||
|
||||
-# DM/Sprint
|
||||
--app/DMConfigUpdateLight/DMConfigUpdateLight.apk
|
||||
--app/HiddenMenuLight/HiddenMenuLight.apk
|
||||
-lib/libdmengine.so
|
||||
-lib/libdmjavaplugin.so
|
||||
--priv-app/CQATest/CQATest.apk
|
||||
--priv-app/ConnMO/ConnMO.apk
|
||||
--priv-app/DCMO/DCMO.apk
|
||||
--priv-app/DMService/DMService.apk
|
||||
-lib/libdmengine.so:priv-app/DMService/lib/arm/libdmengine.so
|
||||
-lib/libdmjavaplugin.so:priv-app/DMService/lib/arm/libdmjavaplugin.so
|
||||
--priv-app/DiagMon/DiagMon.apk
|
||||
--priv-app/LifetimeData/LifetimeData.apk
|
||||
--priv-app/SprintDM/SprintDM.apk
|
||||
-
|
||||
# DRM
|
||||
# TZBSP
|
||||
bin/qseecomd
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 44299d2cda16b60235cc682988d59dd3dcd823a5 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 02:21:47 -0500
|
||||
Subject: [PATCH] Enable Dex-preopt
|
||||
|
||||
Change-Id: I7634ebac4af7a977cff21a6be83bbda11dc943f4
|
||||
---
|
||||
BoardConfig.mk | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/BoardConfig.mk b/BoardConfig.mk
|
||||
index 40022b4..250bbb5 100644
|
||||
--- a/BoardConfig.mk
|
||||
+++ b/BoardConfig.mk
|
||||
@@ -182,3 +182,6 @@ TARGET_USES_WCNSS_MAC_ADDR_REV := true
|
||||
WIFI_DRIVER_FW_PATH_STA := "sta"
|
||||
WIFI_DRIVER_FW_PATH_AP := "ap"
|
||||
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
+
|
||||
+#Dex pre-optimization
|
||||
+WITH_DEXPREOPT := true
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,68 +0,0 @@
|
||||
From 755b36c6f5e6feaac20112e0819299f63be3553d Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 18:22:00 -0500
|
||||
Subject: [PATCH] Remove Widevine and disable DRM server
|
||||
|
||||
Change-Id: I24d3ba704d00d85747d851a9a497dd577ad03b5f
|
||||
---
|
||||
Android.mk | 10 +---------
|
||||
proprietary-files.txt | 2 --
|
||||
system.prop | 2 +-
|
||||
3 files changed, 2 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index a69917c..693cba1 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -52,14 +52,6 @@ $(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /system/vendor/lib64/$(notdir $@) $@
|
||||
|
||||
-WV_IMAGES := widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt
|
||||
-WV_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WV_IMAGES)))
|
||||
-$(WV_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
- @echo "Widevine firmware link: $@"
|
||||
- @mkdir -p $(dir $@)
|
||||
- @rm -rf $@
|
||||
- $(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
-
|
||||
FIRMWARE_FILES := firmware fsg
|
||||
FIRMWARE_SYMLINKS := $(addprefix $(TARGET_OUT)/rfs/msm/mpss/readonly/,$(notdir $(FIRMWARE_FILES)))
|
||||
$(FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@@ -68,6 +60,6 @@ $(FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /$(notdir $@) $@
|
||||
|
||||
-ALL_DEFAULT_INSTALLED_MODULES += $(PERSIST_WCNSS) $(WCNSS_CFG_INI) $(IMS_SYMLINKS) $(WV_SYMLINKS) $(FIRMWARE_SYMLINKS)
|
||||
+ALL_DEFAULT_INSTALLED_MODULES += $(PERSIST_WCNSS) $(WCNSS_CFG_INI) $(IMS_SYMLINKS) $(FIRMWARE_SYMLINKS)
|
||||
|
||||
endif
|
||||
diff --git a/proprietary-files.txt b/proprietary-files.txt
|
||||
index 3675ce9..45dd63b 100644
|
||||
--- a/proprietary-files.txt
|
||||
+++ b/proprietary-files.txt
|
||||
@@ -293,8 +293,6 @@ vendor/lib64/libqti-iop-client.so
|
||||
# DRM
|
||||
# TZBSP
|
||||
bin/qseecomd
|
||||
-etc/permissions/com.google.widevine.software.drm.xml
|
||||
-framework/com.google.widevine.software.drm.jar
|
||||
lib/hw/keystore.qcom.so
|
||||
lib64/hw/keystore.qcom.so
|
||||
vendor/lib/libdrmfs.so
|
||||
diff --git a/system.prop b/system.prop
|
||||
index 6b1967c..4124bd4 100644
|
||||
--- a/system.prop
|
||||
+++ b/system.prop
|
||||
@@ -56,7 +56,7 @@ dalvik.vm.dex2oat-threads=2
|
||||
dalvik.vm.image-dex2oat-threads=4
|
||||
|
||||
# DRM
|
||||
-drm.service.enabled=true
|
||||
+drm.service.enabled=false
|
||||
|
||||
# FM
|
||||
ro.fm.transmitter=false
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,32 +0,0 @@
|
||||
From aa91f3c0beab9dbb78041540b59558631f63e30e Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 28 Nov 2016 07:04:58 -0500
|
||||
Subject: [PATCH] TWRP Support
|
||||
|
||||
Change-Id: I9c9caf279898f7f6cab5f2da81715e0a5440ca17
|
||||
---
|
||||
BoardConfig.mk | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/BoardConfig.mk b/BoardConfig.mk
|
||||
index 250bbb5..9be8f1c 100644
|
||||
--- a/BoardConfig.mk
|
||||
+++ b/BoardConfig.mk
|
||||
@@ -185,3 +185,14 @@ WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
|
||||
#Dex pre-optimization
|
||||
WITH_DEXPREOPT := true
|
||||
+
|
||||
+# TWRP
|
||||
+TW_THEME := portrait_hdpi
|
||||
+DEVICE_RESOLUTION := 1440x2560
|
||||
+TW_INCLUDE_L_CRYPTO := true
|
||||
+TW_TARGET_USES_QCOM_BSP := true
|
||||
+TW_NEW_ION_HEAP := true
|
||||
+TW_INCLUDE_CRYPTO := true
|
||||
+TW_SCREEN_BLANK_ON_BOOT := true
|
||||
+TARGET_RECOVERY_QCOM_RTC_FIX := true
|
||||
+TARGET_RECOVERY_FSTAB = $(DEVICE_PATH)/rootdir/fstab.qcom
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 5debdc1dd573384f7a1556a6db2d6960bd7259c5 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 17 Nov 2016 16:35:14 -0500
|
||||
Subject: [PATCH] Remove Widevine
|
||||
|
||||
Change-Id: I531feb804092b596af47e75530fa88b5c85f628a
|
||||
---
|
||||
Android.mk | 24 ------------------------
|
||||
1 file changed, 24 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index dde02c7..08fc62e 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -124,30 +124,6 @@ $(MC_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(MC_SYMLINKS)
|
||||
|
||||
-PLAYREADY_IMAGES := \
|
||||
- playread.b00 playread.b01 playread.b02 playread.b03 playread.mdt
|
||||
-
|
||||
-PLAYREADY_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(PLAYREADY_IMAGES)))
|
||||
-$(PLAYREADY_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
- @echo "Playready firmware link: $@"
|
||||
- @mkdir -p $(dir $@)
|
||||
- @rm -rf $@
|
||||
- $(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
-
|
||||
-ALL_DEFAULT_INSTALLED_MODULES += $(PLAYREADY_SYMLINKS)
|
||||
-
|
||||
-WV_IMAGES := \
|
||||
- widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt
|
||||
-
|
||||
-WV_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WV_IMAGES)))
|
||||
-$(WV_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
- @echo "Widevine firmware link: $@"
|
||||
- @mkdir -p $(dir $@)
|
||||
- @rm -rf $@
|
||||
- $(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
-
|
||||
-ALL_DEFAULT_INSTALLED_MODULES += $(WV_SYMLINKS)
|
||||
-
|
||||
# Create links for audcal data files
|
||||
$(shell mkdir -p $(TARGET_OUT)/etc/firmware/wcd9320; \
|
||||
ln -sf /data/misc/audio/wcd9320_anc.bin \
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,25 +0,0 @@
|
||||
From e12aa9baa815d0279aab7756edc4e9c130f0bbff Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 02:23:46 -0500
|
||||
Subject: [PATCH] Enable Dex-preopt
|
||||
|
||||
Change-Id: Id0ee761ca93a2a4cab0d40959610520b193d0528
|
||||
---
|
||||
BoardConfig.mk | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/BoardConfig.mk b/BoardConfig.mk
|
||||
index 35bde5d..ff476f7 100644
|
||||
--- a/BoardConfig.mk
|
||||
+++ b/BoardConfig.mk
|
||||
@@ -197,4 +197,7 @@ TARGET_LDPRELOAD := libNimsWrap.so
|
||||
endif
|
||||
endif
|
||||
|
||||
+#Dex pre-optimization
|
||||
+WITH_DEXPREOPT := true
|
||||
+
|
||||
-include vendor/oneplus/bacon/BoardConfigVendor.mk
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,27 +0,0 @@
|
||||
From d06526ec844bf89e77c518dbcd0deb331babf8dd Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sun, 18 Dec 2016 09:30:44 -0500
|
||||
Subject: [PATCH] Enable secure_delete by default
|
||||
|
||||
Change-Id: Ic2604b78f57998c001df9737ab0fdec2298122c4
|
||||
---
|
||||
dist/Android.mk | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dist/Android.mk b/dist/Android.mk
|
||||
index bf277d2..8113e32 100644
|
||||
--- a/dist/Android.mk
|
||||
+++ b/dist/Android.mk
|
||||
@@ -27,7 +27,8 @@ minimal_sqlite_flags := \
|
||||
-DSQLITE_OMIT_BUILTIN_TEST \
|
||||
-DSQLITE_OMIT_COMPILEOPTION_DIAGS \
|
||||
-DSQLITE_OMIT_LOAD_EXTENSION \
|
||||
- -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
|
||||
+ -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 \
|
||||
+ -DSQLITE_SECURE_DELETE
|
||||
|
||||
device_sqlite_flags := $(minimal_sqlite_flags) \
|
||||
-DSQLITE_ENABLE_ICU \
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 4211c35467725729615cce8fe3cd25f0de58da2a Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 12:30:43 -0500
|
||||
Subject: [PATCH] Allow location providers outside of /system
|
||||
|
||||
Change-Id: I405981605aeb00a4482d7191905963fc97a5d424
|
||||
---
|
||||
services/core/java/com/android/server/ServiceWatcher.java | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/ServiceWatcher.java b/services/core/java/com/android/server/ServiceWatcher.java
|
||||
index 383e25a..31ae918 100644
|
||||
--- a/services/core/java/com/android/server/ServiceWatcher.java
|
||||
+++ b/services/core/java/com/android/server/ServiceWatcher.java
|
||||
@@ -92,8 +92,7 @@ public class ServiceWatcher implements ServiceConnection {
|
||||
String pkg = initialPackageNames.get(i);
|
||||
try {
|
||||
HashSet<Signature> set = new HashSet<Signature>();
|
||||
- Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.MATCH_SYSTEM_ONLY
|
||||
- | PackageManager.GET_SIGNATURES).signatures;
|
||||
+ Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.GET_SIGNATURES).signatures;
|
||||
set.addAll(Arrays.asList(sigs));
|
||||
sigSets.add(set);
|
||||
} catch (NameNotFoundException e) {
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 4921beaf996a89c9a56b98f213401ceeb2a23082 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 14:52:59 -0500
|
||||
Subject: [PATCH] Shutdown after 5 failed unlock attempts
|
||||
|
||||
Change-Id: Icc23122e5a25b756872fe132cd0e93684e8bafca
|
||||
---
|
||||
.../Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java | 5 +++++
|
||||
packages/SystemUI/AndroidManifest.xml | 1 +
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
index aaff265..865956f 100644
|
||||
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
|
||||
@@ -22,6 +22,7 @@ import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
+import android.os.PowerManager;
|
||||
import android.os.UserHandle;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -366,6 +367,10 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
||||
if (!enableTimesCounter && (timeoutMs > 0)) {
|
||||
showTimeoutDialog(timeoutMs);
|
||||
}
|
||||
+ if (failedAttempts >=5) {
|
||||
+ final PowerManager powerManager = mContext.getSystemService(PowerManager.class);
|
||||
+ powerManager.shutdown(false, false);
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
|
||||
index 2248baf..b13b0fd 100644
|
||||
--- a/packages/SystemUI/AndroidManifest.xml
|
||||
+++ b/packages/SystemUI/AndroidManifest.xml
|
||||
@@ -112,6 +112,7 @@
|
||||
<uses-permission android:name="android.permission.TRUST_LISTENER" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
<uses-permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT" />
|
||||
+ <uses-permission android:name="android.permission.REBOOT" />
|
||||
|
||||
<!-- Needed for WallpaperManager.clear in ImageWallpaper.updateWallpaperLocked -->
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,97 +0,0 @@
|
||||
From 44cda6f5e47c33e91980ae35c8bc6d88e4d3763c Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Thu, 24 Nov 2016 13:01:30 -0500
|
||||
Subject: [PATCH] Allow packages to spoof their signature
|
||||
|
||||
Change-Id: I9acf48c7607804890d0d0fa7fe30bb36779cb40d
|
||||
---
|
||||
core/res/AndroidManifest.xml | 7 +++++++
|
||||
core/res/res/values/config.xml | 2 ++
|
||||
core/res/res/values/strings.xml | 5 +++++
|
||||
.../android/server/pm/PackageManagerService.java | 23 ++++++++++++++++++++--
|
||||
4 files changed, 35 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||||
index b624305..43eec1f 100644
|
||||
--- a/core/res/AndroidManifest.xml
|
||||
+++ b/core/res/AndroidManifest.xml
|
||||
@@ -1926,6 +1926,13 @@
|
||||
android:description="@string/permdesc_getPackageSize"
|
||||
android:protectionLevel="normal" />
|
||||
|
||||
+ <!-- @hide Allows an application to change the package signature as
|
||||
+ seen by applications -->
|
||||
+ <permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
|
||||
+ android:protectionLevel="dangerous"
|
||||
+ android:label="@string/permlab_fakePackageSignature"
|
||||
+ android:description="@string/permdesc_fakePackageSignature" />
|
||||
+
|
||||
<!-- @deprecated No longer useful, see
|
||||
{@link android.content.pm.PackageManager#addPackageToPreferred}
|
||||
for details. -->
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 4a95f6e..702e02a 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -1383,6 +1383,8 @@
|
||||
<string-array name="config_locationProviderPackageNames" translatable="false">
|
||||
<!-- The standard AOSP fused location provider -->
|
||||
<item>com.android.location.fused</item>
|
||||
+ <!-- The (faked) microg fused location provider -->
|
||||
+ <item>com.google.android.gms</item>
|
||||
</string-array>
|
||||
|
||||
<!-- This string array can be overriden to enable test location providers initially. -->
|
||||
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
||||
index 345d377..26814f1 100644
|
||||
--- a/core/res/res/values/strings.xml
|
||||
+++ b/core/res/res/values/strings.xml
|
||||
@@ -660,6 +660,11 @@
|
||||
|
||||
<!-- Permissions -->
|
||||
|
||||
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
+ <string name="permlab_fakePackageSignature">Spoof package signature</string>
|
||||
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
+ <string name="permdesc_fakePackageSignature">Allows the app to pretend to be a different app. Malicious applications might be able to use this to access private application data. Grant this permission with caution only!</string>
|
||||
+
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permlab_statusBar">disable or modify status bar</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
index d450288..9194e69 100644
|
||||
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
||||
@@ -3141,8 +3141,27 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
? Collections.<String>emptySet() : permissionsState.getPermissions(userId);
|
||||
final PackageUserState state = ps.readUserState(userId);
|
||||
|
||||
- return PackageParser.generatePackageInfo(p, gids, flags,
|
||||
- ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId);
|
||||
+ return mayFakeSignature(p, PackageParser.generatePackageInfo(p, gids, flags,
|
||||
+ ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId),
|
||||
+ permissions);
|
||||
+ }
|
||||
+
|
||||
+ private PackageInfo mayFakeSignature(PackageParser.Package p, PackageInfo pi,
|
||||
+ Set<String> permissions) {
|
||||
+ try {
|
||||
+ if (permissions.contains("android.permission.FAKE_PACKAGE_SIGNATURE")
|
||||
+ && p.applicationInfo.targetSdkVersion > Build.VERSION_CODES.LOLLIPOP_MR1
|
||||
+ && p.mAppMetaData != null) {
|
||||
+ String sig = p.mAppMetaData.getString("fake-signature");
|
||||
+ if (sig != null) {
|
||||
+ pi.signatures = new Signature[] {new Signature(sig)};
|
||||
+ }
|
||||
+ }
|
||||
+ } catch (Throwable t) {
|
||||
+ // We should never die because of any failures, this is system code!
|
||||
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
|
||||
+ }
|
||||
+ return pi;
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,54 +0,0 @@
|
||||
From c46d22ad7a92e72f4ba9ba3a36e8dbdb566f4a07 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sun, 18 Dec 2016 09:36:07 -0500
|
||||
Subject: [PATCH] Hide passwords by default
|
||||
|
||||
Change-Id: I95e26ff6219f6209d5b9fc7ae92a453b53b0aa76
|
||||
---
|
||||
core/java/android/text/method/TextKeyListener.java | 2 +-
|
||||
core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java | 2 +-
|
||||
packages/Keyguard/src/com/android/keyguard/PasswordTextView.java | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/text/method/TextKeyListener.java b/core/java/android/text/method/TextKeyListener.java
|
||||
index 994f3d7..b2ac244 100644
|
||||
--- a/core/java/android/text/method/TextKeyListener.java
|
||||
+++ b/core/java/android/text/method/TextKeyListener.java
|
||||
@@ -291,7 +291,7 @@ public class TextKeyListener extends BaseKeyListener implements SpanWatcher {
|
||||
boolean cap = System.getInt(resolver, System.TEXT_AUTO_CAPS, 1) > 0;
|
||||
boolean text = System.getInt(resolver, System.TEXT_AUTO_REPLACE, 1) > 0;
|
||||
boolean period = System.getInt(resolver, System.TEXT_AUTO_PUNCTUATE, 1) > 0;
|
||||
- boolean pw = System.getInt(resolver, System.TEXT_SHOW_PASSWORD, 1) > 0;
|
||||
+ boolean pw = System.getInt(resolver, System.TEXT_SHOW_PASSWORD, 0) > 0;
|
||||
|
||||
mPrefs = (cap ? AUTO_CAP : 0) |
|
||||
(text ? AUTO_TEXT : 0) |
|
||||
diff --git a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
||||
index b2c9dc5..dc5b7f9 100644
|
||||
--- a/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
||||
+++ b/core/java/com/android/internal/widget/PasswordEntryKeyboardHelper.java
|
||||
@@ -159,7 +159,7 @@ public class PasswordEntryKeyboardHelper implements OnKeyboardActionListener {
|
||||
mKeyboardState = KEYBOARD_STATE_NORMAL;
|
||||
final boolean visiblePassword = Settings.System.getInt(
|
||||
mContext.getContentResolver(),
|
||||
- Settings.System.TEXT_SHOW_PASSWORD, 1) != 0;
|
||||
+ Settings.System.TEXT_SHOW_PASSWORD, 0) != 0;
|
||||
final boolean enablePreview = false; // TODO: grab from configuration
|
||||
mKeyboardView.setPreviewEnabled(visiblePassword && enablePreview);
|
||||
break;
|
||||
diff --git a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
||||
index 48737f9..3f4c381 100644
|
||||
--- a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
||||
+++ b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
|
||||
@@ -134,7 +134,7 @@ public class PasswordTextView extends View {
|
||||
mDrawPaint.setColor(0xffffffff);
|
||||
mDrawPaint.setTypeface(Typeface.create("sans-serif-light", 0));
|
||||
mShowPassword = Settings.System.getInt(mContext.getContentResolver(),
|
||||
- Settings.System.TEXT_SHOW_PASSWORD, 1) == 1;
|
||||
+ Settings.System.TEXT_SHOW_PASSWORD, 0) == 1;
|
||||
mAppearInterpolator = AnimationUtils.loadInterpolator(mContext,
|
||||
android.R.interpolator.linear_out_slow_in);
|
||||
mDisappearInterpolator = AnimationUtils.loadInterpolator(mContext,
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 6c9c966622adbfe0ad92ed90d90f93a782c99f02 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sun, 18 Dec 2016 19:10:20 -0500
|
||||
Subject: [PATCH] Harden signature spoofing
|
||||
|
||||
Change-Id: I31e2a20923fff883c87fa6425408971657d3d7b3
|
||||
---
|
||||
core/res/AndroidManifest.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
||||
index 486999b..182acbf 100644
|
||||
--- a/core/res/AndroidManifest.xml
|
||||
+++ b/core/res/AndroidManifest.xml
|
||||
@@ -1937,7 +1937,7 @@
|
||||
<!-- @hide Allows an application to change the package signature as
|
||||
seen by applications -->
|
||||
<permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
|
||||
- android:protectionLevel="dangerous"
|
||||
+ android:protectionLevel="signature"
|
||||
android:label="@string/permlab_fakePackageSignature"
|
||||
android:description="@string/permdesc_fakePackageSignature" />
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,484 +0,0 @@
|
||||
From 28793d3021e480bba68fe8b76d9848a6b8aee5d5 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Tue, 3 Nov 2015 21:21:34 -0500
|
||||
Subject: [PATCH 1/3] msm8992 initial overclocking
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992-regulator.dtsi | 30 ++++++++++++--------
|
||||
arch/arm/boot/dts/qcom/msm8992.dtsi | 40 +++++++++++++++++++-------
|
||||
drivers/clk/qcom/clock-cpu-8994.c | 8 +++---
|
||||
drivers/cpufreq/qcom-cpufreq.c | 41 +++++++++++++++++++++++++++
|
||||
4 files changed, 93 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
index d5f6860..23b23ba 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
@@ -605,7 +605,7 @@
|
||||
regulator-name = "apc0_corner";
|
||||
qcom,cpr-fuse-corners = <4>;
|
||||
regulator-min-microvolt = <1>;
|
||||
- regulator-max-microvolt = <10>;
|
||||
+ regulator-max-microvolt = <12>;
|
||||
|
||||
qcom,cpr-voltage-ceiling = <900000 900000 1000000 1180000>;
|
||||
qcom,cpr-voltage-floor = <640000 700000 800000 850000>;
|
||||
@@ -669,15 +669,15 @@
|
||||
qcom,cpr-init-voltage-ref = <900000 900000 1000000 1230000>;
|
||||
qcom,cpr-init-voltage-step = <10000>;
|
||||
|
||||
- qcom,cpr-corner-map = <1 1 2 2 3 3 4 4 4 4>;
|
||||
+ qcom,cpr-corner-map = <1 1 2 2 3 3 4 4 4 4 4 4>;
|
||||
qcom,cpr-voltage-ceiling-override =
|
||||
<0xFFFFFFFF 0 800000 800000 900000 900000
|
||||
1000000 1000000 1115000 1115000
|
||||
- 1180000 1180000>;
|
||||
+ 1180000 1180000 1180000 1180000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 655000 700000 735000
|
||||
800000 835000 850000 875000
|
||||
- 950000 1000000>;
|
||||
+ 950000 1000000 1000000 1000000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0 0xffffffff 0 0 0 0 0>,
|
||||
<0 0xffffffff 1 0 0 0 0>,
|
||||
@@ -759,10 +759,12 @@
|
||||
<7 864000000>,
|
||||
<8 960000000>,
|
||||
<9 1248000000>,
|
||||
- <10 1440000000>;
|
||||
+ <10 1440000000>,
|
||||
+ <11 1536000000>,
|
||||
+ <12 1632000000>;
|
||||
qcom,cpr-speed-bin-max-corners =
|
||||
<0 0 2 4 6 9>,
|
||||
- <1 0 2 4 6 10>;
|
||||
+ <1 0 2 4 6 12>;
|
||||
qcom,cpr-enable;
|
||||
};
|
||||
|
||||
@@ -774,7 +776,7 @@
|
||||
regulator-name = "apc1_corner";
|
||||
qcom,cpr-fuse-corners = <4>;
|
||||
regulator-min-microvolt = <1>;
|
||||
- regulator-max-microvolt = <15>;
|
||||
+ regulator-max-microvolt = <17>;
|
||||
|
||||
qcom,cpr-voltage-ceiling = <900000 900000 1000000 1180000>;
|
||||
qcom,cpr-voltage-floor = <640000 640000 745000 850000>;
|
||||
@@ -841,17 +843,19 @@
|
||||
qcom,cpr-init-voltage-ref = <900000 900000 1000000 1230000>;
|
||||
qcom,cpr-init-voltage-step = <10000>;
|
||||
|
||||
- qcom,cpr-corner-map = <1 2 2 2 2 3 3 3 4 4 4 4 4 4 4>;
|
||||
+ qcom,cpr-corner-map = <1 2 2 2 2 3 3 3 4 4 4 4 4 4 4 4 4>;
|
||||
qcom,cpr-voltage-ceiling-override =
|
||||
<0xFFFFFFFF 0 900000 900000 900000 900000
|
||||
900000 1000000 1000000 1000000
|
||||
1115000 1115000 1115000 1115000
|
||||
- 1115000 1115000 1180000>;
|
||||
+ 1115000 1115000 1180000 1180000
|
||||
+ 1180000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 640000 665000 690000
|
||||
735000 745000 770000 785000
|
||||
850000 860000 880000 900000
|
||||
- 920000 935000 1000000>;
|
||||
+ 920000 935000 1000000 1000000
|
||||
+ 1000000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0xffffffff 0xffffffff 0 4 4 4 4>,
|
||||
<0xffffffff 0xffffffff 1 4 4 4 4>,
|
||||
@@ -908,9 +912,11 @@
|
||||
<12 1536000000>,
|
||||
<13 1632000000>,
|
||||
<14 1689600000>,
|
||||
- <15 1824000000>;
|
||||
+ <15 1824000000>,
|
||||
+ <16 1958400000>,
|
||||
+ <17 2016000000>;
|
||||
qcom,cpr-speed-bin-max-corners =
|
||||
- <0xFFFFFFFF 0 1 5 8 15>;
|
||||
+ <0xFFFFFFFF 0 1 5 8 17>;
|
||||
qcom,cpr-enable;
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992.dtsi b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
index 5ba420c..8892b56 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
@@ -852,7 +852,9 @@
|
||||
< 787200 3509 >,
|
||||
< 864000 4173 >,
|
||||
< 960000 5271 >,
|
||||
- < 1440000 7102 >;
|
||||
+ < 1440000 7102 >,
|
||||
+ < 1536000 7102 >,
|
||||
+ < 1632000 7102 >;
|
||||
cpu-to-dev-map-4 =
|
||||
< 384000 1525 >,
|
||||
< 633600 2288 >,
|
||||
@@ -860,16 +862,22 @@
|
||||
< 864000 4173 >,
|
||||
< 960000 5271 >,
|
||||
< 1344000 5928 >,
|
||||
- < 1824000 7102 >;
|
||||
+ < 1824000 7102 >,
|
||||
+ < 1958400 7102 >,
|
||||
+ < 2016000 7102 >;
|
||||
};
|
||||
|
||||
mincpubw-cpufreq {
|
||||
target-dev = <&mincpubw>;
|
||||
cpu-to-dev-map-0 =
|
||||
- < 1440000 1525 >;
|
||||
+ < 1440000 1525 >,
|
||||
+ < 1536000 1525 >,
|
||||
+ < 1632000 1525 >;
|
||||
cpu-to-dev-map-4 =
|
||||
< 1689600 1525 >,
|
||||
- < 1824000 5928 >;
|
||||
+ < 1824000 1525 >,
|
||||
+ < 1958400 1525 >,
|
||||
+ < 2016000 5928 >;
|
||||
};
|
||||
|
||||
cci-cpufreq {
|
||||
@@ -880,7 +888,9 @@
|
||||
< 787200 384000 >,
|
||||
< 864000 556800 >,
|
||||
< 960000 729600 >,
|
||||
- < 1440000 787200 >;
|
||||
+ < 1440000 787200 >,
|
||||
+ < 1536000 787200 >,
|
||||
+ < 1632000 787200 >;
|
||||
cpu-to-dev-map-4 =
|
||||
< 384000 134400 >,
|
||||
< 480000 300000 >,
|
||||
@@ -888,7 +898,9 @@
|
||||
< 768000 556800 >,
|
||||
< 960000 600000 >,
|
||||
< 1440000 729600 >,
|
||||
- < 1824000 787200 >;
|
||||
+ < 1824000 787200 >,
|
||||
+ < 1958400 787200 >,
|
||||
+ < 2016000 787200 >;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -915,7 +927,9 @@
|
||||
< 864000 >,
|
||||
< 960000 >,
|
||||
< 1248000 >,
|
||||
- < 1440000 >;
|
||||
+ < 1440000 >,
|
||||
+ < 1536000 >,
|
||||
+ < 1632000 >;
|
||||
|
||||
qcom,cpufreq-table-4 =
|
||||
< 384000 >,
|
||||
@@ -930,7 +944,9 @@
|
||||
< 1536000 >,
|
||||
< 1632000 >,
|
||||
< 1689600 >,
|
||||
- < 1824000 >;
|
||||
+ < 1824000 >,
|
||||
+ < 1958400 >,
|
||||
+ < 2016000 >;
|
||||
|
||||
};
|
||||
|
||||
@@ -968,7 +984,9 @@
|
||||
< 864000000 7>,
|
||||
< 960000000 8>,
|
||||
< 1248000000 9>,
|
||||
- < 1440000000 10>;
|
||||
+ < 1440000000 10>,
|
||||
+ < 1536000000 11>,
|
||||
+ < 1632000000 12>;
|
||||
qcom,a57-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
< 384000000 5>,
|
||||
@@ -983,7 +1001,9 @@
|
||||
< 1536000000 12>,
|
||||
< 1632000000 13>,
|
||||
< 1689600000 14>,
|
||||
- < 1824000000 15>;
|
||||
+ < 1824000000 15>,
|
||||
+ < 1958400000 16>,
|
||||
+ < 2016000000 17>;
|
||||
qcom,cci-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
< 134400000 2>,
|
||||
diff --git a/drivers/clk/qcom/clock-cpu-8994.c b/drivers/clk/qcom/clock-cpu-8994.c
|
||||
index 6eb346b..de3d72f 100644
|
||||
--- a/drivers/clk/qcom/clock-cpu-8994.c
|
||||
+++ b/drivers/clk/qcom/clock-cpu-8994.c
|
||||
@@ -191,13 +191,13 @@ static struct pll_clk a57_pll0 = {
|
||||
.test_ctl_lo_val = 0x00010000,
|
||||
},
|
||||
.min_rate = 1209600000,
|
||||
- .max_rate = 1996800000,
|
||||
+ .max_rate = 2073600000,
|
||||
.base = &vbases[C1_PLL_BASE],
|
||||
.c = {
|
||||
.parent = &xo_ao.c,
|
||||
.dbg_name = "a57_pll0",
|
||||
.ops = &clk_ops_variable_rate_pll,
|
||||
- VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 1996800000),
|
||||
+ VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 2073600000),
|
||||
CLK_INIT(a57_pll0.c),
|
||||
},
|
||||
};
|
||||
@@ -229,13 +229,13 @@ static struct pll_clk a57_pll1 = {
|
||||
/* Necessary since we'll be setting a rate before handoff on V1 */
|
||||
.src_rate = 19200000,
|
||||
.min_rate = 1209600000,
|
||||
- .max_rate = 1996800000,
|
||||
+ .max_rate = 2073600000,
|
||||
.base = &vbases[C1_PLL_BASE],
|
||||
.c = {
|
||||
.parent = &xo_ao.c,
|
||||
.dbg_name = "a57_pll1",
|
||||
.ops = &clk_ops_variable_rate_pll,
|
||||
- VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 1996800000),
|
||||
+ VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 2073600000),
|
||||
CLK_INIT(a57_pll1.c),
|
||||
},
|
||||
};
|
||||
diff --git a/drivers/cpufreq/qcom-cpufreq.c b/drivers/cpufreq/qcom-cpufreq.c
|
||||
index e30b0cb..dd3a589 100644
|
||||
--- a/drivers/cpufreq/qcom-cpufreq.c
|
||||
+++ b/drivers/cpufreq/qcom-cpufreq.c
|
||||
@@ -31,6 +31,40 @@
|
||||
|
||||
static DEFINE_MUTEX(l2bw_lock);
|
||||
|
||||
+static unsigned long arg_cpu_max_a53 = 1440000;
|
||||
+
|
||||
+static int __init cpufreq_read_cpu_max_a53(char *cpu_max_a53)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = kstrtoul(cpu_max_a53, 0, &ui_khz);
|
||||
+ if (ret)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ arg_cpu_max_a53 = ui_khz;
|
||||
+ printk("cpu_max_a53=%lu\n", arg_cpu_max_a53);
|
||||
+ return ret;
|
||||
+}
|
||||
+__setup("cpu_max_a53=", cpufreq_read_cpu_max_a53);
|
||||
+
|
||||
+static unsigned long arg_cpu_max_a57 = 1824000;
|
||||
+
|
||||
+static int __init cpufreq_read_cpu_max_a57(char *cpu_max_a57)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = kstrtoul(cpu_max_a57, 0, &ui_khz);
|
||||
+ if (ret)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ arg_cpu_max_a57 = ui_khz;
|
||||
+ printk("cpu_max_a57=%lu\n", arg_cpu_max_a57);
|
||||
+ return ret;
|
||||
+}
|
||||
+__setup("cpu_max_a57=", cpufreq_read_cpu_max_a57);
|
||||
+
|
||||
static struct clk *cpu_clk[NR_CPUS];
|
||||
static struct clk *l2_clk;
|
||||
static DEFINE_PER_CPU(struct cpufreq_frequency_table *, freq_table);
|
||||
@@ -364,6 +398,13 @@ static struct cpufreq_frequency_table *cpufreq_parse_dt(struct device *dev,
|
||||
if (i > 0 && f <= ftbl[i-1].frequency)
|
||||
break;
|
||||
|
||||
+ //Custom max freq
|
||||
+ if ((cpu < 4 && f > arg_cpu_max_a53) ||
|
||||
+ (cpu >= 4 && f > arg_cpu_max_a57)) {
|
||||
+ nf = i;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
ftbl[i].driver_data = i;
|
||||
ftbl[i].frequency = f;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 9dfe99b9f8eead920f7cdefdb2ae7b1cea776d9b Mon Sep 17 00:00:00 2001
|
||||
From: dirtyhank <dirtyhank@gmail.com>
|
||||
Date: Thu, 14 Jan 2016 12:56:07 +0100
|
||||
Subject: [PATCH 2/3] CPU underclocking
|
||||
|
||||
Based on underclocking to Nexus 6P by anarkia1976
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992-regulator.dtsi | 6 +++---
|
||||
arch/arm/boot/dts/qcom/msm8992.dtsi | 14 +++++++++++---
|
||||
2 files changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
index 23b23ba..1ef9eb3 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
@@ -750,7 +750,7 @@
|
||||
qcom,cpr-voltage-scaling-factor-max = <0 0 2000 2000>;
|
||||
qcom,cpr-quot-adjust-scaling-factor-max = <0 2000 2000 2000>;
|
||||
qcom,cpr-corner-frequency-map =
|
||||
- <1 300000000>,
|
||||
+ <1 302400000>,
|
||||
<2 384000000>,
|
||||
<3 460800000>,
|
||||
<4 600000000>,
|
||||
@@ -898,8 +898,8 @@
|
||||
qcom,cpr-voltage-scaling-factor-max = <0 0 2000 2000>;
|
||||
qcom,cpr-quot-adjust-scaling-factor-max = <0 0 2000 2000>;
|
||||
qcom,cpr-corner-frequency-map =
|
||||
- <1 300000000>, /* SVS Fmin for "SVS2" */
|
||||
- <2 300000000>,
|
||||
+ <1 302400000>, /* SVS Fmin for "SVS2" */
|
||||
+ <2 302400000>,
|
||||
<3 384000000>,
|
||||
<4 480000000>,
|
||||
<5 633600000>,
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992.dtsi b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
index 8892b56..f6a39cd 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
@@ -796,7 +796,7 @@
|
||||
governor = "cpufreq";
|
||||
freq-tbl-khz =
|
||||
< 134400 >,
|
||||
- < 300000 >,
|
||||
+ < 302400 >,
|
||||
< 384000 >,
|
||||
< 556800 >,
|
||||
< 600000 >,
|
||||
@@ -856,7 +856,8 @@
|
||||
< 1536000 7102 >,
|
||||
< 1632000 7102 >;
|
||||
cpu-to-dev-map-4 =
|
||||
- < 384000 1525 >,
|
||||
+ < 302400 1525 >,
|
||||
+ < 384000 1525 >,
|
||||
< 633600 2288 >,
|
||||
< 768000 3509 >,
|
||||
< 864000 4173 >,
|
||||
@@ -883,6 +884,7 @@
|
||||
cci-cpufreq {
|
||||
target-dev = <&cci_cache>;
|
||||
cpu-to-dev-map-0 =
|
||||
+ < 302400 134400 >,
|
||||
< 384000 134400 >,
|
||||
< 600000 300000 >,
|
||||
< 787200 384000 >,
|
||||
@@ -892,6 +894,7 @@
|
||||
< 1536000 787200 >,
|
||||
< 1632000 787200 >;
|
||||
cpu-to-dev-map-4 =
|
||||
+ < 302400 134400 >,
|
||||
< 384000 134400 >,
|
||||
< 480000 300000 >,
|
||||
< 633600 384000 >,
|
||||
@@ -919,6 +922,7 @@
|
||||
qcom,governor-per-policy;
|
||||
|
||||
qcom,cpufreq-table-0 =
|
||||
+ < 302400 >,
|
||||
< 384000 >,
|
||||
< 460800 >,
|
||||
< 600000 >,
|
||||
@@ -932,6 +936,7 @@
|
||||
< 1632000 >;
|
||||
|
||||
qcom,cpufreq-table-4 =
|
||||
+ < 302400 >,
|
||||
< 384000 >,
|
||||
< 480000 >,
|
||||
< 633600 >,
|
||||
@@ -966,6 +971,7 @@
|
||||
vdd-dig-supply = <&pm8994_s2_corner_ao>;
|
||||
qcom,a53-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
+ < 302400000 1>,
|
||||
< 384000000 2>,
|
||||
< 460800000 3>,
|
||||
< 600000000 4>,
|
||||
@@ -976,6 +982,7 @@
|
||||
< 1248000000 9>;
|
||||
qcom,a53-speedbin1-v0 =
|
||||
< 0 0>,
|
||||
+ < 302400000 1>,
|
||||
< 384000000 2>,
|
||||
< 460800000 3>,
|
||||
< 600000000 4>,
|
||||
@@ -989,6 +996,7 @@
|
||||
< 1632000000 12>;
|
||||
qcom,a57-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
+ < 302400000 5>,
|
||||
< 384000000 5>,
|
||||
< 480000000 5>,
|
||||
< 633600000 5>,
|
||||
@@ -1007,7 +1015,7 @@
|
||||
qcom,cci-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
< 134400000 2>,
|
||||
- < 300000000 4>,
|
||||
+ < 302400000 4>,
|
||||
< 384000000 6>,
|
||||
< 556800000 6>,
|
||||
< 600000000 8>,
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From b7e24657fb125b77bb5d9a39493040e1234c7c83 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Mon, 21 Nov 2016 21:40:09 -0500
|
||||
Subject: [PATCH 3/3] msm8992: bump oc voltages
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992-regulator.dtsi | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
index 1ef9eb3..d2a875b 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
@@ -673,11 +673,11 @@
|
||||
qcom,cpr-voltage-ceiling-override =
|
||||
<0xFFFFFFFF 0 800000 800000 900000 900000
|
||||
1000000 1000000 1115000 1115000
|
||||
- 1180000 1180000 1180000 1180000>;
|
||||
+ 1180000 1180000 1180000 1200000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 655000 700000 735000
|
||||
800000 835000 850000 875000
|
||||
- 950000 1000000 1000000 1000000>;
|
||||
+ 950000 1000000 1000000 1100000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0 0xffffffff 0 0 0 0 0>,
|
||||
<0 0xffffffff 1 0 0 0 0>,
|
||||
@@ -849,13 +849,13 @@
|
||||
900000 1000000 1000000 1000000
|
||||
1115000 1115000 1115000 1115000
|
||||
1115000 1115000 1180000 1180000
|
||||
- 1180000>;
|
||||
+ 1200000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 640000 665000 690000
|
||||
735000 745000 770000 785000
|
||||
850000 860000 880000 900000
|
||||
920000 935000 1000000 1000000
|
||||
- 1000000>;
|
||||
+ 1100000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0xffffffff 0xffffffff 0 4 4 4 4>,
|
||||
<0xffffffff 0xffffffff 1 4 4 4 4>,
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,42 +0,0 @@
|
||||
From f24f2dec25043cf7e6ef0f80a65dde45f2f131dd Mon Sep 17 00:00:00 2001
|
||||
From: franciscofranco <franciscofranco.1990@gmail.com>
|
||||
Date: Wed, 20 Jan 2016 01:45:39 +0000
|
||||
Subject: [PATCH] IKSWM-6057: dts: mmc: remove wakeup on idle flag
|
||||
|
||||
Remove the wakeup-on-idle flag can improve the mmc
|
||||
performance(verified with iozone). No current drain
|
||||
and other system performance impact.
|
||||
|
||||
Change-Id: Ia90cdfb66569b5ee3713d2c9785a2b7a9d24760e
|
||||
Signed-off-by: Lianwei Wang <a22439@motorola.com>
|
||||
Reviewed-on: http://gerrit.mot.com/785887
|
||||
SLTApproved: Slta Waiver <sltawvr@motorola.com>
|
||||
SME-Granted: SME Approvals Granted
|
||||
Tested-by: Jira Key <jirakey@motorola.com>
|
||||
Reviewed-by: Zhi-Ming Yuan <a14194@motorola.com>
|
||||
Submit-Approved: Jira Key <jirakey@motorola.com>
|
||||
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992.dtsi | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992.dtsi b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
index 5dedecb..dc70365 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
@@ -1706,7 +1706,6 @@
|
||||
qcom,cpu-dma-latency-us = <301 70>;
|
||||
qcom,cpu-affinity = "affine_cores";
|
||||
qcom,cpu-affinity-mask = <0x0f 0xf0>;
|
||||
- qcom,wakeup-on-idle;
|
||||
|
||||
qcom,msm-bus,name = "sdhc1";
|
||||
qcom,msm-bus,num-cases = <9>;
|
||||
@@ -1746,7 +1745,6 @@
|
||||
qcom,cpu-dma-latency-us = <301 70>;
|
||||
qcom,cpu-affinity = "affine_cores";
|
||||
qcom,cpu-affinity-mask = <0x0f 0xf0>;
|
||||
- qcom,wakeup-on-idle;
|
||||
|
||||
qcom,msm-bus,name = "sdhc2";
|
||||
qcom,msm-bus,num-cases = <8>;
|
@ -1,757 +0,0 @@
|
||||
From ec5d8918e9d3149ce489900f48d6e6ebd2fd5031 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Reioux <reioux@gmail.com>
|
||||
Date: Sun, 20 Oct 2013 22:30:36 -0500
|
||||
Subject: [PATCH 1/5] Voltage Control: initial voltage control for MSM
|
||||
Snapdragon 800 SOC
|
||||
|
||||
Signed-off-by: Paul Reioux <reioux@gmail.com>
|
||||
Signed-off-by: flar2 <asegaert@gmail.com>
|
||||
---
|
||||
arch/arm/mach-msm/Kconfig | 6 +++++
|
||||
arch/arm/mach-msm/acpuclock-krait.c | 48 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
|
||||
index ba5a33c..44db2ca 100644
|
||||
--- a/arch/arm/mach-msm/Kconfig
|
||||
+++ b/arch/arm/mach-msm/Kconfig
|
||||
@@ -1918,6 +1918,12 @@ config MSM_CPU_FREQ_MIN
|
||||
|
||||
endif # CPU_FREQ_MSM
|
||||
|
||||
+config CPU_VOLTAGE_TABLE
|
||||
+ bool "Enable CPU Voltage Table via sysfs for adjustements"
|
||||
+ default n
|
||||
+ help
|
||||
+ Krait User Votlage Control
|
||||
+
|
||||
config MSM_AVS_HW
|
||||
bool "Enable Adaptive Voltage Scaling (AVS)"
|
||||
default n
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
index 84e2fc1..c7eceb1 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-krait.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
@@ -937,6 +937,54 @@ static void __init bus_init(const struct l2_level *l2_level)
|
||||
dev_err(drv.dev, "initial bandwidth req failed (%d)\n", ret);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_CPU_VOLTAGE_TABLE
|
||||
+
|
||||
+#define HFPLL_MIN_VDD 800000
|
||||
+#define HFPLL_MAX_VDD 1350000
|
||||
+
|
||||
+ssize_t acpuclk_get_vdd_levels_str(char *buf) {
|
||||
+
|
||||
+ int i, len = 0;
|
||||
+
|
||||
+ if (buf) {
|
||||
+ mutex_lock(&driver_lock);
|
||||
+
|
||||
+ for (i = 0; drv.acpu_freq_tbl[i].speed.khz; i++) {
|
||||
+ /* updated to use uv required by 8x60 architecture - faux123 */
|
||||
+ len += sprintf(buf + len, "%8lu: %8d\n", drv.acpu_freq_tbl[i].speed.khz,
|
||||
+ drv.acpu_freq_tbl[i].vdd_core );
|
||||
+ }
|
||||
+
|
||||
+ mutex_unlock(&driver_lock);
|
||||
+ }
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+/* updated to use uv required by 8x60 architecture - faux123 */
|
||||
+void acpuclk_set_vdd(unsigned int khz, int vdd_uv) {
|
||||
+
|
||||
+ int i;
|
||||
+ unsigned int new_vdd_uv;
|
||||
+
|
||||
+ mutex_lock(&driver_lock);
|
||||
+
|
||||
+ for (i = 0; drv.acpu_freq_tbl[i].speed.khz; i++) {
|
||||
+ if (khz == 0)
|
||||
+ new_vdd_uv = min(max((unsigned int)(drv.acpu_freq_tbl[i].vdd_core + vdd_uv),
|
||||
+ (unsigned int)HFPLL_MIN_VDD), (unsigned int)HFPLL_MAX_VDD);
|
||||
+ else if ( drv.acpu_freq_tbl[i].speed.khz == khz)
|
||||
+ new_vdd_uv = min(max((unsigned int)vdd_uv,
|
||||
+ (unsigned int)HFPLL_MIN_VDD), (unsigned int)HFPLL_MAX_VDD);
|
||||
+ else
|
||||
+ continue;
|
||||
+
|
||||
+ drv.acpu_freq_tbl[i].vdd_core = new_vdd_uv;
|
||||
+ }
|
||||
+ pr_warn("faux123: user voltage table modified!\n");
|
||||
+ mutex_unlock(&driver_lock);
|
||||
+}
|
||||
+#endif /* CONFIG_CPU_VOTALGE_TABLE */
|
||||
+
|
||||
#ifdef CONFIG_CPU_FREQ_MSM
|
||||
static struct cpufreq_frequency_table freq_table[NR_CPUS][35];
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 1e4ac53ff15efeaf4cb3998b9ba009095d582413 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Sat, 9 Nov 2013 00:17:33 -0500
|
||||
Subject: [PATCH 2/5] Increase voltage limits
|
||||
|
||||
Signed-off-by: flar2 <asegaert@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/msm8974-regulator.dtsi | 8 ++++----
|
||||
arch/arm/mach-msm/acpuclock-8974.c | 8 ++++----
|
||||
arch/arm/mach-msm/acpuclock-krait.c | 4 ++--
|
||||
3 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/msm8974-regulator.dtsi b/arch/arm/boot/dts/msm8974-regulator.dtsi
|
||||
index 9de41f4..6a38980 100644
|
||||
--- a/arch/arm/boot/dts/msm8974-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/msm8974-regulator.dtsi
|
||||
@@ -477,7 +477,7 @@
|
||||
<0xf908a800 0x1000>; /* APCS_ALIAS0_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
qcom,retention-voltage = <675000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
@@ -493,7 +493,7 @@
|
||||
<0xf909a800 0x1000>; /* APCS_ALIAS1_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
qcom,retention-voltage = <675000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
@@ -509,7 +509,7 @@
|
||||
<0xf90aa800 0x1000>; /* APCS_ALIAS2_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
qcom,retention-voltage = <675000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
@@ -525,7 +525,7 @@
|
||||
<0xf90ba800 0x1000>; /* APCS_ALIAS3_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1100000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
qcom,retention-voltage = <675000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8974.c b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
index 694d783..8b7d74e 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8974.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
@@ -55,7 +55,7 @@ static struct scalable scalable[] __initdata = {
|
||||
.hfpll_phys_base = 0xF908A000,
|
||||
.l2cpmr_iaddr = 0x4501,
|
||||
.sec_clk_sel = 2,
|
||||
- .vreg[VREG_CORE] = { "krait0", 1100000 },
|
||||
+ .vreg[VREG_CORE] = { "krait0", 1200000 },
|
||||
.vreg[VREG_MEM] = { "krait0_mem", 1050000 },
|
||||
.vreg[VREG_DIG] = { "krait0_dig", LVL_HIGH },
|
||||
.vreg[VREG_HFPLL_A] = { "krait0_hfpll", 1800000 },
|
||||
@@ -64,7 +64,7 @@ static struct scalable scalable[] __initdata = {
|
||||
.hfpll_phys_base = 0xF909A000,
|
||||
.l2cpmr_iaddr = 0x5501,
|
||||
.sec_clk_sel = 2,
|
||||
- .vreg[VREG_CORE] = { "krait1", 1100000 },
|
||||
+ .vreg[VREG_CORE] = { "krait1", 1200000 },
|
||||
.vreg[VREG_MEM] = { "krait1_mem", 1050000 },
|
||||
.vreg[VREG_DIG] = { "krait1_dig", LVL_HIGH },
|
||||
.vreg[VREG_HFPLL_A] = { "krait1_hfpll", 1800000 },
|
||||
@@ -73,7 +73,7 @@ static struct scalable scalable[] __initdata = {
|
||||
.hfpll_phys_base = 0xF90AA000,
|
||||
.l2cpmr_iaddr = 0x6501,
|
||||
.sec_clk_sel = 2,
|
||||
- .vreg[VREG_CORE] = { "krait2", 1100000 },
|
||||
+ .vreg[VREG_CORE] = { "krait2", 1200000 },
|
||||
.vreg[VREG_MEM] = { "krait2_mem", 1050000 },
|
||||
.vreg[VREG_DIG] = { "krait2_dig", LVL_HIGH },
|
||||
.vreg[VREG_HFPLL_A] = { "krait2_hfpll", 1800000 },
|
||||
@@ -82,7 +82,7 @@ static struct scalable scalable[] __initdata = {
|
||||
.hfpll_phys_base = 0xF90BA000,
|
||||
.l2cpmr_iaddr = 0x7501,
|
||||
.sec_clk_sel = 2,
|
||||
- .vreg[VREG_CORE] = { "krait3", 1100000 },
|
||||
+ .vreg[VREG_CORE] = { "krait3", 1200000 },
|
||||
.vreg[VREG_MEM] = { "krait3_mem", 1050000 },
|
||||
.vreg[VREG_DIG] = { "krait3_dig", LVL_HIGH },
|
||||
.vreg[VREG_HFPLL_A] = { "krait3_hfpll", 1800000 },
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
index c7eceb1..2211ad3 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-krait.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
@@ -939,8 +939,8 @@ static void __init bus_init(const struct l2_level *l2_level)
|
||||
|
||||
#ifdef CONFIG_CPU_VOLTAGE_TABLE
|
||||
|
||||
-#define HFPLL_MIN_VDD 800000
|
||||
-#define HFPLL_MAX_VDD 1350000
|
||||
+#define HFPLL_MIN_VDD 500000
|
||||
+#define HFPLL_MAX_VDD 1200000
|
||||
|
||||
ssize_t acpuclk_get_vdd_levels_str(char *buf) {
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 28d7063d0b5a45d328633e4a59d20ac148f1fadd Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Sat, 9 Nov 2013 01:27:36 -0500
|
||||
Subject: [PATCH 3/5] CPU overclocking
|
||||
|
||||
Signed-off-by: flar2 <asegaert@gmail.com>
|
||||
---
|
||||
arch/arm/mach-msm/acpuclock-8974.c | 42 ++++++++++
|
||||
arch/arm/mach-msm/acpuclock-krait.c | 148 +++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 189 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8974.c b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
index 8b7d74e..cb878d9 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8974.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
@@ -710,6 +710,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs0[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 1070000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 1085000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 1100000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 1115000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 1130000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 1145000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1160000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1175000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1195000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -741,6 +747,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs1[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 1045000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 1060000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 1075000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 1090000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 1105000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 1120000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1135000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1150000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1165000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -772,6 +784,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs2[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 1020000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 1035000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 1050000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 1065000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 1080000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 1095000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1110000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1125000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1140000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -803,6 +821,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs3[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 995000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 1010000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 1025000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 1040000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 1055000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 1070000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1085000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1100000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1115000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -834,6 +858,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs4[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 975000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 985000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 1000000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 1015000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 1030000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 1045000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1060000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1075000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1090000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -865,6 +895,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs5[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 955000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 965000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 975000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 990000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 1005000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 1020000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1035000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1050000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1065000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -896,6 +932,12 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs6[] __initdata = {
|
||||
{ 0, { 2112000, HFPLL, 1, 110 }, L2(19), 930000, 627 },
|
||||
{ 0, { 2188800, HFPLL, 1, 114 }, L2(19), 940000, 659 },
|
||||
{ 1, { 2265600, HFPLL, 1, 118 }, L2(19), 950000, 691 },
|
||||
+ { 1, { 2342400, HFPLL, 1, 122 }, L2(19), 960000, 714 },
|
||||
+ { 1, { 2419200, HFPLL, 1, 126 }, L2(19), 975000, 738 },
|
||||
+ { 1, { 2496000, HFPLL, 1, 130 }, L2(19), 990000, 761 },
|
||||
+ { 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1005000, 784 },
|
||||
+ { 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1020000, 808 },
|
||||
+ { 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1035000, 831 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
index 2211ad3..bcd3e44 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-krait.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
@@ -45,6 +45,113 @@
|
||||
#define PRI_SRC_SEL_HFPLL 1
|
||||
#define PRI_SRC_SEL_HFPLL_DIV2 2
|
||||
|
||||
+
|
||||
+/** elementalx defs **/
|
||||
+static int uv_bin = 2;
|
||||
+static uint32_t arg_max_oc0 = 2265600;
|
||||
+static uint32_t arg_max_oc1 = 2265600;
|
||||
+static uint32_t arg_max_oc2 = 2265600;
|
||||
+static uint32_t arg_max_oc3 = 2265600;
|
||||
+
|
||||
+int pvs_number = 0;
|
||||
+module_param(pvs_number, int, 0755);
|
||||
+
|
||||
+/* boot arg max_oc */
|
||||
+static int __init cpufreq_read_arg_max_oc0(char *max_oc0)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int err;
|
||||
+ err = strict_strtoul(max_oc0, 0, &ui_khz);
|
||||
+ if (err) {
|
||||
+ arg_max_oc0 = 2265600;
|
||||
+ printk(KERN_INFO "[elementalx]: max_oc0='%i'\n", arg_max_oc0);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ arg_max_oc0 = ui_khz;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+__setup("max_oc0=", cpufreq_read_arg_max_oc0);
|
||||
+
|
||||
+static int __init cpufreq_read_arg_max_oc1(char *max_oc1)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int err;
|
||||
+ err = strict_strtoul(max_oc1, 0, &ui_khz);
|
||||
+ if (err) {
|
||||
+ arg_max_oc1 = 2265600;
|
||||
+ printk(KERN_INFO "[elementalx]: max_oc1='%i'\n", arg_max_oc1);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ arg_max_oc1 = ui_khz;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+__setup("max_oc1=", cpufreq_read_arg_max_oc1);
|
||||
+
|
||||
+static int __init cpufreq_read_arg_max_oc2(char *max_oc2)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int err;
|
||||
+ err = strict_strtoul(max_oc2, 0, &ui_khz);
|
||||
+ if (err) {
|
||||
+ arg_max_oc2 = 2265600;
|
||||
+ printk(KERN_INFO "[elementalx]: max_oc2='%i'\n", arg_max_oc2);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ arg_max_oc2 = ui_khz;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+__setup("max_oc2=", cpufreq_read_arg_max_oc2);
|
||||
+
|
||||
+static int __init cpufreq_read_arg_max_oc3(char *max_oc3)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int err;
|
||||
+ err = strict_strtoul(max_oc3, 0, &ui_khz);
|
||||
+ if (err) {
|
||||
+ arg_max_oc3 = 2265600;
|
||||
+ printk(KERN_INFO "[elementalx]: max_oc3='%i'\n", arg_max_oc3);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ arg_max_oc3 = ui_khz;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+__setup("max_oc3=", cpufreq_read_arg_max_oc3);
|
||||
+
|
||||
+static int __init get_uv_level(char *vdd_uv)
|
||||
+{
|
||||
+ if (strcmp(vdd_uv, "0") == 0) {
|
||||
+ uv_bin = 0;
|
||||
+ } else if (strcmp(vdd_uv, "1") == 0) {
|
||||
+ uv_bin = 1;
|
||||
+ } else if (strcmp(vdd_uv, "2") == 0) {
|
||||
+ uv_bin = 2;
|
||||
+ } else if (strcmp(vdd_uv, "3") == 0) {
|
||||
+ uv_bin = 3;
|
||||
+ } else if (strcmp(vdd_uv, "4") == 0) {
|
||||
+ uv_bin = 4;
|
||||
+ } else if (strcmp(vdd_uv, "5") == 0) {
|
||||
+ uv_bin = 5;
|
||||
+ } else if (strcmp(vdd_uv, "6") == 0) {
|
||||
+ uv_bin = 6;
|
||||
+ } else {
|
||||
+ uv_bin = 0;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+__setup("vdd_uv=", get_uv_level);
|
||||
+
|
||||
+/** end elementalx defs **/
|
||||
+
|
||||
+
|
||||
static DEFINE_MUTEX(driver_lock);
|
||||
static DEFINE_SPINLOCK(l2_lock);
|
||||
|
||||
@@ -992,13 +1099,14 @@ static void __init cpufreq_table_init(void)
|
||||
{
|
||||
int cpu;
|
||||
int freq_cnt = 0;
|
||||
+ uint32_t limit_max_oc[4] = {arg_max_oc0, arg_max_oc1, arg_max_oc2, arg_max_oc3};
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
int i;
|
||||
/* Construct the freq_table tables from acpu_freq_tbl. */
|
||||
for (i = 0, freq_cnt = 0; drv.acpu_freq_tbl[i].speed.khz != 0
|
||||
&& freq_cnt < ARRAY_SIZE(*freq_table); i++) {
|
||||
- if (drv.acpu_freq_tbl[i].use_for_scaling) {
|
||||
+ if (drv.acpu_freq_tbl[i].speed.khz <= limit_max_oc[cpu]) {
|
||||
freq_table[cpu][freq_cnt].index = freq_cnt;
|
||||
freq_table[cpu][freq_cnt].frequency
|
||||
= drv.acpu_freq_tbl[i].speed.khz;
|
||||
@@ -1109,6 +1217,39 @@ static void __init krait_apply_vmin(struct acpu_level *tbl)
|
||||
}
|
||||
}
|
||||
|
||||
+static void apply_undervolting(void)
|
||||
+{
|
||||
+ if (uv_bin == 6) {
|
||||
+ drv.acpu_freq_tbl[0].vdd_core = 625000;
|
||||
+ printk(KERN_INFO "[elementalx]: min_voltage='%i'\n", drv.acpu_freq_tbl[0].vdd_core );
|
||||
+ }
|
||||
+
|
||||
+ if (uv_bin == 5) {
|
||||
+ drv.acpu_freq_tbl[0].vdd_core = 650000;
|
||||
+ printk(KERN_INFO "[elementalx]: min_voltage='%i'\n", drv.acpu_freq_tbl[0].vdd_core );
|
||||
+ }
|
||||
+
|
||||
+ if (uv_bin == 4) {
|
||||
+ drv.acpu_freq_tbl[0].vdd_core = 675000;
|
||||
+ printk(KERN_INFO "[elementalx]: min_voltage='%i'\n", drv.acpu_freq_tbl[0].vdd_core );
|
||||
+ }
|
||||
+
|
||||
+ if (uv_bin == 3) {
|
||||
+ drv.acpu_freq_tbl[0].vdd_core = 700000;
|
||||
+ printk(KERN_INFO "[elementalx]: min_voltage='%i'\n", drv.acpu_freq_tbl[0].vdd_core );
|
||||
+ }
|
||||
+
|
||||
+ if (uv_bin == 2) {
|
||||
+ drv.acpu_freq_tbl[0].vdd_core = 725000;
|
||||
+ printk(KERN_INFO "[elementalx]: min_voltage='%i'\n", drv.acpu_freq_tbl[0].vdd_core );
|
||||
+ }
|
||||
+
|
||||
+ if (uv_bin == 1) {
|
||||
+ drv.acpu_freq_tbl[0].vdd_core = 750000;
|
||||
+ printk(KERN_INFO "[elementalx]: min_voltage='%i'\n", drv.acpu_freq_tbl[0].vdd_core );
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void __init get_krait_bin_format_a(void __iomem *base, struct bin_info *bin)
|
||||
{
|
||||
u32 pte_efuse = readl_relaxed(base);
|
||||
@@ -1143,6 +1284,8 @@ void __init get_krait_bin_format_b(void __iomem *base, struct bin_info *bin)
|
||||
}
|
||||
bin->speed_valid = true;
|
||||
|
||||
+ pvs_number = bin->pvs;
|
||||
+
|
||||
/* Check PVS_BLOW_STATUS */
|
||||
pte_efuse = readl_relaxed(base + 0x4);
|
||||
bin->pvs_valid = !!(pte_efuse & BIT(21));
|
||||
@@ -1229,6 +1372,9 @@ static void __init hw_init(void)
|
||||
if (krait_needs_vmin())
|
||||
krait_apply_vmin(drv.acpu_freq_tbl);
|
||||
|
||||
+ if (uv_bin)
|
||||
+ apply_undervolting();
|
||||
+
|
||||
l2->hfpll_base = ioremap(l2->hfpll_phys_base, SZ_32);
|
||||
BUG_ON(!l2->hfpll_base);
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From cbc2f6c8893c773d4dbdf9d5f538f6b44a02baa4 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Sat, 9 Nov 2013 08:43:31 -0500
|
||||
Subject: [PATCH 4/5] L2 cache and bus bandwidth overclocking
|
||||
|
||||
Signed-off-by: flar2 <asegaert@gmail.com>
|
||||
---
|
||||
arch/arm/mach-msm/acpuclock-8974.c | 46 +++++++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-msm/acpuclock-krait.c | 2 +-
|
||||
2 files changed, 47 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8974.c b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
index cb878d9..933bd0e 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8974.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#define LVL_NOM RPM_REGULATOR_CORNER_NORMAL
|
||||
#define LVL_HIGH RPM_REGULATOR_CORNER_SUPER_TURBO
|
||||
|
||||
+static int opt_bin = 0;
|
||||
+
|
||||
static struct hfpll_data hfpll_data __initdata = {
|
||||
.mode_offset = 0x00,
|
||||
.l_offset = 0x04,
|
||||
@@ -257,6 +259,7 @@ static struct msm_bus_paths bw_level_tbl_v2[] __initdata = {
|
||||
[6] = BW_MBPS(4912), /* At least 614 MHz on bus. */
|
||||
[7] = BW_MBPS(6400), /* At least 800 MHz on bus. */
|
||||
[8] = BW_MBPS(7448), /* At least 931 MHz on bus. */
|
||||
+ [9] = BW_MBPS(8000), /* At least 1000 MHz on bus. */
|
||||
};
|
||||
|
||||
static struct l2_level l2_freq_tbl_v2[] __initdata = {
|
||||
@@ -283,6 +286,30 @@ static struct l2_level l2_freq_tbl_v2[] __initdata = {
|
||||
{ }
|
||||
};
|
||||
|
||||
+static struct l2_level l2_freq_tbl_v2_elementalx[] __initdata = {
|
||||
+ [0] = { { 300000, PLL_0, 0, 0 }, LVL_LOW, 950000, 0 },
|
||||
+ [1] = { { 345600, HFPLL, 2, 36 }, LVL_LOW, 950000, 1 },
|
||||
+ [2] = { { 422400, HFPLL, 2, 44 }, LVL_LOW, 950000, 2 },
|
||||
+ [3] = { { 499200, HFPLL, 2, 52 }, LVL_LOW, 950000, 3 },
|
||||
+ [4] = { { 576000, HFPLL, 1, 30 }, LVL_LOW, 950000, 4 },
|
||||
+ [5] = { { 652800, HFPLL, 1, 34 }, LVL_NOM, 950000, 4 },
|
||||
+ [6] = { { 729600, HFPLL, 1, 38 }, LVL_NOM, 950000, 4 },
|
||||
+ [7] = { { 806400, HFPLL, 1, 42 }, LVL_NOM, 950000, 4 },
|
||||
+ [8] = { { 883200, HFPLL, 1, 46 }, LVL_NOM, 950000, 5 },
|
||||
+ [9] = { { 960000, HFPLL, 1, 50 }, LVL_NOM, 950000, 5 },
|
||||
+ [10] = { { 1036800, HFPLL, 1, 54 }, LVL_NOM, 950000, 5 },
|
||||
+ [11] = { { 1113600, HFPLL, 1, 58 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [12] = { { 1190400, HFPLL, 1, 62 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [13] = { { 1267200, HFPLL, 1, 66 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [14] = { { 1344000, HFPLL, 1, 70 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [15] = { { 1420800, HFPLL, 1, 74 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [16] = { { 1497600, HFPLL, 1, 78 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [17] = { { 1574400, HFPLL, 1, 82 }, LVL_HIGH, 1050000, 7 },
|
||||
+ [18] = { { 1651200, HFPLL, 1, 86 }, LVL_HIGH, 1050000, 7 },
|
||||
+ [19] = { { 1804800, HFPLL, 1, 94 }, LVL_HIGH, 1050000, 9 },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
static struct acpu_level acpu_freq_tbl_2g_pvs0[] __initdata = {
|
||||
{ 1, { 300000, PLL_0, 0, 0 }, L2(0), 815000, 73 },
|
||||
{ 0, { 345600, HFPLL, 2, 36 }, L2(1), 825000, 85 },
|
||||
@@ -1003,6 +1030,20 @@ static struct acpuclk_krait_params acpuclk_8974_params __initdata = {
|
||||
.stby_khz = 300000,
|
||||
};
|
||||
|
||||
+static int __init get_opt_level(char *l2_opt)
|
||||
+{
|
||||
+ if (strcmp(l2_opt, "0") == 0) {
|
||||
+ opt_bin = 0;
|
||||
+ } else if (strcmp(l2_opt, "1") == 0) {
|
||||
+ opt_bin = 1;
|
||||
+ } else {
|
||||
+ opt_bin = 0;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+__setup("l2_opt=", get_opt_level);
|
||||
+
|
||||
static void __init apply_v1_l2_workaround(void)
|
||||
{
|
||||
static struct l2_level resticted_l2_tbl[] __initdata = {
|
||||
@@ -1042,6 +1083,11 @@ static int __init acpuclk_8974_probe(struct platform_device *pdev)
|
||||
apply_v1_l2_workaround();
|
||||
}
|
||||
|
||||
+ if (opt_bin == 1) {
|
||||
+ acpuclk_8974_params.l2_freq_tbl = l2_freq_tbl_v2_elementalx;
|
||||
+ acpuclk_8974_params.l2_freq_tbl_size = sizeof(l2_freq_tbl_v2_elementalx);
|
||||
+ }
|
||||
+
|
||||
return acpuclk_krait_init(&pdev->dev, &acpuclk_8974_params);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
index bcd3e44..a1c8fbb 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-krait.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
/** elementalx defs **/
|
||||
-static int uv_bin = 2;
|
||||
+static int uv_bin = 0;
|
||||
static uint32_t arg_max_oc0 = 2265600;
|
||||
static uint32_t arg_max_oc1 = 2265600;
|
||||
static uint32_t arg_max_oc2 = 2265600;
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From bfd08d2e2a997ac4f5b6e8353be663472643b746 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Mon, 11 Nov 2013 00:42:12 -0500
|
||||
Subject: [PATCH 5/5] More overclocking options
|
||||
|
||||
Signed-off-by: flar2 <asegaert@gmail.com>
|
||||
---
|
||||
arch/arm/mach-msm/acpuclock-8974.c | 50 ++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 50 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8974.c b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
index 933bd0e..b436816 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8974.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8974.c
|
||||
@@ -310,6 +310,29 @@ static struct l2_level l2_freq_tbl_v2_elementalx[] __initdata = {
|
||||
{ }
|
||||
};
|
||||
|
||||
+static struct l2_level l2_freq_tbl_v2_ultra[] __initdata = {
|
||||
+ [0] = { { 300000, PLL_0, 0, 0 }, LVL_LOW, 950000, 0 },
|
||||
+ [1] = { { 345600, HFPLL, 2, 36 }, LVL_LOW, 950000, 1 },
|
||||
+ [2] = { { 422400, HFPLL, 2, 44 }, LVL_LOW, 950000, 2 },
|
||||
+ [3] = { { 499200, HFPLL, 2, 52 }, LVL_LOW, 950000, 3 },
|
||||
+ [4] = { { 576000, HFPLL, 1, 30 }, LVL_LOW, 950000, 4 },
|
||||
+ [5] = { { 652800, HFPLL, 1, 34 }, LVL_NOM, 950000, 4 },
|
||||
+ [6] = { { 729600, HFPLL, 1, 38 }, LVL_NOM, 950000, 4 },
|
||||
+ [7] = { { 806400, HFPLL, 1, 42 }, LVL_NOM, 950000, 4 },
|
||||
+ [8] = { { 883200, HFPLL, 1, 46 }, LVL_NOM, 950000, 5 },
|
||||
+ [9] = { { 960000, HFPLL, 1, 50 }, LVL_NOM, 950000, 5 },
|
||||
+ [10] = { { 1036800, HFPLL, 1, 54 }, LVL_NOM, 950000, 5 },
|
||||
+ [11] = { { 1113600, HFPLL, 1, 58 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [12] = { { 1190400, HFPLL, 1, 62 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [13] = { { 1267200, HFPLL, 1, 66 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [14] = { { 1344000, HFPLL, 1, 70 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [15] = { { 1420800, HFPLL, 1, 74 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [16] = { { 1497600, HFPLL, 1, 78 }, LVL_HIGH, 1050000, 6 },
|
||||
+ [17] = { { 1574400, HFPLL, 1, 82 }, LVL_HIGH, 1050000, 7 },
|
||||
+ [18] = { { 1651200, HFPLL, 1, 86 }, LVL_HIGH, 1050000, 7 },
|
||||
+ [19] = { { 1920000, HFPLL, 1, 100 }, LVL_HIGH, 1050000, 9 },
|
||||
+ { }
|
||||
+};
|
||||
static struct acpu_level acpu_freq_tbl_2g_pvs0[] __initdata = {
|
||||
{ 1, { 300000, PLL_0, 0, 0 }, L2(0), 815000, 73 },
|
||||
{ 0, { 345600, HFPLL, 2, 36 }, L2(1), 825000, 85 },
|
||||
@@ -743,6 +766,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs0[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1160000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1175000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1195000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1195000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1195000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1195000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -780,6 +806,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs1[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1135000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1150000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1165000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1180000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1195000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1195000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -817,6 +846,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs2[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1110000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1125000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1140000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1165000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1180000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1195000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -854,6 +886,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs3[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1085000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1100000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1115000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1130000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1145000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1160000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -891,6 +926,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs4[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1060000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1075000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1090000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1105000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1120000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1135000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -928,6 +966,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs5[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1035000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1050000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1065000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1080000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1095000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1110000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -965,6 +1006,9 @@ static struct acpu_level acpu_freq_tbl_2p3g_pvs6[] __initdata = {
|
||||
{ 1, { 2572800, HFPLL, 1, 134 }, L2(19), 1005000, 784 },
|
||||
{ 1, { 2649600, HFPLL, 1, 138 }, L2(19), 1020000, 808 },
|
||||
{ 1, { 2726400, HFPLL, 1, 142 }, L2(19), 1035000, 831 },
|
||||
+ { 1, { 2803200, HFPLL, 1, 146 }, L2(19), 1050000, 854 },
|
||||
+ { 1, { 2880000, HFPLL, 1, 150 }, L2(19), 1065000, 876 },
|
||||
+ { 1, { 2956800, HFPLL, 1, 154 }, L2(19), 1080000, 897 },
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
@@ -1036,6 +1080,8 @@ static int __init get_opt_level(char *l2_opt)
|
||||
opt_bin = 0;
|
||||
} else if (strcmp(l2_opt, "1") == 0) {
|
||||
opt_bin = 1;
|
||||
+ } else if (strcmp(l2_opt, "2") == 0) {
|
||||
+ opt_bin = 2;
|
||||
} else {
|
||||
opt_bin = 0;
|
||||
}
|
||||
@@ -1087,6 +1133,10 @@ static int __init acpuclk_8974_probe(struct platform_device *pdev)
|
||||
acpuclk_8974_params.l2_freq_tbl = l2_freq_tbl_v2_elementalx;
|
||||
acpuclk_8974_params.l2_freq_tbl_size = sizeof(l2_freq_tbl_v2_elementalx);
|
||||
}
|
||||
+ if (opt_bin == 2) {
|
||||
+ acpuclk_8974_params.l2_freq_tbl = l2_freq_tbl_v2_ultra;
|
||||
+ acpuclk_8974_params.l2_freq_tbl_size = sizeof(l2_freq_tbl_v2_ultra);
|
||||
+ }
|
||||
|
||||
return acpuclk_krait_init(&pdev->dev, &acpuclk_8974_params);
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,609 +0,0 @@
|
||||
From 92d396b53cbdf91a7b61a857ca335f39cdb0f8bb Mon Sep 17 00:00:00 2001
|
||||
From: anarkia1976 <stefano.villa1976@gmail.com>
|
||||
Date: Sun, 12 Jan 2014 20:26:27 +0100
|
||||
Subject: [PATCH 1/4] msm: cpu: overclock: added low (162Mhz) and high
|
||||
(1944Mhz) cpu
|
||||
|
||||
---
|
||||
arch/arm/mach-msm/Kconfig | 12 +++++
|
||||
arch/arm/mach-msm/acpuclock-8064.c | 91 +++++++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-msm/acpuclock-krait.c | 8 +++-
|
||||
arch/arm/mach-msm/msm_dcvs.c | 5 ++
|
||||
4 files changed, 115 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
|
||||
index 5f37d1d..b5ab505 100644
|
||||
--- a/arch/arm/mach-msm/Kconfig
|
||||
+++ b/arch/arm/mach-msm/Kconfig
|
||||
@@ -1634,6 +1634,18 @@ config MSM_CPU_FREQ_MIN
|
||||
|
||||
endif # CPU_FREQ_MSM
|
||||
|
||||
+config LOW_CPUCLOCKS
|
||||
+ bool "Enable ultra low CPU clocks"
|
||||
+ default n
|
||||
+ help
|
||||
+ Ultra low cpu frequencies enabled for CPU and L2 Cache
|
||||
+
|
||||
+config CPU_OVERCLOCK
|
||||
+ bool "Enable CPU Overclocking option"
|
||||
+ default n
|
||||
+ help
|
||||
+ Krait overclocking up to 1.9 GHz
|
||||
+
|
||||
config MSM_AVS_HW
|
||||
bool "Enable Adaptive Voltage Scaling (AVS)"
|
||||
default n
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8064.c b/arch/arm/mach-msm/acpuclock-8064.c
|
||||
index 8262946..f40edd3 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8064.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8064.c
|
||||
@@ -47,7 +47,11 @@ static struct scalable scalable[] __initdata = {
|
||||
.aux_clk_sel = 3,
|
||||
.sec_clk_sel = 2,
|
||||
.l2cpmr_iaddr = 0x4501,
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ .vreg[VREG_CORE] = { "krait0", 1450000 },
|
||||
+#else
|
||||
.vreg[VREG_CORE] = { "krait0", 1300000 },
|
||||
+#endif
|
||||
.vreg[VREG_MEM] = { "krait0_mem", 1150000 },
|
||||
.vreg[VREG_DIG] = { "krait0_dig", 1150000 },
|
||||
.vreg[VREG_HFPLL_A] = { "krait0_hfpll", 1800000 },
|
||||
@@ -58,7 +62,11 @@ static struct scalable scalable[] __initdata = {
|
||||
.aux_clk_sel = 3,
|
||||
.sec_clk_sel = 2,
|
||||
.l2cpmr_iaddr = 0x5501,
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ .vreg[VREG_CORE] = { "krait1", 1450000 },
|
||||
+#else
|
||||
.vreg[VREG_CORE] = { "krait1", 1300000 },
|
||||
+#endif
|
||||
.vreg[VREG_MEM] = { "krait1_mem", 1150000 },
|
||||
.vreg[VREG_DIG] = { "krait1_dig", 1150000 },
|
||||
.vreg[VREG_HFPLL_A] = { "krait1_hfpll", 1800000 },
|
||||
@@ -69,7 +77,11 @@ static struct scalable scalable[] __initdata = {
|
||||
.aux_clk_sel = 3,
|
||||
.sec_clk_sel = 2,
|
||||
.l2cpmr_iaddr = 0x6501,
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ .vreg[VREG_CORE] = { "krait2", 1450000 },
|
||||
+#else
|
||||
.vreg[VREG_CORE] = { "krait2", 1300000 },
|
||||
+#endif
|
||||
.vreg[VREG_MEM] = { "krait2_mem", 1150000 },
|
||||
.vreg[VREG_DIG] = { "krait2_dig", 1150000 },
|
||||
.vreg[VREG_HFPLL_A] = { "krait2_hfpll", 1800000 },
|
||||
@@ -80,7 +92,11 @@ static struct scalable scalable[] __initdata = {
|
||||
.aux_clk_sel = 3,
|
||||
.sec_clk_sel = 2,
|
||||
.l2cpmr_iaddr = 0x7501,
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ .vreg[VREG_CORE] = { "krait3", 1450000 },
|
||||
+#else
|
||||
.vreg[VREG_CORE] = { "krait3", 1300000 },
|
||||
+#endif
|
||||
.vreg[VREG_MEM] = { "krait3_mem", 1150000 },
|
||||
.vreg[VREG_DIG] = { "krait3_dig", 1150000 },
|
||||
.vreg[VREG_HFPLL_A] = { "krait3_hfpll", 1800000 },
|
||||
@@ -116,6 +132,24 @@ static struct msm_bus_scale_pdata bus_scale_data __initdata = {
|
||||
};
|
||||
|
||||
static struct l2_level l2_freq_tbl[] __initdata = {
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ [0] = { { 378000, HFPLL, 2, 0x1C }, 950000, 1050000, 1 },
|
||||
+ [1] = { { 384000, PLL_8, 0, 0x00 }, 950000, 1050000, 1 },
|
||||
+ [2] = { { 432000, HFPLL, 2, 0x20 }, 1050000, 1050000, 2 },
|
||||
+ [3] = { { 486000, HFPLL, 2, 0x24 }, 1050000, 1050000, 2 },
|
||||
+ [4] = { { 540000, HFPLL, 2, 0x28 }, 1050000, 1050000, 2 },
|
||||
+ [5] = { { 594000, HFPLL, 1, 0x16 }, 1050000, 1050000, 2 },
|
||||
+ [6] = { { 648000, HFPLL, 1, 0x18 }, 1050000, 1050000, 4 },
|
||||
+ [7] = { { 702000, HFPLL, 1, 0x1A }, 1150000, 1150000, 4 },
|
||||
+ [8] = { { 756000, HFPLL, 1, 0x1C }, 1150000, 1150000, 4 },
|
||||
+ [9] = { { 810000, HFPLL, 1, 0x1E }, 1150000, 1150000, 4 },
|
||||
+ [10] = { { 864000, HFPLL, 1, 0x20 }, 1150000, 1150000, 4 },
|
||||
+ [11] = { { 918000, HFPLL, 1, 0x22 }, 1150000, 1150000, 5 },
|
||||
+ [12] = { { 972000, HFPLL, 1, 0x24 }, 1150000, 1150000, 5 },
|
||||
+ [13] = { { 1026000, HFPLL, 1, 0x26 }, 1150000, 1150000, 5 },
|
||||
+ [14] = { { 1080000, HFPLL, 1, 0x28 }, 1150000, 1150000, 5 },
|
||||
+ [15] = { { 1134000, HFPLL, 1, 0x2A }, 1150000, 1150000, 5 },
|
||||
+#else
|
||||
[0] = { { 384000, PLL_8, 0, 0x00 }, 950000, 1050000, 1 },
|
||||
[1] = { { 432000, HFPLL, 2, 0x20 }, 1050000, 1050000, 2 },
|
||||
[2] = { { 486000, HFPLL, 2, 0x24 }, 1050000, 1050000, 2 },
|
||||
@@ -131,11 +165,19 @@ static struct l2_level l2_freq_tbl[] __initdata = {
|
||||
[12] = { { 1026000, HFPLL, 1, 0x26 }, 1150000, 1150000, 5 },
|
||||
[13] = { { 1080000, HFPLL, 1, 0x28 }, 1150000, 1150000, 5 },
|
||||
[14] = { { 1134000, HFPLL, 1, 0x2A }, 1150000, 1150000, 5 },
|
||||
+#endif
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct acpu_level tbl_slow[] __initdata = {
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 875000 },
|
||||
+ { 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 900000 },
|
||||
+ //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 950000 },
|
||||
+ { 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 925000 },
|
||||
+#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 950000 },
|
||||
+#endif
|
||||
{ 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 975000 },
|
||||
{ 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 975000 },
|
||||
{ 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 1000000 },
|
||||
@@ -157,11 +199,25 @@ static struct acpu_level tbl_slow[] __initdata = {
|
||||
{ 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1237500 },
|
||||
{ 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1237500 },
|
||||
{ 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1250000 },
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ { 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1300000 },
|
||||
+ { 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1350000 },
|
||||
+ { 1, { 1836000, HFPLL, 1, 0x44 }, L2(15), 1400000 },
|
||||
+ { 1, { 1890000, HFPLL, 1, 0x45 }, L2(15), 1425000 },
|
||||
+ { 1, { 1944000, HFPLL, 1, 0x46 }, L2(15), 1450000 },
|
||||
+#endif
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
static struct acpu_level tbl_nom[] __initdata = {
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 825000 },
|
||||
+ { 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 850000 },
|
||||
+ //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 900000 },
|
||||
+ { 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 875000 },
|
||||
+#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 900000 },
|
||||
+#endif
|
||||
{ 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 925000 },
|
||||
{ 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 925000 },
|
||||
{ 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 950000 },
|
||||
@@ -183,11 +239,25 @@ static struct acpu_level tbl_nom[] __initdata = {
|
||||
{ 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1187500 },
|
||||
{ 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1187500 },
|
||||
{ 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1200000 },
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ { 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1250000 },
|
||||
+ { 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1300000 },
|
||||
+ { 1, { 1836000, HFPLL, 1, 0x44 }, L2(15), 1350000 },
|
||||
+ { 1, { 1890000, HFPLL, 1, 0x45 }, L2(15), 1375000 },
|
||||
+ { 1, { 1944000, HFPLL, 1, 0x46 }, L2(15), 1400000 },
|
||||
+#endif
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
static struct acpu_level tbl_fast[] __initdata = {
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 775000 },
|
||||
+ { 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 800000 },
|
||||
+ //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 850000 },
|
||||
+ { 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 825000 },
|
||||
+#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 850000 },
|
||||
+#endif
|
||||
{ 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 875000 },
|
||||
{ 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 875000 },
|
||||
{ 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 900000 },
|
||||
@@ -209,11 +279,25 @@ static struct acpu_level tbl_fast[] __initdata = {
|
||||
{ 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1137500 },
|
||||
{ 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1137500 },
|
||||
{ 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1150000 },
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ { 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1200000 },
|
||||
+ { 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1250000 },
|
||||
+ { 1, { 1836000, HFPLL, 1, 0x44 }, L2(15), 1300000 },
|
||||
+ { 1, { 1890000, HFPLL, 1, 0x45 }, L2(15), 1325000 },
|
||||
+ { 1, { 1944000, HFPLL, 1, 0x46 }, L2(15), 1350000 },
|
||||
+#endif
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
static struct acpu_level tbl_faster[] __initdata = {
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 775000 },
|
||||
+ { 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 800000 },
|
||||
+ //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 850000 },
|
||||
+ { 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 825000 },
|
||||
+#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 850000 },
|
||||
+#endif
|
||||
{ 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 875000 },
|
||||
{ 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 875000 },
|
||||
{ 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 900000 },
|
||||
@@ -235,6 +319,13 @@ static struct acpu_level tbl_faster[] __initdata = {
|
||||
{ 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1112500 },
|
||||
{ 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1112500 },
|
||||
{ 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1125000 },
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+ { 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1150000 },
|
||||
+ { 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1200000 },
|
||||
+ { 1, { 1836000, HFPLL, 1, 0x44 }, L2(15), 1250000 },
|
||||
+ { 1, { 1890000, HFPLL, 1, 0x45 }, L2(15), 1275000 },
|
||||
+ { 1, { 1944000, HFPLL, 1, 0x46 }, L2(15), 1300000 },
|
||||
+#endif
|
||||
{ 0, { 0 } }
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
index e3a3f54..97f6f39 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-krait.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
@@ -45,6 +45,12 @@
|
||||
#define PRI_SRC_SEL_HFPLL 1
|
||||
#define PRI_SRC_SEL_HFPLL_DIV2 2
|
||||
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+#define FREQ_TABLE_SIZE 39
|
||||
+#else
|
||||
+#define FREQ_TABLE_SIZE 35
|
||||
+#endif
|
||||
+
|
||||
static DEFINE_MUTEX(driver_lock);
|
||||
static DEFINE_SPINLOCK(l2_lock);
|
||||
|
||||
@@ -913,7 +919,7 @@ static void __init bus_init(const struct l2_level *l2_level)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ_MSM
|
||||
-static struct cpufreq_frequency_table freq_table[NR_CPUS][35];
|
||||
+static struct cpufreq_frequency_table freq_table[NR_CPUS][FREQ_TABLE_SIZE];
|
||||
|
||||
static void __init cpufreq_table_init(void)
|
||||
{
|
||||
diff --git a/arch/arm/mach-msm/msm_dcvs.c b/arch/arm/mach-msm/msm_dcvs.c
|
||||
index 1a919fc..1d5e289 100644
|
||||
--- a/arch/arm/mach-msm/msm_dcvs.c
|
||||
+++ b/arch/arm/mach-msm/msm_dcvs.c
|
||||
@@ -146,7 +146,12 @@ static struct dcvs_core core_list[CORES_MAX];
|
||||
|
||||
static struct kobject *cores_kobj;
|
||||
|
||||
+#ifdef CONFIG_CPU_OVERCLOCK
|
||||
+#define DCVS_MAX_NUM_FREQS 20
|
||||
+#else
|
||||
#define DCVS_MAX_NUM_FREQS 15
|
||||
+#endif
|
||||
+
|
||||
static struct msm_dcvs_freq_entry cpu_freq_tbl[DCVS_MAX_NUM_FREQS];
|
||||
static unsigned num_cpu_freqs;
|
||||
static struct msm_dcvs_platform_data *dcvs_pdata;
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
||||
From f498c327190b1a30c25010e0ba3600470fc9251b Mon Sep 17 00:00:00 2001
|
||||
From: anarkia1976 <stefano.villa1976@gmail.com>
|
||||
Date: Wed, 5 Feb 2014 07:15:12 +0100
|
||||
Subject: [PATCH 2/4] msm: cpu: overclock: added ultra low (81Mhz) cpu clock
|
||||
frequencies
|
||||
|
||||
---
|
||||
arch/arm/mach-msm/acpuclock-8064.c | 4 ++++
|
||||
arch/arm/mach-msm/acpuclock-krait.c | 2 +-
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8064.c b/arch/arm/mach-msm/acpuclock-8064.c
|
||||
index f40edd3..ba8fe72 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8064.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8064.c
|
||||
@@ -171,6 +171,7 @@ static struct l2_level l2_freq_tbl[] __initdata = {
|
||||
|
||||
static struct acpu_level tbl_slow[] __initdata = {
|
||||
#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 875000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 900000 },
|
||||
//{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 950000 },
|
||||
@@ -211,6 +212,7 @@ static struct acpu_level tbl_slow[] __initdata = {
|
||||
|
||||
static struct acpu_level tbl_nom[] __initdata = {
|
||||
#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 825000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 850000 },
|
||||
//{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 900000 },
|
||||
@@ -251,6 +253,7 @@ static struct acpu_level tbl_nom[] __initdata = {
|
||||
|
||||
static struct acpu_level tbl_fast[] __initdata = {
|
||||
#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 775000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 800000 },
|
||||
//{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 850000 },
|
||||
@@ -291,6 +294,7 @@ static struct acpu_level tbl_fast[] __initdata = {
|
||||
|
||||
static struct acpu_level tbl_faster[] __initdata = {
|
||||
#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+ { 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 775000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 800000 },
|
||||
//{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 850000 },
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
index 97f6f39..695b709 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-krait.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-krait.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#define PRI_SRC_SEL_HFPLL_DIV2 2
|
||||
|
||||
#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
-#define FREQ_TABLE_SIZE 39
|
||||
+#define FREQ_TABLE_SIZE 40
|
||||
#else
|
||||
#define FREQ_TABLE_SIZE 35
|
||||
#endif
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
||||
From 0eb77b9339850d3a7a9854197f2d02756270e5af Mon Sep 17 00:00:00 2001
|
||||
From: anarkia1976 <stefano.villa1976@gmail.com>
|
||||
Date: Sun, 12 Jan 2014 21:12:55 +0100
|
||||
Subject: [PATCH 3/4] ak_mako_defconfig: enable LOW_CPU and CPU_OVERCLOCK
|
||||
|
||||
---
|
||||
arch/arm/configs/cyanogen_mako_defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/configs/cyanogen_mako_defconfig b/arch/arm/configs/cyanogen_mako_defconfig
|
||||
index 316b320..1059cb6 100644
|
||||
--- a/arch/arm/configs/cyanogen_mako_defconfig
|
||||
+++ b/arch/arm/configs/cyanogen_mako_defconfig
|
||||
@@ -451,6 +451,8 @@ CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y
|
||||
# CONFIG_MSM_IPC_ROUTER_SECURITY is not set
|
||||
# CONFIG_MSM_DALRPC is not set
|
||||
# CONFIG_MSM_CPU_FREQ_SET_MIN_MAX is not set
|
||||
+CONFIG_LOW_CPUCLOCKS=y
|
||||
+CONFIG_CPU_OVERCLOCK=y
|
||||
CONFIG_MSM_AVS_HW=y
|
||||
# CONFIG_MSM_HW3D is not set
|
||||
CONFIG_AMSS_7X25_VERSION_2009=y
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
||||
From cc891d49f60d6d0ad4d570c14711db9a568b49e5 Mon Sep 17 00:00:00 2001
|
||||
From: anarkia1976 <stefano.villa1976@gmail.com>
|
||||
Date: Wed, 5 Feb 2014 07:12:48 +0100
|
||||
Subject: [PATCH 4/4] msm: cpu: overclock: use higher bus speed at lower CPU
|
||||
freqs
|
||||
|
||||
Thanks to @bedalus and @mrg666
|
||||
|
||||
Bedalus suggested that if lower CPU frequencies can offer higher bus
|
||||
speed,
|
||||
GPU use during games wouldn't require higher CPU frequency.
|
||||
My testing demonstrated 4C drop in CPU temp during 3DMark benchmark.
|
||||
Still needs to be tested for everyday use.
|
||||
---
|
||||
arch/arm/mach-msm/acpuclock-8064.c | 172 +++++++++++++++++++------------------
|
||||
1 file changed, 88 insertions(+), 84 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-msm/acpuclock-8064.c b/arch/arm/mach-msm/acpuclock-8064.c
|
||||
index ba8fe72..611776e 100644
|
||||
--- a/arch/arm/mach-msm/acpuclock-8064.c
|
||||
+++ b/arch/arm/mach-msm/acpuclock-8064.c
|
||||
@@ -131,6 +131,14 @@ static struct msm_bus_scale_pdata bus_scale_data __initdata = {
|
||||
.name = "acpuclk-8064",
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
+#define L2_BW_MID 6
|
||||
+#define L2_BW_HIGH 15
|
||||
+#else
|
||||
+#define L2_BW_MID 5
|
||||
+#define L2_BW_HIGH 14
|
||||
+#endif
|
||||
+
|
||||
static struct l2_level l2_freq_tbl[] __initdata = {
|
||||
#ifdef CONFIG_LOW_CPUCLOCKS
|
||||
[0] = { { 378000, HFPLL, 2, 0x1C }, 950000, 1050000, 1 },
|
||||
@@ -174,32 +182,31 @@ static struct acpu_level tbl_slow[] __initdata = {
|
||||
{ 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 875000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 900000 },
|
||||
- //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 950000 },
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 925000 },
|
||||
#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 950000 },
|
||||
#endif
|
||||
- { 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 975000 },
|
||||
- { 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 975000 },
|
||||
- { 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 1000000 },
|
||||
- { 1, { 594000, HFPLL, 1, 0x16 }, L2(5), 1000000 },
|
||||
- { 0, { 648000, HFPLL, 1, 0x18 }, L2(5), 1025000 },
|
||||
- { 1, { 702000, HFPLL, 1, 0x1A }, L2(5), 1025000 },
|
||||
- { 0, { 756000, HFPLL, 1, 0x1C }, L2(5), 1075000 },
|
||||
- { 1, { 810000, HFPLL, 1, 0x1E }, L2(5), 1075000 },
|
||||
- { 0, { 864000, HFPLL, 1, 0x20 }, L2(5), 1100000 },
|
||||
- { 1, { 918000, HFPLL, 1, 0x22 }, L2(5), 1100000 },
|
||||
- { 0, { 972000, HFPLL, 1, 0x24 }, L2(5), 1125000 },
|
||||
- { 1, { 1026000, HFPLL, 1, 0x26 }, L2(5), 1125000 },
|
||||
- { 0, { 1080000, HFPLL, 1, 0x28 }, L2(14), 1175000 },
|
||||
- { 1, { 1134000, HFPLL, 1, 0x2A }, L2(14), 1175000 },
|
||||
- { 0, { 1188000, HFPLL, 1, 0x2C }, L2(14), 1200000 },
|
||||
- { 1, { 1242000, HFPLL, 1, 0x2E }, L2(14), 1200000 },
|
||||
- { 0, { 1296000, HFPLL, 1, 0x30 }, L2(14), 1225000 },
|
||||
- { 1, { 1350000, HFPLL, 1, 0x32 }, L2(14), 1225000 },
|
||||
- { 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1237500 },
|
||||
- { 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1237500 },
|
||||
- { 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1250000 },
|
||||
+ { 0, { 432000, HFPLL, 2, 0x20 }, L2(L2_BW_MID), 975000 },
|
||||
+ { 1, { 486000, HFPLL, 2, 0x24 }, L2(L2_BW_MID), 975000 },
|
||||
+ { 0, { 540000, HFPLL, 2, 0x28 }, L2(L2_BW_MID), 1000000 },
|
||||
+ { 1, { 594000, HFPLL, 1, 0x16 }, L2(L2_BW_MID), 1000000 },
|
||||
+ { 0, { 648000, HFPLL, 1, 0x18 }, L2(L2_BW_MID), 1025000 },
|
||||
+ { 1, { 702000, HFPLL, 1, 0x1A }, L2(L2_BW_HIGH), 1025000 },
|
||||
+ { 0, { 756000, HFPLL, 1, 0x1C }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 1, { 810000, HFPLL, 1, 0x1E }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 0, { 864000, HFPLL, 1, 0x20 }, L2(L2_BW_HIGH), 1100000 },
|
||||
+ { 1, { 918000, HFPLL, 1, 0x22 }, L2(L2_BW_HIGH), 1100000 },
|
||||
+ { 0, { 972000, HFPLL, 1, 0x24 }, L2(L2_BW_HIGH), 1125000 },
|
||||
+ { 1, { 1026000, HFPLL, 1, 0x26 }, L2(L2_BW_HIGH), 1125000 },
|
||||
+ { 0, { 1080000, HFPLL, 1, 0x28 }, L2(L2_BW_HIGH), 1175000 },
|
||||
+ { 1, { 1134000, HFPLL, 1, 0x2A }, L2(L2_BW_HIGH), 1175000 },
|
||||
+ { 0, { 1188000, HFPLL, 1, 0x2C }, L2(L2_BW_HIGH), 1200000 },
|
||||
+ { 1, { 1242000, HFPLL, 1, 0x2E }, L2(L2_BW_HIGH), 1200000 },
|
||||
+ { 0, { 1296000, HFPLL, 1, 0x30 }, L2(L2_BW_HIGH), 1225000 },
|
||||
+ { 1, { 1350000, HFPLL, 1, 0x32 }, L2(L2_BW_HIGH), 1225000 },
|
||||
+ { 0, { 1404000, HFPLL, 1, 0x34 }, L2(L2_BW_HIGH), 1237500 },
|
||||
+ { 1, { 1458000, HFPLL, 1, 0x36 }, L2(L2_BW_HIGH), 1237500 },
|
||||
+ { 1, { 1512000, HFPLL, 1, 0x38 }, L2(L2_BW_HIGH), 1250000 },
|
||||
#ifdef CONFIG_CPU_OVERCLOCK
|
||||
{ 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1300000 },
|
||||
{ 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1350000 },
|
||||
@@ -215,32 +222,31 @@ static struct acpu_level tbl_nom[] __initdata = {
|
||||
{ 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 825000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 850000 },
|
||||
- //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 900000 },
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 875000 },
|
||||
#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 900000 },
|
||||
#endif
|
||||
- { 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 925000 },
|
||||
- { 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 925000 },
|
||||
- { 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 950000 },
|
||||
- { 1, { 594000, HFPLL, 1, 0x16 }, L2(5), 950000 },
|
||||
- { 0, { 648000, HFPLL, 1, 0x18 }, L2(5), 975000 },
|
||||
- { 1, { 702000, HFPLL, 1, 0x1A }, L2(5), 975000 },
|
||||
- { 0, { 756000, HFPLL, 1, 0x1C }, L2(5), 1025000 },
|
||||
- { 1, { 810000, HFPLL, 1, 0x1E }, L2(5), 1025000 },
|
||||
- { 0, { 864000, HFPLL, 1, 0x20 }, L2(5), 1050000 },
|
||||
- { 1, { 918000, HFPLL, 1, 0x22 }, L2(5), 1050000 },
|
||||
- { 0, { 972000, HFPLL, 1, 0x24 }, L2(5), 1075000 },
|
||||
- { 1, { 1026000, HFPLL, 1, 0x26 }, L2(5), 1075000 },
|
||||
- { 0, { 1080000, HFPLL, 1, 0x28 }, L2(14), 1125000 },
|
||||
- { 1, { 1134000, HFPLL, 1, 0x2A }, L2(14), 1125000 },
|
||||
- { 0, { 1188000, HFPLL, 1, 0x2C }, L2(14), 1150000 },
|
||||
- { 1, { 1242000, HFPLL, 1, 0x2E }, L2(14), 1150000 },
|
||||
- { 0, { 1296000, HFPLL, 1, 0x30 }, L2(14), 1175000 },
|
||||
- { 1, { 1350000, HFPLL, 1, 0x32 }, L2(14), 1175000 },
|
||||
- { 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1187500 },
|
||||
- { 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1187500 },
|
||||
- { 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1200000 },
|
||||
+ { 0, { 432000, HFPLL, 2, 0x20 }, L2(L2_BW_MID), 925000 },
|
||||
+ { 1, { 486000, HFPLL, 2, 0x24 }, L2(L2_BW_MID), 925000 },
|
||||
+ { 0, { 540000, HFPLL, 2, 0x28 }, L2(L2_BW_MID), 950000 },
|
||||
+ { 1, { 594000, HFPLL, 1, 0x16 }, L2(L2_BW_MID), 950000 },
|
||||
+ { 0, { 648000, HFPLL, 1, 0x18 }, L2(L2_BW_MID), 975000 },
|
||||
+ { 1, { 702000, HFPLL, 1, 0x1A }, L2(L2_BW_HIGH), 975000 },
|
||||
+ { 0, { 756000, HFPLL, 1, 0x1C }, L2(L2_BW_HIGH), 1025000 },
|
||||
+ { 1, { 810000, HFPLL, 1, 0x1E }, L2(L2_BW_HIGH), 1025000 },
|
||||
+ { 0, { 864000, HFPLL, 1, 0x20 }, L2(L2_BW_HIGH), 1050000 },
|
||||
+ { 1, { 918000, HFPLL, 1, 0x22 }, L2(L2_BW_HIGH), 1050000 },
|
||||
+ { 0, { 972000, HFPLL, 1, 0x24 }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 1, { 1026000, HFPLL, 1, 0x26 }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 0, { 1080000, HFPLL, 1, 0x28 }, L2(L2_BW_HIGH), 1125000 },
|
||||
+ { 1, { 1134000, HFPLL, 1, 0x2A }, L2(L2_BW_HIGH), 1125000 },
|
||||
+ { 0, { 1188000, HFPLL, 1, 0x2C }, L2(L2_BW_HIGH), 1150000 },
|
||||
+ { 1, { 1242000, HFPLL, 1, 0x2E }, L2(L2_BW_HIGH), 1150000 },
|
||||
+ { 0, { 1296000, HFPLL, 1, 0x30 }, L2(L2_BW_HIGH), 1175000 },
|
||||
+ { 1, { 1350000, HFPLL, 1, 0x32 }, L2(L2_BW_HIGH), 1175000 },
|
||||
+ { 0, { 1404000, HFPLL, 1, 0x34 }, L2(L2_BW_HIGH), 1187500 },
|
||||
+ { 1, { 1458000, HFPLL, 1, 0x36 }, L2(L2_BW_HIGH), 1187500 },
|
||||
+ { 1, { 1512000, HFPLL, 1, 0x38 }, L2(L2_BW_HIGH), 1200000 },
|
||||
#ifdef CONFIG_CPU_OVERCLOCK
|
||||
{ 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1250000 },
|
||||
{ 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1300000 },
|
||||
@@ -256,32 +262,31 @@ static struct acpu_level tbl_fast[] __initdata = {
|
||||
{ 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 775000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 800000 },
|
||||
- //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 850000 },
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 825000 },
|
||||
#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 850000 },
|
||||
#endif
|
||||
- { 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 875000 },
|
||||
- { 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 875000 },
|
||||
- { 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 900000 },
|
||||
- { 1, { 594000, HFPLL, 1, 0x16 }, L2(5), 900000 },
|
||||
- { 0, { 648000, HFPLL, 1, 0x18 }, L2(5), 925000 },
|
||||
- { 1, { 702000, HFPLL, 1, 0x1A }, L2(5), 925000 },
|
||||
- { 0, { 756000, HFPLL, 1, 0x1C }, L2(5), 975000 },
|
||||
- { 1, { 810000, HFPLL, 1, 0x1E }, L2(5), 975000 },
|
||||
- { 0, { 864000, HFPLL, 1, 0x20 }, L2(5), 1000000 },
|
||||
- { 1, { 918000, HFPLL, 1, 0x22 }, L2(5), 1000000 },
|
||||
- { 0, { 972000, HFPLL, 1, 0x24 }, L2(5), 1025000 },
|
||||
- { 1, { 1026000, HFPLL, 1, 0x26 }, L2(5), 1025000 },
|
||||
- { 0, { 1080000, HFPLL, 1, 0x28 }, L2(14), 1075000 },
|
||||
- { 1, { 1134000, HFPLL, 1, 0x2A }, L2(14), 1075000 },
|
||||
- { 0, { 1188000, HFPLL, 1, 0x2C }, L2(14), 1100000 },
|
||||
- { 1, { 1242000, HFPLL, 1, 0x2E }, L2(14), 1100000 },
|
||||
- { 0, { 1296000, HFPLL, 1, 0x30 }, L2(14), 1125000 },
|
||||
- { 1, { 1350000, HFPLL, 1, 0x32 }, L2(14), 1125000 },
|
||||
- { 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1137500 },
|
||||
- { 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1137500 },
|
||||
- { 1, { 1512000, HFPLL, 1, 0x38 }, L2(14), 1150000 },
|
||||
+ { 0, { 432000, HFPLL, 2, 0x20 }, L2(L2_BW_MID), 875000 },
|
||||
+ { 1, { 486000, HFPLL, 2, 0x24 }, L2(L2_BW_MID), 875000 },
|
||||
+ { 0, { 540000, HFPLL, 2, 0x28 }, L2(L2_BW_MID), 900000 },
|
||||
+ { 1, { 594000, HFPLL, 1, 0x16 }, L2(L2_BW_MID), 900000 },
|
||||
+ { 0, { 648000, HFPLL, 1, 0x18 }, L2(L2_BW_MID), 925000 },
|
||||
+ { 1, { 702000, HFPLL, 1, 0x1A }, L2(L2_BW_HIGH), 925000 },
|
||||
+ { 0, { 756000, HFPLL, 1, 0x1C }, L2(L2_BW_HIGH), 975000 },
|
||||
+ { 1, { 810000, HFPLL, 1, 0x1E }, L2(L2_BW_HIGH), 975000 },
|
||||
+ { 0, { 864000, HFPLL, 1, 0x20 }, L2(L2_BW_HIGH), 1000000 },
|
||||
+ { 1, { 918000, HFPLL, 1, 0x22 }, L2(L2_BW_HIGH), 1000000 },
|
||||
+ { 0, { 972000, HFPLL, 1, 0x24 }, L2(L2_BW_HIGH), 1025000 },
|
||||
+ { 1, { 1026000, HFPLL, 1, 0x26 }, L2(L2_BW_HIGH), 1025000 },
|
||||
+ { 0, { 1080000, HFPLL, 1, 0x28 }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 1, { 1134000, HFPLL, 1, 0x2A }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 0, { 1188000, HFPLL, 1, 0x2C }, L2(L2_BW_HIGH), 1100000 },
|
||||
+ { 1, { 1242000, HFPLL, 1, 0x2E }, L2(L2_BW_HIGH), 1100000 },
|
||||
+ { 0, { 1296000, HFPLL, 1, 0x30 }, L2(L2_BW_HIGH), 1125000 },
|
||||
+ { 1, { 1350000, HFPLL, 1, 0x32 }, L2(L2_BW_HIGH), 1125000 },
|
||||
+ { 0, { 1404000, HFPLL, 1, 0x34 }, L2(L2_BW_HIGH), 1137500 },
|
||||
+ { 1, { 1458000, HFPLL, 1, 0x36 }, L2(L2_BW_HIGH), 1137500 },
|
||||
+ { 1, { 1512000, HFPLL, 1, 0x38 }, L2(L2_BW_HIGH), 1150000 },
|
||||
#ifdef CONFIG_CPU_OVERCLOCK
|
||||
{ 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1200000 },
|
||||
{ 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1250000 },
|
||||
@@ -297,28 +302,27 @@ static struct acpu_level tbl_faster[] __initdata = {
|
||||
{ 1, { 81000, HFPLL, 2, 0x06 }, L2(0), 750000 },
|
||||
{ 1, { 162000, HFPLL, 2, 0x0C }, L2(0), 775000 },
|
||||
{ 1, { 270000, HFPLL, 2, 0x14 }, L2(0), 800000 },
|
||||
- //{ 1, { 378000, HFPLL, 2, 0x1C }, L2(0), 850000 },
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(1), 825000 },
|
||||
#else
|
||||
{ 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 850000 },
|
||||
#endif
|
||||
- { 0, { 432000, HFPLL, 2, 0x20 }, L2(5), 875000 },
|
||||
- { 1, { 486000, HFPLL, 2, 0x24 }, L2(5), 875000 },
|
||||
- { 0, { 540000, HFPLL, 2, 0x28 }, L2(5), 900000 },
|
||||
- { 1, { 594000, HFPLL, 1, 0x16 }, L2(5), 900000 },
|
||||
- { 0, { 648000, HFPLL, 1, 0x18 }, L2(5), 925000 },
|
||||
- { 1, { 702000, HFPLL, 1, 0x1A }, L2(5), 925000 },
|
||||
- { 0, { 756000, HFPLL, 1, 0x1C }, L2(5), 962500 },
|
||||
- { 1, { 810000, HFPLL, 1, 0x1E }, L2(5), 962500 },
|
||||
- { 0, { 864000, HFPLL, 1, 0x20 }, L2(5), 975000 },
|
||||
- { 1, { 918000, HFPLL, 1, 0x22 }, L2(5), 975000 },
|
||||
- { 0, { 972000, HFPLL, 1, 0x24 }, L2(5), 1000000 },
|
||||
- { 1, { 1026000, HFPLL, 1, 0x26 }, L2(5), 1000000 },
|
||||
- { 0, { 1080000, HFPLL, 1, 0x28 }, L2(14), 1050000 },
|
||||
- { 1, { 1134000, HFPLL, 1, 0x2A }, L2(14), 1050000 },
|
||||
- { 0, { 1188000, HFPLL, 1, 0x2C }, L2(14), 1075000 },
|
||||
- { 1, { 1242000, HFPLL, 1, 0x2E }, L2(14), 1075000 },
|
||||
- { 0, { 1296000, HFPLL, 1, 0x30 }, L2(14), 1100000 },
|
||||
+ { 0, { 432000, HFPLL, 2, 0x20 }, L2(L2_BW_MID), 875000 },
|
||||
+ { 1, { 486000, HFPLL, 2, 0x24 }, L2(L2_BW_MID), 875000 },
|
||||
+ { 0, { 540000, HFPLL, 2, 0x28 }, L2(L2_BW_MID), 900000 },
|
||||
+ { 1, { 594000, HFPLL, 1, 0x16 }, L2(L2_BW_MID), 900000 },
|
||||
+ { 0, { 648000, HFPLL, 1, 0x18 }, L2(L2_BW_MID), 925000 },
|
||||
+ { 1, { 702000, HFPLL, 1, 0x1A }, L2(L2_BW_HIGH), 925000 },
|
||||
+ { 0, { 756000, HFPLL, 1, 0x1C }, L2(L2_BW_HIGH), 962500 },
|
||||
+ { 1, { 810000, HFPLL, 1, 0x1E }, L2(L2_BW_HIGH), 962500 },
|
||||
+ { 0, { 864000, HFPLL, 1, 0x20 }, L2(L2_BW_HIGH), 975000 },
|
||||
+ { 1, { 918000, HFPLL, 1, 0x22 }, L2(L2_BW_HIGH), 975000 },
|
||||
+ { 0, { 972000, HFPLL, 1, 0x24 }, L2(L2_BW_HIGH), 1000000 },
|
||||
+ { 1, { 1026000, HFPLL, 1, 0x26 }, L2(L2_BW_HIGH), 1000000 },
|
||||
+ { 0, { 1080000, HFPLL, 1, 0x28 }, L2(L2_BW_HIGH), 1050000 },
|
||||
+ { 1, { 1134000, HFPLL, 1, 0x2A }, L2(L2_BW_HIGH), 1050000 },
|
||||
+ { 0, { 1188000, HFPLL, 1, 0x2C }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 1, { 1242000, HFPLL, 1, 0x2E }, L2(L2_BW_HIGH), 1075000 },
|
||||
+ { 0, { 1296000, HFPLL, 1, 0x30 }, L2(L2_BW_HIGH), 1100000 },
|
||||
{ 1, { 1350000, HFPLL, 1, 0x32 }, L2(14), 1100000 },
|
||||
{ 0, { 1404000, HFPLL, 1, 0x34 }, L2(14), 1112500 },
|
||||
{ 1, { 1458000, HFPLL, 1, 0x36 }, L2(14), 1112500 },
|
||||
--
|
||||
2.10.2
|
||||
|
@ -1,834 +0,0 @@
|
||||
From ebb9cfb12fea35189ba206f56925e499a4963896 Mon Sep 17 00:00:00 2001
|
||||
From: hellsgod <hellsgod@gmx.ch>
|
||||
Date: Wed, 22 Apr 2015 22:50:47 +0200
|
||||
Subject: [PATCH 1/6] dts: Add some lower frequencies down to 35mhz
|
||||
|
||||
credits: XileForce, Imoseyon
|
||||
---
|
||||
arch/arm/boot/dts/qcom/apq8084.dtsi | 51 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/apq8084.dtsi b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
index 51de8be..1e782d6 100644
|
||||
--- a/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
@@ -1127,6 +1127,9 @@
|
||||
/* 2.7GHz RC1 */
|
||||
qcom,speed2-pvs0-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 720000 37 >,
|
||||
+ < 223200000 790000 56 >,
|
||||
< 300000000 810000 76 >,
|
||||
< 345600000 820000 88 >,
|
||||
< 422400000 830000 109 >,
|
||||
@@ -1162,6 +1165,9 @@
|
||||
|
||||
qcom,speed2-pvs1-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 710000 37 >,
|
||||
+ < 223200000 780000 56 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 810000 88 >,
|
||||
< 422400000 820000 109 >,
|
||||
@@ -1197,6 +1203,9 @@
|
||||
|
||||
qcom,speed2-pvs2-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 700000 37 >,
|
||||
+ < 223200000 770000 56 >,
|
||||
< 300000000 790000 76 >,
|
||||
< 345600000 800000 88 >,
|
||||
< 422400000 810000 109 >,
|
||||
@@ -1232,6 +1241,9 @@
|
||||
|
||||
qcom,speed2-pvs3-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 690000 37 >,
|
||||
+ < 223200000 760000 56 >,
|
||||
< 300000000 780000 76 >,
|
||||
< 345600000 790000 88 >,
|
||||
< 422400000 800000 109 >,
|
||||
@@ -1267,6 +1279,9 @@
|
||||
|
||||
qcom,speed2-pvs4-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 680000 37 >,
|
||||
+ < 223200000 750000 56 >,
|
||||
< 300000000 770000 76 >,
|
||||
< 345600000 780000 88 >,
|
||||
< 422400000 790000 109 >,
|
||||
@@ -1302,6 +1317,9 @@
|
||||
|
||||
qcom,speed2-pvs5-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 670000 37 >,
|
||||
+ < 223200000 740000 56 >,
|
||||
< 300000000 760000 76 >,
|
||||
< 345600000 770000 88 >,
|
||||
< 422400000 780000 109 >,
|
||||
@@ -1337,6 +1355,9 @@
|
||||
|
||||
qcom,speed2-pvs6-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 660000 37 >,
|
||||
+ < 223200000 730000 56 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 760000 88 >,
|
||||
< 422400000 770000 109 >,
|
||||
@@ -1372,6 +1393,9 @@
|
||||
|
||||
qcom,speed2-pvs7-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 650000 37 >,
|
||||
+ < 223200000 720000 56 >,
|
||||
< 300000000 740000 76 >,
|
||||
< 345600000 750000 88 >,
|
||||
< 422400000 760000 109 >,
|
||||
@@ -1407,6 +1431,9 @@
|
||||
|
||||
qcom,speed2-pvs8-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 640000 37 >,
|
||||
+ < 223200000 710000 56 >,
|
||||
< 300000000 730000 76 >,
|
||||
< 345600000 740000 88 >,
|
||||
< 422400000 750000 109 >,
|
||||
@@ -1442,6 +1469,9 @@
|
||||
|
||||
qcom,speed2-pvs9-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 630000 37 >,
|
||||
+ < 223200000 700000 56 >,
|
||||
< 300000000 720000 76 >,
|
||||
< 345600000 730000 88 >,
|
||||
< 422400000 740000 109 >,
|
||||
@@ -1477,6 +1507,9 @@
|
||||
|
||||
qcom,speed2-pvs10-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 620000 37 >,
|
||||
+ < 223200000 690000 56 >,
|
||||
< 300000000 710000 76 >,
|
||||
< 345600000 720000 88 >,
|
||||
< 422400000 730000 109 >,
|
||||
@@ -1512,6 +1545,9 @@
|
||||
|
||||
qcom,speed2-pvs11-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 610000 37 >,
|
||||
+ < 223200000 680000 56 >,
|
||||
< 300000000 700000 76 >,
|
||||
< 345600000 710000 88 >,
|
||||
< 422400000 720000 109 >,
|
||||
@@ -1547,6 +1583,9 @@
|
||||
|
||||
qcom,speed2-pvs12-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 600000 37 >,
|
||||
+ < 223200000 670000 56 >,
|
||||
< 300000000 690000 76 >,
|
||||
< 345600000 700000 88 >,
|
||||
< 422400000 710000 109 >,
|
||||
@@ -1582,6 +1621,9 @@
|
||||
|
||||
qcom,speed2-pvs13-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 590000 37 >,
|
||||
+ < 223200000 660000 56 >,
|
||||
< 300000000 680000 76 >,
|
||||
< 345600000 690000 88 >,
|
||||
< 422400000 700000 109 >,
|
||||
@@ -1617,6 +1659,9 @@
|
||||
|
||||
qcom,speed2-pvs14-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 580000 37 >,
|
||||
+ < 223200000 650000 56 >,
|
||||
< 300000000 670000 76 >,
|
||||
< 345600000 680000 88 >,
|
||||
< 422400000 690000 109 >,
|
||||
@@ -1652,6 +1697,9 @@
|
||||
|
||||
qcom,speed2-pvs15-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 35800000 500000 17 >,
|
||||
+ < 98300000 570000 37 >,
|
||||
+ < 223200000 640000 56 >,
|
||||
< 300000000 660000 76 >,
|
||||
< 345600000 670000 88 >,
|
||||
< 422400000 680000 109 >,
|
||||
@@ -4297,6 +4345,9 @@
|
||||
reg = <0 4>;
|
||||
compatible = "qcom,msm-cpufreq";
|
||||
qcom,cpufreq-table =
|
||||
+ < 35800 35800 762 >,
|
||||
+ < 98300 98300 762 >,
|
||||
+ < 223200 223200 762 >,
|
||||
< 300000 300000 1144 >,
|
||||
< 422400 422400 2288 >,
|
||||
< 652800 499200 3051 >,
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 143adae138c68fbcd53fa8dbc644ef4a0850879c Mon Sep 17 00:00:00 2001
|
||||
From: bhb27 <fglfgl27@gmail.com>
|
||||
Date: Thu, 25 Feb 2016 14:46:26 -0800
|
||||
Subject: [PATCH 2/6] qcom:apq8084: OC to 2880 MHz
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/apq8084.dtsi | 198 ++++++++++++++++++++++++++++++------
|
||||
1 file changed, 165 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/apq8084.dtsi b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
index 1e782d6..c419bc3 100644
|
||||
--- a/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
@@ -1161,7 +1161,11 @@
|
||||
< 2419200000 1105000 777 >,
|
||||
< 2496000000 1120000 813 >,
|
||||
< 2572800000 1135000 849 >,
|
||||
- < 2649600000 1150000 886 >;
|
||||
+ < 2649600000 1150000 886 >,
|
||||
+ < 2688000000 1160000 917 >,
|
||||
+ < 2764800000 1170000 952 >,
|
||||
+ < 2841600000 1185000 980 >,
|
||||
+ < 2880000000 1195000 1003 >;
|
||||
|
||||
qcom,speed2-pvs1-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1199,7 +1203,11 @@
|
||||
< 2419200000 1095000 777 >,
|
||||
< 2496000000 1110000 813 >,
|
||||
< 2572800000 1125000 849 >,
|
||||
- < 2649600000 1140000 886 >;
|
||||
+ < 2649600000 1140000 886 >,
|
||||
+ < 2688000000 1150000 917 >,
|
||||
+ < 2764800000 1160000 952 >,
|
||||
+ < 2841600000 1175000 980 >,
|
||||
+ < 2880000000 1185000 1003 >;
|
||||
|
||||
qcom,speed2-pvs2-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1237,7 +1245,11 @@
|
||||
< 2419200000 1085000 777 >,
|
||||
< 2496000000 1100000 813 >,
|
||||
< 2572800000 1115000 849 >,
|
||||
- < 2649600000 1130000 886 >;
|
||||
+ < 2649600000 1130000 886 >,
|
||||
+ < 2688000000 1140000 917 >,
|
||||
+ < 2764800000 1150000 952 >,
|
||||
+ < 2841600000 1165000 980 >,
|
||||
+ < 2880000000 1175000 1003 >;
|
||||
|
||||
qcom,speed2-pvs3-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1275,7 +1287,11 @@
|
||||
< 2419200000 1075000 777 >,
|
||||
< 2496000000 1090000 813 >,
|
||||
< 2572800000 1105000 849 >,
|
||||
- < 2649600000 1120000 886 >;
|
||||
+ < 2649600000 1120000 886 >,
|
||||
+ < 2688000000 1130000 917 >,
|
||||
+ < 2764800000 1140000 952 >,
|
||||
+ < 2841600000 1155000 980 >,
|
||||
+ < 2880000000 1165000 1003 >;
|
||||
|
||||
qcom,speed2-pvs4-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1313,7 +1329,11 @@
|
||||
< 2419200000 1065000 777 >,
|
||||
< 2496000000 1080000 813 >,
|
||||
< 2572800000 1095000 849 >,
|
||||
- < 2649600000 1110000 886 >;
|
||||
+ < 2649600000 1110000 886 >,
|
||||
+ < 2688000000 1120000 917 >,
|
||||
+ < 2764800000 1130000 952 >,
|
||||
+ < 2841600000 1145000 980 >,
|
||||
+ < 2880000000 1155000 1003 >;
|
||||
|
||||
qcom,speed2-pvs5-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1351,7 +1371,11 @@
|
||||
< 2419200000 1055000 777 >,
|
||||
< 2496000000 1070000 813 >,
|
||||
< 2572800000 1085000 849 >,
|
||||
- < 2649600000 1100000 886 >;
|
||||
+ < 2649600000 1100000 886 >,
|
||||
+ < 2688000000 1110000 917 >,
|
||||
+ < 2764800000 1120000 952 >,
|
||||
+ < 2841600000 1135000 980 >,
|
||||
+ < 2880000000 1145000 1003 >;
|
||||
|
||||
qcom,speed2-pvs6-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1389,7 +1413,11 @@
|
||||
< 2419200000 1045000 777 >,
|
||||
< 2496000000 1060000 813 >,
|
||||
< 2572800000 1075000 849 >,
|
||||
- < 2649600000 1090000 886 >;
|
||||
+ < 2649600000 1090000 886 >,
|
||||
+ < 2688000000 1100000 917 >,
|
||||
+ < 2764800000 1110000 952 >,
|
||||
+ < 2841600000 1125000 980 >,
|
||||
+ < 2880000000 1135000 1003 >;
|
||||
|
||||
qcom,speed2-pvs7-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1427,7 +1455,11 @@
|
||||
< 2419200000 1035000 777 >,
|
||||
< 2496000000 1050000 813 >,
|
||||
< 2572800000 1065000 849 >,
|
||||
- < 2649600000 1080000 886 >;
|
||||
+ < 2649600000 1080000 886 >,
|
||||
+ < 2688000000 1090000 917 >,
|
||||
+ < 2764800000 1100000 952 >,
|
||||
+ < 2841600000 1115000 980 >,
|
||||
+ < 2880000000 1125000 1003 >;
|
||||
|
||||
qcom,speed2-pvs8-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1465,7 +1497,11 @@
|
||||
< 2419200000 1025000 777 >,
|
||||
< 2496000000 1040000 813 >,
|
||||
< 2572800000 1055000 849 >,
|
||||
- < 2649600000 1070000 886 >;
|
||||
+ < 2649600000 1070000 886 >,
|
||||
+ < 2688000000 1080000 917 >,
|
||||
+ < 2764800000 1090000 952 >,
|
||||
+ < 2841600000 1105000 980 >,
|
||||
+ < 2880000000 1115000 1003 >;
|
||||
|
||||
qcom,speed2-pvs9-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1503,7 +1539,11 @@
|
||||
< 2419200000 1015000 777 >,
|
||||
< 2496000000 1030000 813 >,
|
||||
< 2572800000 1045000 849 >,
|
||||
- < 2649600000 1060000 886 >;
|
||||
+ < 2649600000 1060000 886 >,
|
||||
+ < 2688000000 1070000 917 >,
|
||||
+ < 2764800000 1090000 952 >,
|
||||
+ < 2841600000 1105000 980 >,
|
||||
+ < 2880000000 1115000 1003 >;
|
||||
|
||||
qcom,speed2-pvs10-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1541,7 +1581,11 @@
|
||||
< 2419200000 1005000 777 >,
|
||||
< 2496000000 1020000 813 >,
|
||||
< 2572800000 1035000 849 >,
|
||||
- < 2649600000 1050000 886 >;
|
||||
+ < 2649600000 1050000 886 >,
|
||||
+ < 2688000000 1060000 917 >,
|
||||
+ < 2764800000 1080000 952 >,
|
||||
+ < 2841600000 1095000 980 >,
|
||||
+ < 2880000000 1105000 1003 >;
|
||||
|
||||
qcom,speed2-pvs11-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1579,7 +1623,11 @@
|
||||
< 2419200000 995000 777 >,
|
||||
< 2496000000 1010000 813 >,
|
||||
< 2572800000 1025000 849 >,
|
||||
- < 2649600000 1040000 886 >;
|
||||
+ < 2649600000 1040000 886 >,
|
||||
+ < 2688000000 1050000 917 >,
|
||||
+ < 2764800000 1060000 952 >,
|
||||
+ < 2841600000 1075000 980 >,
|
||||
+ < 2880000000 1085000 1003 >;
|
||||
|
||||
qcom,speed2-pvs12-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1617,7 +1665,11 @@
|
||||
< 2419200000 985000 777 >,
|
||||
< 2496000000 1000000 813 >,
|
||||
< 2572800000 1015000 849 >,
|
||||
- < 2649600000 1030000 886 >;
|
||||
+ < 2649600000 1030000 886 >,
|
||||
+ < 2688000000 1040000 917 >,
|
||||
+ < 2764800000 1050000 952 >,
|
||||
+ < 2841600000 1065000 980 >,
|
||||
+ < 2880000000 1075000 1003 >;
|
||||
|
||||
qcom,speed2-pvs13-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1655,7 +1707,11 @@
|
||||
< 2419200000 975000 777 >,
|
||||
< 2496000000 990000 813 >,
|
||||
< 2572800000 1005000 849 >,
|
||||
- < 2649600000 1020000 886 >;
|
||||
+ < 2649600000 1020000 886 >,
|
||||
+ < 2688000000 1030000 917 >,
|
||||
+ < 2764800000 1040000 952 >,
|
||||
+ < 2841600000 1055000 980 >,
|
||||
+ < 2880000000 1065000 1003 >;
|
||||
|
||||
qcom,speed2-pvs14-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1693,7 +1749,11 @@
|
||||
< 2419200000 965000 777 >,
|
||||
< 2496000000 980000 813 >,
|
||||
< 2572800000 995000 849 >,
|
||||
- < 2649600000 1010000 886 >;
|
||||
+ < 2649600000 1010000 886 >,
|
||||
+ < 2688000000 1020000 917 >,
|
||||
+ < 2764800000 1030000 952 >,
|
||||
+ < 2841600000 1045000 980 >,
|
||||
+ < 2880000000 1055000 1003 >;
|
||||
|
||||
qcom,speed2-pvs15-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
@@ -1731,7 +1791,11 @@
|
||||
< 2419200000 955000 777 >,
|
||||
< 2496000000 970000 813 >,
|
||||
< 2572800000 985000 849 >,
|
||||
- < 2649600000 1000000 886 >;
|
||||
+ < 2649600000 1000000 886 >,
|
||||
+ < 2688000000 1010000 917 >,
|
||||
+ < 2764800000 1020000 952 >,
|
||||
+ < 2841600000 1035000 980 >,
|
||||
+ < 2880000000 1045000 1003 >;
|
||||
|
||||
/* 2.7GHz RC0 */
|
||||
qcom,speed2-pvs0-bin-v0 =
|
||||
@@ -1767,7 +1831,11 @@
|
||||
< 2419200000 1105000 777 >,
|
||||
< 2496000000 1120000 813 >,
|
||||
< 2572800000 1135000 849 >,
|
||||
- < 2649600000 1150000 886 >;
|
||||
+ < 2649600000 1150000 886 >,
|
||||
+ < 2688000000 1160000 917 >,
|
||||
+ < 2764800000 1170000 952 >,
|
||||
+ < 2841600000 1185000 980 >,
|
||||
+ < 2880000000 1195000 1003 >;
|
||||
|
||||
qcom,speed2-pvs1-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -1802,7 +1870,11 @@
|
||||
< 2419200000 1095000 777 >,
|
||||
< 2496000000 1110000 813 >,
|
||||
< 2572800000 1125000 849 >,
|
||||
- < 2649600000 1140000 886 >;
|
||||
+ < 2649600000 1140000 886 >,
|
||||
+ < 2688000000 1150000 917 >,
|
||||
+ < 2764800000 1160000 952 >,
|
||||
+ < 2841600000 1185000 980 >,
|
||||
+ < 2880000000 1195000 1003 >;
|
||||
|
||||
qcom,speed2-pvs2-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -1837,7 +1909,11 @@
|
||||
< 2419200000 1085000 777 >,
|
||||
< 2496000000 1100000 813 >,
|
||||
< 2572800000 1115000 849 >,
|
||||
- < 2649600000 1130000 886 >;
|
||||
+ < 2649600000 1130000 886 >,
|
||||
+ < 2688000000 1140000 917 >,
|
||||
+ < 2764800000 1150000 952 >,
|
||||
+ < 2841600000 1165000 980 >,
|
||||
+ < 2880000000 1175000 1003 >;
|
||||
|
||||
qcom,speed2-pvs3-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -1872,7 +1948,11 @@
|
||||
< 2419200000 1075000 777 >,
|
||||
< 2496000000 1090000 813 >,
|
||||
< 2572800000 1105000 849 >,
|
||||
- < 2649600000 1120000 886 >;
|
||||
+ < 2649600000 1120000 886 >,
|
||||
+ < 2688000000 1130000 917 >,
|
||||
+ < 2764800000 1140000 952 >,
|
||||
+ < 2841600000 1165000 980 >,
|
||||
+ < 2880000000 1175000 1003 >;
|
||||
|
||||
qcom,speed2-pvs4-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -1907,7 +1987,11 @@
|
||||
< 2419200000 1065000 777 >,
|
||||
< 2496000000 1080000 813 >,
|
||||
< 2572800000 1095000 849 >,
|
||||
- < 2649600000 1110000 886 >;
|
||||
+ < 2649600000 1110000 886 >,
|
||||
+ < 2688000000 1120000 917 >,
|
||||
+ < 2764800000 1130000 952 >,
|
||||
+ < 2841600000 1145000 980 >,
|
||||
+ < 2880000000 1155000 1003 >;
|
||||
|
||||
qcom,speed2-pvs5-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -1942,7 +2026,11 @@
|
||||
< 2419200000 1055000 777 >,
|
||||
< 2496000000 1070000 813 >,
|
||||
< 2572800000 1085000 849 >,
|
||||
- < 2649600000 1100000 886 >;
|
||||
+ < 2649600000 1100000 886 >,
|
||||
+ < 2688000000 1110000 917 >,
|
||||
+ < 2764800000 1120000 952 >,
|
||||
+ < 2841600000 1135000 980 >,
|
||||
+ < 2880000000 1145000 1003 >;
|
||||
|
||||
qcom,speed2-pvs6-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -1977,7 +2065,11 @@
|
||||
< 2419200000 1045000 777 >,
|
||||
< 2496000000 1060000 813 >,
|
||||
< 2572800000 1075000 849 >,
|
||||
- < 2649600000 1090000 886 >;
|
||||
+ < 2649600000 1090000 886 >,
|
||||
+ < 2688000000 1100000 917 >,
|
||||
+ < 2764800000 1110000 952 >,
|
||||
+ < 2841600000 1125000 980 >,
|
||||
+ < 2880000000 1135000 1003 >;
|
||||
|
||||
qcom,speed2-pvs7-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2012,7 +2104,11 @@
|
||||
< 2419200000 1035000 777 >,
|
||||
< 2496000000 1050000 813 >,
|
||||
< 2572800000 1065000 849 >,
|
||||
- < 2649600000 1080000 886 >;
|
||||
+ < 2649600000 1080000 886 >,
|
||||
+ < 2688000000 1090000 917 >,
|
||||
+ < 2764800000 1100000 952 >,
|
||||
+ < 2841600000 1115000 980 >,
|
||||
+ < 2880000000 1125000 1003 >;
|
||||
|
||||
qcom,speed2-pvs8-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2047,7 +2143,11 @@
|
||||
< 2419200000 1025000 777 >,
|
||||
< 2496000000 1040000 813 >,
|
||||
< 2572800000 1055000 849 >,
|
||||
- < 2649600000 1070000 886 >;
|
||||
+ < 2649600000 1070000 886 >,
|
||||
+ < 2688000000 1080000 917 >,
|
||||
+ < 2764800000 1090000 952 >,
|
||||
+ < 2841600000 1105000 980 >,
|
||||
+ < 2880000000 1115000 1003 >;
|
||||
|
||||
qcom,speed2-pvs9-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2082,7 +2182,11 @@
|
||||
< 2419200000 1015000 777 >,
|
||||
< 2496000000 1030000 813 >,
|
||||
< 2572800000 1045000 849 >,
|
||||
- < 2649600000 1060000 886 >;
|
||||
+ < 2649600000 1060000 886 >,
|
||||
+ < 2688000000 1070000 917 >,
|
||||
+ < 2764800000 1080000 952 >,
|
||||
+ < 2841600000 1095000 980 >,
|
||||
+ < 2880000000 1105000 1003 >;
|
||||
|
||||
qcom,speed2-pvs10-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2117,7 +2221,11 @@
|
||||
< 2419200000 1005000 777 >,
|
||||
< 2496000000 1020000 813 >,
|
||||
< 2572800000 1035000 849 >,
|
||||
- < 2649600000 1050000 886 >;
|
||||
+ < 2649600000 1050000 886 >,
|
||||
+ < 2688000000 1060000 917 >,
|
||||
+ < 2764800000 1070000 952 >,
|
||||
+ < 2841600000 1085000 980 >,
|
||||
+ < 2880000000 1095000 1003 >;
|
||||
|
||||
qcom,speed2-pvs11-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2152,7 +2260,11 @@
|
||||
< 2419200000 995000 777 >,
|
||||
< 2496000000 1010000 813 >,
|
||||
< 2572800000 1025000 849 >,
|
||||
- < 2649600000 1040000 886 >;
|
||||
+ < 2649600000 1040000 886 >,
|
||||
+ < 2688000000 1050000 917 >,
|
||||
+ < 2764800000 1060000 952 >,
|
||||
+ < 2841600000 1075000 980 >,
|
||||
+ < 2880000000 1085000 1003 >;
|
||||
|
||||
qcom,speed2-pvs12-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2187,7 +2299,11 @@
|
||||
< 2419200000 985000 777 >,
|
||||
< 2496000000 1000000 813 >,
|
||||
< 2572800000 1015000 849 >,
|
||||
- < 2649600000 1030000 886 >;
|
||||
+ < 2649600000 1030000 886 >,
|
||||
+ < 2688000000 1040000 917 >,
|
||||
+ < 2764800000 1050000 952 >,
|
||||
+ < 2841600000 1065000 980 >,
|
||||
+ < 2880000000 1075000 1003 >;
|
||||
|
||||
qcom,speed2-pvs13-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2222,7 +2338,11 @@
|
||||
< 2419200000 975000 777 >,
|
||||
< 2496000000 990000 813 >,
|
||||
< 2572800000 1005000 849 >,
|
||||
- < 2649600000 1020000 886 >;
|
||||
+ < 2649600000 1020000 886 >,
|
||||
+ < 2688000000 1030000 917 >,
|
||||
+ < 2764800000 1040000 952 >,
|
||||
+ < 2841600000 1055000 980 >,
|
||||
+ < 2880000000 1065000 1003 >;
|
||||
|
||||
qcom,speed2-pvs14-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2257,7 +2377,11 @@
|
||||
< 2419200000 965000 777 >,
|
||||
< 2496000000 980000 813 >,
|
||||
< 2572800000 995000 849 >,
|
||||
- < 2649600000 1010000 886 >;
|
||||
+ < 2649600000 1010000 886 >,
|
||||
+ < 2688000000 1020000 917 >,
|
||||
+ < 2764800000 1030000 952 >,
|
||||
+ < 2841600000 1045000 980 >,
|
||||
+ < 2880000000 1055000 1003 >;
|
||||
|
||||
qcom,speed2-pvs15-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
@@ -2292,7 +2416,11 @@
|
||||
< 2419200000 955000 777 >,
|
||||
< 2496000000 970000 813 >,
|
||||
< 2572800000 985000 849 >,
|
||||
- < 2649600000 1000000 886 >;
|
||||
+ < 2649600000 1000000 886 >,
|
||||
+ < 2688000000 1010000 917 >,
|
||||
+ < 2764800000 1020000 952 >,
|
||||
+ < 2841600000 1035000 980 >,
|
||||
+ < 2880000000 1045000 1003 >;
|
||||
|
||||
/* 2.5GHz RC1 */
|
||||
qcom,speed1-pvs0-bin-v1 =
|
||||
@@ -4365,7 +4493,11 @@
|
||||
< 2457600 1728000 16250 >,
|
||||
< 2496000 1728000 16250 >,
|
||||
< 2572800 1728000 16250 >,
|
||||
- < 2649600 1728000 16250 >;
|
||||
+ < 2649600 1728000 16250 >,
|
||||
+ < 2688000 1728000 16250 >, /* overclock */
|
||||
+ < 2764800 1728000 16250 >,
|
||||
+ < 2841600 1728000 16250 >,
|
||||
+ < 2880000 1728000 16250 >;
|
||||
};
|
||||
|
||||
usb_otg: usb@f9a55000 {
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From aeca3d3b8d3177ddf8aab303b54f5ef3a1d0ce05 Mon Sep 17 00:00:00 2001
|
||||
From: XileForce <rdaguiar360@gmail.com>
|
||||
Date: Mon, 11 May 2015 21:43:20 -0700
|
||||
Subject: [PATCH 3/6] APQ8084: 2457600 Is Not A Real Frequency. Replace It With
|
||||
2419200 2457600 does not exist in our voltage/current tables. Thus its
|
||||
voltage cant be adjusted, nor am I sure what voltage it actually uses since
|
||||
it isnt defined anywhere. Let's replace that with the existing, but currently
|
||||
unused, 2419200 step.
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/apq8084.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/apq8084.dtsi b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
index c419bc3..1fe7174 100644
|
||||
--- a/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
@@ -4490,7 +4490,7 @@
|
||||
< 1728000 1651200 12145 >,
|
||||
< 1958400 1728000 16250 >,
|
||||
< 2265600 1728000 16250 >,
|
||||
- < 2457600 1728000 16250 >,
|
||||
+ < 2419200 1728000 16250 >,
|
||||
< 2496000 1728000 16250 >,
|
||||
< 2572800 1728000 16250 >,
|
||||
< 2649600 1728000 16250 >,
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 591d576aba39ec8ecb3c4c564577490e451d8839 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe Leon <fglfgl27@gmail.com>
|
||||
Date: Sat, 17 Dec 2016 03:30:45 -0800
|
||||
Subject: [PATCH 4/6] apq8084: DTB Fix qcom,bcl table
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/apq8084.dtsi | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/apq8084.dtsi b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
index 1fe7174..a5f2a26 100644
|
||||
--- a/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
@@ -5030,9 +5030,9 @@
|
||||
qcom,ibat-monitor {
|
||||
high-threshold-uamp = <3000000>;
|
||||
low-threshold-uamp = <1000000>;
|
||||
- mitigation-freq-khz = <1958400>;
|
||||
- mitigation-gpu-freq-khz = <389000>;
|
||||
- max-gpu-freq-khz = <600000>;
|
||||
+ mitigation-freq-khz = <2880000>;
|
||||
+ mitigation-gpu-freq-khz = <350000>;
|
||||
+ max-gpu-freq-khz = <800000>;
|
||||
ibat-channel = <0x15>;
|
||||
adc-interval-usec = <3900>;
|
||||
uv-to-ua-numerator = <2>;
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 170faa65e72f696aaa6a60cc9653c530c2225d32 Mon Sep 17 00:00:00 2001
|
||||
From: Felipe de Leon <fglfgl27@gmail.com>
|
||||
Date: Sat, 17 Dec 2016 04:04:13 -0800
|
||||
Subject: [PATCH 5/6] boot: dtsi: Adds the current values for the cores in uA
|
||||
for under and overclock
|
||||
|
||||
Current value based on calculos made using the stock values
|
||||
orginal commit
|
||||
bhb27/android_kernel_motorola_apq8084@0e332d0
|
||||
bhb27/android_kernel_motorola_apq8084@9d21c12
|
||||
---
|
||||
arch/arm/boot/dts/qcom/apq8084.dtsi | 36 ++++++++++++++++++++++++++++--------
|
||||
1 file changed, 28 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/apq8084.dtsi b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
index a5f2a26..8b264bd 100644
|
||||
--- a/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
@@ -38,7 +38,8 @@
|
||||
reg = <0x0>;
|
||||
// The currents(uA) correspond to the frequencies in the
|
||||
// frequency table.
|
||||
- current = < 71000 //300000 kHz
|
||||
+ current = < 64000 //268800 kHz underclock
|
||||
+ 71000 //300000 kHz
|
||||
83000 //422400 kHz
|
||||
97000 //652800 kHz
|
||||
106000 //729600 kHz
|
||||
@@ -55,7 +56,11 @@
|
||||
405000 //2457600 kHz
|
||||
405000 //2496000 kHz
|
||||
413000 //2572800 kHz
|
||||
- 414000>; //2649600 kHz
|
||||
+ 414000 //2649600 kHz
|
||||
+ 420000 //2688000 kHz overclock
|
||||
+ 432000 //2764800 kHz
|
||||
+ 444000 //2841600 kHz
|
||||
+ 450000>; //2880000 kHz
|
||||
};
|
||||
|
||||
CPU1: cpu@1 {
|
||||
@@ -64,7 +69,8 @@
|
||||
reg = <0x1>;
|
||||
// The currents(uA) correspond to the frequencies in the
|
||||
// frequency table.
|
||||
- current = < 40470 //300000 kHz
|
||||
+ current = < 36260 //268800 kHz underclock
|
||||
+ 40470 //300000 kHz
|
||||
47309 //422400 kHz
|
||||
55289 //652800 kHz
|
||||
60419 //729600 kHz
|
||||
@@ -81,7 +87,11 @@
|
||||
230849 //2457600 kHz
|
||||
230849 //2496000 kHz
|
||||
235409 //2572800 kHz
|
||||
- 235979>; //2649600 kHz
|
||||
+ 414000 //2649600 kHz
|
||||
+ 420000 //2688000 kHz overclock
|
||||
+ 432000 //2764800 kHz
|
||||
+ 444000 //2841600 kHz
|
||||
+ 450000>; //2880000 kHz
|
||||
};
|
||||
|
||||
CPU2: cpu@2 {
|
||||
@@ -90,7 +100,8 @@
|
||||
reg = <0x2>;
|
||||
// The currents(uA) correspond to the frequencies in the
|
||||
// frequency table.
|
||||
- current = < 46860 //300000 kHz
|
||||
+ current = < 41980 //268800 kHz underclock
|
||||
+ 46860 //300000 kHz
|
||||
54780 //422400 kHz
|
||||
64020 //652800 kHz
|
||||
69960 //729600 kHz
|
||||
@@ -107,7 +118,11 @@
|
||||
267300 //2457600 kHz
|
||||
267300 //2496000 kHz
|
||||
272580 //2572800 kHz
|
||||
- 273240>; //2649600 kHz
|
||||
+ 414000 //2649600 kHz
|
||||
+ 420000 //2688000 kHz overclock
|
||||
+ 432000 //2764800 kHz
|
||||
+ 444000 //2841600 kHz
|
||||
+ 450000>; //2880000 kHz
|
||||
};
|
||||
|
||||
CPU3: cpu@3 {
|
||||
@@ -116,7 +131,8 @@
|
||||
reg = <0x3>;
|
||||
// The currents(uA) correspond to the frequencies in the
|
||||
// frequency table.
|
||||
- current = < 53960 //300000 kHz
|
||||
+ current = < 48340 //268800 kHz underclock
|
||||
+ 53960 //300000 kHz
|
||||
63080 //422400 kHz
|
||||
73720 //652800 kHz
|
||||
80560 //729600 kHz
|
||||
@@ -133,7 +149,11 @@
|
||||
307800 //2457600 kHz
|
||||
307800 //2496000 kHz
|
||||
313880 //2572800 kHz
|
||||
- 314640>; //2649600 kHz
|
||||
+ 414000 //2649600 kHz
|
||||
+ 420000 //2688000 kHz overclock
|
||||
+ 432000 //2764800 kHz
|
||||
+ 444000 //2841600 kHz
|
||||
+ 450000>; //2880000 kHz
|
||||
};
|
||||
};
|
||||
memory {
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From c170f85350b5bf5148283a85f27504496d063852 Mon Sep 17 00:00:00 2001
|
||||
From: hellsgod <hellsgod@gmx.ch>
|
||||
Date: Tue, 23 Jun 2015 08:42:24 +0200
|
||||
Subject: [PATCH 6/6] arm/dt: shamu: Prevent BCL driver messing around with
|
||||
cores
|
||||
|
||||
credits to neobuddy for the heads up!
|
||||
---
|
||||
arch/arm/boot/dts/qcom/apq8084.dtsi | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/apq8084.dtsi b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
index 8b264bd..26f95e4 100644
|
||||
--- a/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/apq8084.dtsi
|
||||
@@ -5046,7 +5046,6 @@
|
||||
qcom,bcl-enable;
|
||||
qcom,ibat-vadc = <&pma8084_vadc>;
|
||||
qcom,ibat-threshold-adc_tm = <&pma8084_adc_tm>;
|
||||
- qcom,bcl-hotplug-list = <&CPU2 &CPU3>;
|
||||
qcom,ibat-monitor {
|
||||
high-threshold-uamp = <3000000>;
|
||||
low-threshold-uamp = <1000000>;
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,484 +0,0 @@
|
||||
From 28793d3021e480bba68fe8b76d9848a6b8aee5d5 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Tue, 3 Nov 2015 21:21:34 -0500
|
||||
Subject: [PATCH 1/3] msm8992 initial overclocking
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992-regulator.dtsi | 30 ++++++++++++--------
|
||||
arch/arm/boot/dts/qcom/msm8992.dtsi | 40 +++++++++++++++++++-------
|
||||
drivers/clk/qcom/clock-cpu-8994.c | 8 +++---
|
||||
drivers/cpufreq/qcom-cpufreq.c | 41 +++++++++++++++++++++++++++
|
||||
4 files changed, 93 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
index d5f6860..23b23ba 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
@@ -605,7 +605,7 @@
|
||||
regulator-name = "apc0_corner";
|
||||
qcom,cpr-fuse-corners = <4>;
|
||||
regulator-min-microvolt = <1>;
|
||||
- regulator-max-microvolt = <10>;
|
||||
+ regulator-max-microvolt = <12>;
|
||||
|
||||
qcom,cpr-voltage-ceiling = <900000 900000 1000000 1180000>;
|
||||
qcom,cpr-voltage-floor = <640000 700000 800000 850000>;
|
||||
@@ -669,15 +669,15 @@
|
||||
qcom,cpr-init-voltage-ref = <900000 900000 1000000 1230000>;
|
||||
qcom,cpr-init-voltage-step = <10000>;
|
||||
|
||||
- qcom,cpr-corner-map = <1 1 2 2 3 3 4 4 4 4>;
|
||||
+ qcom,cpr-corner-map = <1 1 2 2 3 3 4 4 4 4 4 4>;
|
||||
qcom,cpr-voltage-ceiling-override =
|
||||
<0xFFFFFFFF 0 800000 800000 900000 900000
|
||||
1000000 1000000 1115000 1115000
|
||||
- 1180000 1180000>;
|
||||
+ 1180000 1180000 1180000 1180000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 655000 700000 735000
|
||||
800000 835000 850000 875000
|
||||
- 950000 1000000>;
|
||||
+ 950000 1000000 1000000 1000000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0 0xffffffff 0 0 0 0 0>,
|
||||
<0 0xffffffff 1 0 0 0 0>,
|
||||
@@ -759,10 +759,12 @@
|
||||
<7 864000000>,
|
||||
<8 960000000>,
|
||||
<9 1248000000>,
|
||||
- <10 1440000000>;
|
||||
+ <10 1440000000>,
|
||||
+ <11 1536000000>,
|
||||
+ <12 1632000000>;
|
||||
qcom,cpr-speed-bin-max-corners =
|
||||
<0 0 2 4 6 9>,
|
||||
- <1 0 2 4 6 10>;
|
||||
+ <1 0 2 4 6 12>;
|
||||
qcom,cpr-enable;
|
||||
};
|
||||
|
||||
@@ -774,7 +776,7 @@
|
||||
regulator-name = "apc1_corner";
|
||||
qcom,cpr-fuse-corners = <4>;
|
||||
regulator-min-microvolt = <1>;
|
||||
- regulator-max-microvolt = <15>;
|
||||
+ regulator-max-microvolt = <17>;
|
||||
|
||||
qcom,cpr-voltage-ceiling = <900000 900000 1000000 1180000>;
|
||||
qcom,cpr-voltage-floor = <640000 640000 745000 850000>;
|
||||
@@ -841,17 +843,19 @@
|
||||
qcom,cpr-init-voltage-ref = <900000 900000 1000000 1230000>;
|
||||
qcom,cpr-init-voltage-step = <10000>;
|
||||
|
||||
- qcom,cpr-corner-map = <1 2 2 2 2 3 3 3 4 4 4 4 4 4 4>;
|
||||
+ qcom,cpr-corner-map = <1 2 2 2 2 3 3 3 4 4 4 4 4 4 4 4 4>;
|
||||
qcom,cpr-voltage-ceiling-override =
|
||||
<0xFFFFFFFF 0 900000 900000 900000 900000
|
||||
900000 1000000 1000000 1000000
|
||||
1115000 1115000 1115000 1115000
|
||||
- 1115000 1115000 1180000>;
|
||||
+ 1115000 1115000 1180000 1180000
|
||||
+ 1180000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 640000 665000 690000
|
||||
735000 745000 770000 785000
|
||||
850000 860000 880000 900000
|
||||
- 920000 935000 1000000>;
|
||||
+ 920000 935000 1000000 1000000
|
||||
+ 1000000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0xffffffff 0xffffffff 0 4 4 4 4>,
|
||||
<0xffffffff 0xffffffff 1 4 4 4 4>,
|
||||
@@ -908,9 +912,11 @@
|
||||
<12 1536000000>,
|
||||
<13 1632000000>,
|
||||
<14 1689600000>,
|
||||
- <15 1824000000>;
|
||||
+ <15 1824000000>,
|
||||
+ <16 1958400000>,
|
||||
+ <17 2016000000>;
|
||||
qcom,cpr-speed-bin-max-corners =
|
||||
- <0xFFFFFFFF 0 1 5 8 15>;
|
||||
+ <0xFFFFFFFF 0 1 5 8 17>;
|
||||
qcom,cpr-enable;
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992.dtsi b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
index 5ba420c..8892b56 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
@@ -852,7 +852,9 @@
|
||||
< 787200 3509 >,
|
||||
< 864000 4173 >,
|
||||
< 960000 5271 >,
|
||||
- < 1440000 7102 >;
|
||||
+ < 1440000 7102 >,
|
||||
+ < 1536000 7102 >,
|
||||
+ < 1632000 7102 >;
|
||||
cpu-to-dev-map-4 =
|
||||
< 384000 1525 >,
|
||||
< 633600 2288 >,
|
||||
@@ -860,16 +862,22 @@
|
||||
< 864000 4173 >,
|
||||
< 960000 5271 >,
|
||||
< 1344000 5928 >,
|
||||
- < 1824000 7102 >;
|
||||
+ < 1824000 7102 >,
|
||||
+ < 1958400 7102 >,
|
||||
+ < 2016000 7102 >;
|
||||
};
|
||||
|
||||
mincpubw-cpufreq {
|
||||
target-dev = <&mincpubw>;
|
||||
cpu-to-dev-map-0 =
|
||||
- < 1440000 1525 >;
|
||||
+ < 1440000 1525 >,
|
||||
+ < 1536000 1525 >,
|
||||
+ < 1632000 1525 >;
|
||||
cpu-to-dev-map-4 =
|
||||
< 1689600 1525 >,
|
||||
- < 1824000 5928 >;
|
||||
+ < 1824000 1525 >,
|
||||
+ < 1958400 1525 >,
|
||||
+ < 2016000 5928 >;
|
||||
};
|
||||
|
||||
cci-cpufreq {
|
||||
@@ -880,7 +888,9 @@
|
||||
< 787200 384000 >,
|
||||
< 864000 556800 >,
|
||||
< 960000 729600 >,
|
||||
- < 1440000 787200 >;
|
||||
+ < 1440000 787200 >,
|
||||
+ < 1536000 787200 >,
|
||||
+ < 1632000 787200 >;
|
||||
cpu-to-dev-map-4 =
|
||||
< 384000 134400 >,
|
||||
< 480000 300000 >,
|
||||
@@ -888,7 +898,9 @@
|
||||
< 768000 556800 >,
|
||||
< 960000 600000 >,
|
||||
< 1440000 729600 >,
|
||||
- < 1824000 787200 >;
|
||||
+ < 1824000 787200 >,
|
||||
+ < 1958400 787200 >,
|
||||
+ < 2016000 787200 >;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -915,7 +927,9 @@
|
||||
< 864000 >,
|
||||
< 960000 >,
|
||||
< 1248000 >,
|
||||
- < 1440000 >;
|
||||
+ < 1440000 >,
|
||||
+ < 1536000 >,
|
||||
+ < 1632000 >;
|
||||
|
||||
qcom,cpufreq-table-4 =
|
||||
< 384000 >,
|
||||
@@ -930,7 +944,9 @@
|
||||
< 1536000 >,
|
||||
< 1632000 >,
|
||||
< 1689600 >,
|
||||
- < 1824000 >;
|
||||
+ < 1824000 >,
|
||||
+ < 1958400 >,
|
||||
+ < 2016000 >;
|
||||
|
||||
};
|
||||
|
||||
@@ -968,7 +984,9 @@
|
||||
< 864000000 7>,
|
||||
< 960000000 8>,
|
||||
< 1248000000 9>,
|
||||
- < 1440000000 10>;
|
||||
+ < 1440000000 10>,
|
||||
+ < 1536000000 11>,
|
||||
+ < 1632000000 12>;
|
||||
qcom,a57-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
< 384000000 5>,
|
||||
@@ -983,7 +1001,9 @@
|
||||
< 1536000000 12>,
|
||||
< 1632000000 13>,
|
||||
< 1689600000 14>,
|
||||
- < 1824000000 15>;
|
||||
+ < 1824000000 15>,
|
||||
+ < 1958400000 16>,
|
||||
+ < 2016000000 17>;
|
||||
qcom,cci-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
< 134400000 2>,
|
||||
diff --git a/drivers/clk/qcom/clock-cpu-8994.c b/drivers/clk/qcom/clock-cpu-8994.c
|
||||
index 6eb346b..de3d72f 100644
|
||||
--- a/drivers/clk/qcom/clock-cpu-8994.c
|
||||
+++ b/drivers/clk/qcom/clock-cpu-8994.c
|
||||
@@ -191,13 +191,13 @@ static struct pll_clk a57_pll0 = {
|
||||
.test_ctl_lo_val = 0x00010000,
|
||||
},
|
||||
.min_rate = 1209600000,
|
||||
- .max_rate = 1996800000,
|
||||
+ .max_rate = 2073600000,
|
||||
.base = &vbases[C1_PLL_BASE],
|
||||
.c = {
|
||||
.parent = &xo_ao.c,
|
||||
.dbg_name = "a57_pll0",
|
||||
.ops = &clk_ops_variable_rate_pll,
|
||||
- VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 1996800000),
|
||||
+ VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 2073600000),
|
||||
CLK_INIT(a57_pll0.c),
|
||||
},
|
||||
};
|
||||
@@ -229,13 +229,13 @@ static struct pll_clk a57_pll1 = {
|
||||
/* Necessary since we'll be setting a rate before handoff on V1 */
|
||||
.src_rate = 19200000,
|
||||
.min_rate = 1209600000,
|
||||
- .max_rate = 1996800000,
|
||||
+ .max_rate = 2073600000,
|
||||
.base = &vbases[C1_PLL_BASE],
|
||||
.c = {
|
||||
.parent = &xo_ao.c,
|
||||
.dbg_name = "a57_pll1",
|
||||
.ops = &clk_ops_variable_rate_pll,
|
||||
- VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 1996800000),
|
||||
+ VDD_DIG_FMAX_MAP2(LOW, 1593600000, NOMINAL, 2073600000),
|
||||
CLK_INIT(a57_pll1.c),
|
||||
},
|
||||
};
|
||||
diff --git a/drivers/cpufreq/qcom-cpufreq.c b/drivers/cpufreq/qcom-cpufreq.c
|
||||
index e30b0cb..dd3a589 100644
|
||||
--- a/drivers/cpufreq/qcom-cpufreq.c
|
||||
+++ b/drivers/cpufreq/qcom-cpufreq.c
|
||||
@@ -31,6 +31,40 @@
|
||||
|
||||
static DEFINE_MUTEX(l2bw_lock);
|
||||
|
||||
+static unsigned long arg_cpu_max_a53 = 1440000;
|
||||
+
|
||||
+static int __init cpufreq_read_cpu_max_a53(char *cpu_max_a53)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = kstrtoul(cpu_max_a53, 0, &ui_khz);
|
||||
+ if (ret)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ arg_cpu_max_a53 = ui_khz;
|
||||
+ printk("cpu_max_a53=%lu\n", arg_cpu_max_a53);
|
||||
+ return ret;
|
||||
+}
|
||||
+__setup("cpu_max_a53=", cpufreq_read_cpu_max_a53);
|
||||
+
|
||||
+static unsigned long arg_cpu_max_a57 = 1824000;
|
||||
+
|
||||
+static int __init cpufreq_read_cpu_max_a57(char *cpu_max_a57)
|
||||
+{
|
||||
+ unsigned long ui_khz;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = kstrtoul(cpu_max_a57, 0, &ui_khz);
|
||||
+ if (ret)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ arg_cpu_max_a57 = ui_khz;
|
||||
+ printk("cpu_max_a57=%lu\n", arg_cpu_max_a57);
|
||||
+ return ret;
|
||||
+}
|
||||
+__setup("cpu_max_a57=", cpufreq_read_cpu_max_a57);
|
||||
+
|
||||
static struct clk *cpu_clk[NR_CPUS];
|
||||
static struct clk *l2_clk;
|
||||
static DEFINE_PER_CPU(struct cpufreq_frequency_table *, freq_table);
|
||||
@@ -364,6 +398,13 @@ static struct cpufreq_frequency_table *cpufreq_parse_dt(struct device *dev,
|
||||
if (i > 0 && f <= ftbl[i-1].frequency)
|
||||
break;
|
||||
|
||||
+ //Custom max freq
|
||||
+ if ((cpu < 4 && f > arg_cpu_max_a53) ||
|
||||
+ (cpu >= 4 && f > arg_cpu_max_a57)) {
|
||||
+ nf = i;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
ftbl[i].driver_data = i;
|
||||
ftbl[i].frequency = f;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From 9dfe99b9f8eead920f7cdefdb2ae7b1cea776d9b Mon Sep 17 00:00:00 2001
|
||||
From: dirtyhank <dirtyhank@gmail.com>
|
||||
Date: Thu, 14 Jan 2016 12:56:07 +0100
|
||||
Subject: [PATCH 2/3] CPU underclocking
|
||||
|
||||
Based on underclocking to Nexus 6P by anarkia1976
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992-regulator.dtsi | 6 +++---
|
||||
arch/arm/boot/dts/qcom/msm8992.dtsi | 14 +++++++++++---
|
||||
2 files changed, 14 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
index 23b23ba..1ef9eb3 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
@@ -750,7 +750,7 @@
|
||||
qcom,cpr-voltage-scaling-factor-max = <0 0 2000 2000>;
|
||||
qcom,cpr-quot-adjust-scaling-factor-max = <0 2000 2000 2000>;
|
||||
qcom,cpr-corner-frequency-map =
|
||||
- <1 300000000>,
|
||||
+ <1 302400000>,
|
||||
<2 384000000>,
|
||||
<3 460800000>,
|
||||
<4 600000000>,
|
||||
@@ -898,8 +898,8 @@
|
||||
qcom,cpr-voltage-scaling-factor-max = <0 0 2000 2000>;
|
||||
qcom,cpr-quot-adjust-scaling-factor-max = <0 0 2000 2000>;
|
||||
qcom,cpr-corner-frequency-map =
|
||||
- <1 300000000>, /* SVS Fmin for "SVS2" */
|
||||
- <2 300000000>,
|
||||
+ <1 302400000>, /* SVS Fmin for "SVS2" */
|
||||
+ <2 302400000>,
|
||||
<3 384000000>,
|
||||
<4 480000000>,
|
||||
<5 633600000>,
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992.dtsi b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
index 8892b56..f6a39cd 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
@@ -796,7 +796,7 @@
|
||||
governor = "cpufreq";
|
||||
freq-tbl-khz =
|
||||
< 134400 >,
|
||||
- < 300000 >,
|
||||
+ < 302400 >,
|
||||
< 384000 >,
|
||||
< 556800 >,
|
||||
< 600000 >,
|
||||
@@ -856,7 +856,8 @@
|
||||
< 1536000 7102 >,
|
||||
< 1632000 7102 >;
|
||||
cpu-to-dev-map-4 =
|
||||
- < 384000 1525 >,
|
||||
+ < 302400 1525 >,
|
||||
+ < 384000 1525 >,
|
||||
< 633600 2288 >,
|
||||
< 768000 3509 >,
|
||||
< 864000 4173 >,
|
||||
@@ -883,6 +884,7 @@
|
||||
cci-cpufreq {
|
||||
target-dev = <&cci_cache>;
|
||||
cpu-to-dev-map-0 =
|
||||
+ < 302400 134400 >,
|
||||
< 384000 134400 >,
|
||||
< 600000 300000 >,
|
||||
< 787200 384000 >,
|
||||
@@ -892,6 +894,7 @@
|
||||
< 1536000 787200 >,
|
||||
< 1632000 787200 >;
|
||||
cpu-to-dev-map-4 =
|
||||
+ < 302400 134400 >,
|
||||
< 384000 134400 >,
|
||||
< 480000 300000 >,
|
||||
< 633600 384000 >,
|
||||
@@ -919,6 +922,7 @@
|
||||
qcom,governor-per-policy;
|
||||
|
||||
qcom,cpufreq-table-0 =
|
||||
+ < 302400 >,
|
||||
< 384000 >,
|
||||
< 460800 >,
|
||||
< 600000 >,
|
||||
@@ -932,6 +936,7 @@
|
||||
< 1632000 >;
|
||||
|
||||
qcom,cpufreq-table-4 =
|
||||
+ < 302400 >,
|
||||
< 384000 >,
|
||||
< 480000 >,
|
||||
< 633600 >,
|
||||
@@ -966,6 +971,7 @@
|
||||
vdd-dig-supply = <&pm8994_s2_corner_ao>;
|
||||
qcom,a53-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
+ < 302400000 1>,
|
||||
< 384000000 2>,
|
||||
< 460800000 3>,
|
||||
< 600000000 4>,
|
||||
@@ -976,6 +982,7 @@
|
||||
< 1248000000 9>;
|
||||
qcom,a53-speedbin1-v0 =
|
||||
< 0 0>,
|
||||
+ < 302400000 1>,
|
||||
< 384000000 2>,
|
||||
< 460800000 3>,
|
||||
< 600000000 4>,
|
||||
@@ -989,6 +996,7 @@
|
||||
< 1632000000 12>;
|
||||
qcom,a57-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
+ < 302400000 5>,
|
||||
< 384000000 5>,
|
||||
< 480000000 5>,
|
||||
< 633600000 5>,
|
||||
@@ -1007,7 +1015,7 @@
|
||||
qcom,cci-speedbin0-v0 =
|
||||
< 0 0>,
|
||||
< 134400000 2>,
|
||||
- < 300000000 4>,
|
||||
+ < 302400000 4>,
|
||||
< 384000000 6>,
|
||||
< 556800000 6>,
|
||||
< 600000000 8>,
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
||||
From b7e24657fb125b77bb5d9a39493040e1234c7c83 Mon Sep 17 00:00:00 2001
|
||||
From: flar2 <asegaert@gmail.com>
|
||||
Date: Mon, 21 Nov 2016 21:40:09 -0500
|
||||
Subject: [PATCH 3/3] msm8992: bump oc voltages
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992-regulator.dtsi | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
index 1ef9eb3..d2a875b 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992-regulator.dtsi
|
||||
@@ -673,11 +673,11 @@
|
||||
qcom,cpr-voltage-ceiling-override =
|
||||
<0xFFFFFFFF 0 800000 800000 900000 900000
|
||||
1000000 1000000 1115000 1115000
|
||||
- 1180000 1180000 1180000 1180000>;
|
||||
+ 1180000 1180000 1180000 1200000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 655000 700000 735000
|
||||
800000 835000 850000 875000
|
||||
- 950000 1000000 1000000 1000000>;
|
||||
+ 950000 1000000 1000000 1100000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0 0xffffffff 0 0 0 0 0>,
|
||||
<0 0xffffffff 1 0 0 0 0>,
|
||||
@@ -849,13 +849,13 @@
|
||||
900000 1000000 1000000 1000000
|
||||
1115000 1115000 1115000 1115000
|
||||
1115000 1115000 1180000 1180000
|
||||
- 1180000>;
|
||||
+ 1200000>;
|
||||
qcom,cpr-voltage-floor-override =
|
||||
<0xFFFFFFFF 0 640000 640000 665000 690000
|
||||
735000 745000 770000 785000
|
||||
850000 860000 880000 900000
|
||||
920000 935000 1000000 1000000
|
||||
- 1000000>;
|
||||
+ 1100000>;
|
||||
qcom,cpr-fuse-version-map =
|
||||
<0xffffffff 0xffffffff 0 4 4 4 4>,
|
||||
<0xffffffff 0xffffffff 1 4 4 4 4>,
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,42 +0,0 @@
|
||||
From f24f2dec25043cf7e6ef0f80a65dde45f2f131dd Mon Sep 17 00:00:00 2001
|
||||
From: franciscofranco <franciscofranco.1990@gmail.com>
|
||||
Date: Wed, 20 Jan 2016 01:45:39 +0000
|
||||
Subject: [PATCH] IKSWM-6057: dts: mmc: remove wakeup on idle flag
|
||||
|
||||
Remove the wakeup-on-idle flag can improve the mmc
|
||||
performance(verified with iozone). No current drain
|
||||
and other system performance impact.
|
||||
|
||||
Change-Id: Ia90cdfb66569b5ee3713d2c9785a2b7a9d24760e
|
||||
Signed-off-by: Lianwei Wang <a22439@motorola.com>
|
||||
Reviewed-on: http://gerrit.mot.com/785887
|
||||
SLTApproved: Slta Waiver <sltawvr@motorola.com>
|
||||
SME-Granted: SME Approvals Granted
|
||||
Tested-by: Jira Key <jirakey@motorola.com>
|
||||
Reviewed-by: Zhi-Ming Yuan <a14194@motorola.com>
|
||||
Submit-Approved: Jira Key <jirakey@motorola.com>
|
||||
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/qcom/msm8992.dtsi | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/qcom/msm8992.dtsi b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
index 5dedecb..dc70365 100644
|
||||
--- a/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
+++ b/arch/arm/boot/dts/qcom/msm8992.dtsi
|
||||
@@ -1706,7 +1706,6 @@
|
||||
qcom,cpu-dma-latency-us = <301 70>;
|
||||
qcom,cpu-affinity = "affine_cores";
|
||||
qcom,cpu-affinity-mask = <0x0f 0xf0>;
|
||||
- qcom,wakeup-on-idle;
|
||||
|
||||
qcom,msm-bus,name = "sdhc1";
|
||||
qcom,msm-bus,num-cases = <9>;
|
||||
@@ -1746,7 +1745,6 @@
|
||||
qcom,cpu-dma-latency-us = <301 70>;
|
||||
qcom,cpu-affinity = "affine_cores";
|
||||
qcom,cpu-affinity-mask = <0x0f 0xf0>;
|
||||
- qcom,wakeup-on-idle;
|
||||
|
||||
qcom,msm-bus,name = "sdhc2";
|
||||
qcom,msm-bus,num-cases = <8>;
|
@ -1,35 +0,0 @@
|
||||
From 87a5b2ff5c53d13f937bdcb20ab462e4aaa61e3b Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Fri, 18 Nov 2016 12:38:14 -0500
|
||||
Subject: [PATCH] Enable overclock by default
|
||||
|
||||
Change-Id: Idc640d7f58271892ae91678de847d9d1fcc4b281
|
||||
---
|
||||
drivers/cpufreq/qcom-cpufreq.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/cpufreq/qcom-cpufreq.c b/drivers/cpufreq/qcom-cpufreq.c
|
||||
index dd3a589..4cc8680 100644
|
||||
--- a/drivers/cpufreq/qcom-cpufreq.c
|
||||
+++ b/drivers/cpufreq/qcom-cpufreq.c
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
static DEFINE_MUTEX(l2bw_lock);
|
||||
|
||||
-static unsigned long arg_cpu_max_a53 = 1440000;
|
||||
+static unsigned long arg_cpu_max_a53 = 1632000;
|
||||
|
||||
static int __init cpufreq_read_cpu_max_a53(char *cpu_max_a53)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ static int __init cpufreq_read_cpu_max_a53(char *cpu_max_a53)
|
||||
}
|
||||
__setup("cpu_max_a53=", cpufreq_read_cpu_max_a53);
|
||||
|
||||
-static unsigned long arg_cpu_max_a57 = 1824000;
|
||||
+static unsigned long arg_cpu_max_a57 = 2016000;
|
||||
|
||||
static int __init cpufreq_read_cpu_max_a57(char *cpu_max_a57)
|
||||
{
|
||||
--
|
||||
2.9.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,709 +0,0 @@
|
||||
From 0b95ae785c6f1df0e7466a1922f5f3ff858897ae Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 17 Oct 2015 20:49:57 -0400
|
||||
Subject: [PATCH] Overclocked to 2.8Ghz, underclocked to 268Mhz
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/msm8974-v2.dtsi | 2 +-
|
||||
arch/arm/boot/dts/msm8974pro-pm8941.dtsi | 8 +-
|
||||
.../arm/boot/dts/msm8974pro-pma8084-regulator.dtsi | 16 +-
|
||||
arch/arm/boot/dts/msm8974pro.dtsi | 190 ++++++++++++++++++---
|
||||
4 files changed, 179 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/msm8974-v2.dtsi b/arch/arm/boot/dts/msm8974-v2.dtsi
|
||||
index dbb3bd6..40a730e 100644
|
||||
--- a/arch/arm/boot/dts/msm8974-v2.dtsi
|
||||
+++ b/arch/arm/boot/dts/msm8974-v2.dtsi
|
||||
@@ -123,7 +123,7 @@
|
||||
<1880000 2068000>,
|
||||
<3008000 3309000>,
|
||||
<3760000 4136000>,
|
||||
- <4468000 2457000>;
|
||||
+ <4468000 2457600>;
|
||||
qcom,dec-ocmem-ab-ib = <0 0>,
|
||||
<176000 519000>,
|
||||
<456000 519000>,
|
||||
diff --git a/arch/arm/boot/dts/msm8974pro-pm8941.dtsi b/arch/arm/boot/dts/msm8974pro-pm8941.dtsi
|
||||
index b502078..79729ea 100644
|
||||
--- a/arch/arm/boot/dts/msm8974pro-pm8941.dtsi
|
||||
+++ b/arch/arm/boot/dts/msm8974pro-pm8941.dtsi
|
||||
@@ -39,22 +39,22 @@
|
||||
};
|
||||
|
||||
&krait0_vreg {
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
};
|
||||
|
||||
&krait1_vreg {
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
};
|
||||
|
||||
&krait2_vreg {
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
};
|
||||
|
||||
&krait3_vreg {
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/boot/dts/msm8974pro-pma8084-regulator.dtsi b/arch/arm/boot/dts/msm8974pro-pma8084-regulator.dtsi
|
||||
index 433d466..428a520 100644
|
||||
--- a/arch/arm/boot/dts/msm8974pro-pma8084-regulator.dtsi
|
||||
+++ b/arch/arm/boot/dts/msm8974pro-pma8084-regulator.dtsi
|
||||
@@ -492,9 +492,9 @@
|
||||
<0xf908a800 0x1000>; /* APCS_ALIAS0_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
- qcom,retention-voltage = <675000>;
|
||||
+ qcom,retention-voltage = <600000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
qcom,ldo-threshold-voltage = <850000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
@@ -508,9 +508,9 @@
|
||||
<0xf909a800 0x1000>; /* APCS_ALIAS1_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
- qcom,retention-voltage = <675000>;
|
||||
+ qcom,retention-voltage = <600000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
qcom,ldo-threshold-voltage = <850000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
@@ -524,9 +524,9 @@
|
||||
<0xf90aa800 0x1000>; /* APCS_ALIAS2_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
- qcom,retention-voltage = <675000>;
|
||||
+ qcom,retention-voltage = <600000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
qcom,ldo-threshold-voltage = <850000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
@@ -540,9 +540,9 @@
|
||||
<0xf90ba800 0x1000>; /* APCS_ALIAS3_KPSS_MDD */
|
||||
reg-names = "acs", "mdd";
|
||||
regulator-min-microvolt = <500000>;
|
||||
- regulator-max-microvolt = <1120000>;
|
||||
+ regulator-max-microvolt = <1250000>;
|
||||
qcom,headroom-voltage = <150000>;
|
||||
- qcom,retention-voltage = <675000>;
|
||||
+ qcom,retention-voltage = <600000>;
|
||||
qcom,ldo-default-voltage = <750000>;
|
||||
qcom,ldo-threshold-voltage = <850000>;
|
||||
qcom,ldo-delta-voltage = <12500>;
|
||||
diff --git a/arch/arm/boot/dts/msm8974pro.dtsi b/arch/arm/boot/dts/msm8974pro.dtsi
|
||||
index e332793..8524180 100644
|
||||
--- a/arch/arm/boot/dts/msm8974pro.dtsi
|
||||
+++ b/arch/arm/boot/dts/msm8974pro.dtsi
|
||||
@@ -91,6 +91,7 @@
|
||||
qcom,clock-krait@f9016000 {
|
||||
qcom,speed1-pvs0-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 74 >,
|
||||
< 345600000 775000 85 >,
|
||||
< 422400000 775000 104 >,
|
||||
@@ -122,6 +123,7 @@
|
||||
|
||||
qcom,speed1-pvs1-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 74 >,
|
||||
< 345600000 775000 85 >,
|
||||
< 422400000 775000 104 >,
|
||||
@@ -153,6 +155,7 @@
|
||||
|
||||
qcom,speed1-pvs2-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 74 >,
|
||||
< 345600000 750000 85 >,
|
||||
< 422400000 750000 104 >,
|
||||
@@ -184,6 +187,7 @@
|
||||
|
||||
qcom,speed1-pvs3-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 74 >,
|
||||
< 345600000 750000 85 >,
|
||||
< 422400000 750000 104 >,
|
||||
@@ -215,6 +219,7 @@
|
||||
|
||||
qcom,speed1-pvs4-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 74 >,
|
||||
< 345600000 750000 85 >,
|
||||
< 422400000 750000 104 >,
|
||||
@@ -246,6 +251,7 @@
|
||||
|
||||
qcom,speed1-pvs5-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 720000 68 >,
|
||||
< 300000000 725000 74 >,
|
||||
< 345600000 725000 85 >,
|
||||
< 422400000 725000 104 >,
|
||||
@@ -277,6 +283,7 @@
|
||||
|
||||
qcom,speed1-pvs6-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 720000 68 >,
|
||||
< 300000000 725000 74 >,
|
||||
< 345600000 725000 85 >,
|
||||
< 422400000 725000 104 >,
|
||||
@@ -308,6 +315,7 @@
|
||||
|
||||
qcom,speed3-pvs0-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -338,10 +346,14 @@
|
||||
< 2265600000 1065000 700 >,
|
||||
< 2342400000 1080000 734 >,
|
||||
< 2419200000 1095000 769 >,
|
||||
- < 2457600000 1100000 785 >;
|
||||
+ < 2457600000 1100000 785 >,
|
||||
+ < 2572800000 1145000 827 >,
|
||||
+ < 2726400000 1205000 900 >,
|
||||
+ < 2880000000 1235000 937 >;
|
||||
|
||||
qcom,speed3-pvs1-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -372,10 +384,14 @@
|
||||
< 2265600000 1040000 700 >,
|
||||
< 2342400000 1055000 734 >,
|
||||
< 2419200000 1070000 769 >,
|
||||
- < 2457600000 1075000 785 >;
|
||||
+ < 2457600000 1075000 785 >,
|
||||
+ < 2572800000 1145000 827 >,
|
||||
+ < 2726400000 1205000 900 >,
|
||||
+ < 2880000000 1235000 937 >;
|
||||
|
||||
qcom,speed3-pvs2-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -406,10 +422,14 @@
|
||||
< 2265600000 1015000 700 >,
|
||||
< 2342400000 1030000 734 >,
|
||||
< 2419200000 1045000 769 >,
|
||||
- < 2457600000 1050000 785 >;
|
||||
+ < 2457600000 1050000 785 >,
|
||||
+ < 2572800000 1125000 827 >,
|
||||
+ < 2726400000 1195000 900 >,
|
||||
+ < 2880000000 1225000 937 >;
|
||||
|
||||
qcom,speed3-pvs3-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -440,10 +460,14 @@
|
||||
< 2265600000 990000 700 >,
|
||||
< 2342400000 1005000 734 >,
|
||||
< 2419200000 1020000 769 >,
|
||||
- < 2457600000 1025000 785 >;
|
||||
+ < 2457600000 1025000 785 >,
|
||||
+ < 2572800000 1115000 827 >,
|
||||
+ < 2726400000 1185000 900 >,
|
||||
+ < 2880000000 1215000 937 >;
|
||||
|
||||
qcom,speed3-pvs4-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -474,10 +498,14 @@
|
||||
< 2265600000 965000 700 >,
|
||||
< 2342400000 980000 734 >,
|
||||
< 2419200000 995000 769 >,
|
||||
- < 2457600000 1000000 785 >;
|
||||
+ < 2457600000 1000000 785 >,
|
||||
+ < 2572800000 1075000 827 >,
|
||||
+ < 2726400000 1175000 900 >,
|
||||
+ < 2880000000 1205000 937 >;
|
||||
|
||||
qcom,speed3-pvs5-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 750000 87 >,
|
||||
< 422400000 750000 106 >,
|
||||
@@ -508,10 +536,14 @@
|
||||
< 2265600000 940000 700 >,
|
||||
< 2342400000 955000 734 >,
|
||||
< 2419200000 970000 769 >,
|
||||
- < 2457600000 975000 785 >;
|
||||
+ < 2457600000 975000 785 >,
|
||||
+ < 2572800000 1025000 827 >,
|
||||
+ < 2726400000 1175000 900 >,
|
||||
+ < 2880000000 1195000 937 >;
|
||||
|
||||
qcom,speed3-pvs6-bin-v0 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 750000 87 >,
|
||||
< 422400000 750000 106 >,
|
||||
@@ -542,10 +574,14 @@
|
||||
< 2265600000 915000 700 >,
|
||||
< 2342400000 930000 734 >,
|
||||
< 2419200000 945000 769 >,
|
||||
- < 2457600000 950000 785 >;
|
||||
+ < 2457600000 950000 785 >,
|
||||
+ < 2572800000 1010000 827 >,
|
||||
+ < 2726400000 1155000 900 >,
|
||||
+ < 2880000000 1175000 937 >;
|
||||
|
||||
qcom,speed1-pvs0-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 810000 87 >,
|
||||
< 422400000 820000 108 >,
|
||||
@@ -577,6 +613,7 @@
|
||||
|
||||
qcom,speed1-pvs1-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 810000 108 >,
|
||||
@@ -608,6 +645,7 @@
|
||||
|
||||
qcom,speed1-pvs2-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 108 >,
|
||||
@@ -639,6 +677,7 @@
|
||||
|
||||
qcom,speed1-pvs3-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 108 >,
|
||||
@@ -670,6 +709,7 @@
|
||||
|
||||
qcom,speed1-pvs4-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 108 >,
|
||||
@@ -701,6 +741,7 @@
|
||||
|
||||
qcom,speed1-pvs5-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 108 >,
|
||||
@@ -732,6 +773,7 @@
|
||||
|
||||
qcom,speed1-pvs6-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -763,6 +805,7 @@
|
||||
|
||||
qcom,speed1-pvs7-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -794,6 +837,7 @@
|
||||
|
||||
qcom,speed1-pvs8-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -825,6 +869,7 @@
|
||||
|
||||
qcom,speed1-pvs9-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -856,6 +901,7 @@
|
||||
|
||||
qcom,speed1-pvs10-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -887,6 +933,7 @@
|
||||
|
||||
qcom,speed1-pvs11-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -918,6 +965,7 @@
|
||||
|
||||
qcom,speed1-pvs12-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -949,6 +997,7 @@
|
||||
|
||||
qcom,speed1-pvs13-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 108 >,
|
||||
@@ -980,6 +1029,7 @@
|
||||
|
||||
qcom,speed1-pvs14-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 750000 87 >,
|
||||
< 422400000 750000 108 >,
|
||||
@@ -1011,6 +1061,7 @@
|
||||
|
||||
qcom,speed1-pvs15-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 750000 87 >,
|
||||
< 422400000 750000 108 >,
|
||||
@@ -1042,6 +1093,7 @@
|
||||
|
||||
qcom,speed3-pvs0-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -1072,10 +1124,14 @@
|
||||
< 2265600000 1085000 716 >,
|
||||
< 2342400000 1100000 751 >,
|
||||
< 2419200000 1115000 786 >,
|
||||
- < 2457600000 1120000 802 >;
|
||||
+ < 2457600000 1120000 802 >,
|
||||
+ < 2572800000 1175000 827 >,
|
||||
+ < 2726400000 1225000 900 >,
|
||||
+ < 2880000000 1265000 937 >;
|
||||
|
||||
qcom,speed3-pvs1-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -1106,10 +1162,14 @@
|
||||
< 2265600000 1075000 716 >,
|
||||
< 2342400000 1090000 751 >,
|
||||
< 2419200000 1105000 786 >,
|
||||
- < 2457600000 1110000 802 >;
|
||||
+ < 2457600000 1110000 802 >,
|
||||
+ < 2572800000 1165000 827 >,
|
||||
+ < 2726400000 1215000 900 >,
|
||||
+ < 2880000000 1245000 937 >;
|
||||
|
||||
qcom,speed3-pvs2-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -1140,10 +1200,14 @@
|
||||
< 2265600000 1065000 716 >,
|
||||
< 2342400000 1080000 751 >,
|
||||
< 2419200000 1095000 786 >,
|
||||
- < 2457600000 1100000 802 >;
|
||||
+ < 2457600000 1100000 802 >,
|
||||
+ < 2572800000 1145000 827 >,
|
||||
+ < 2726400000 1185000 900 >,
|
||||
+ < 2880000000 1215000 937 >;
|
||||
|
||||
qcom,speed3-pvs3-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -1174,10 +1238,14 @@
|
||||
< 2265600000 1055000 716 >,
|
||||
< 2342400000 1070000 751 >,
|
||||
< 2419200000 1085000 786 >,
|
||||
- < 2457600000 1090000 802 >;
|
||||
+ < 2457600000 1090000 802 >,
|
||||
+ < 2572800000 1145000 827 >,
|
||||
+ < 2726400000 1175000 900 >,
|
||||
+ < 2880000000 1205000 937 >;
|
||||
|
||||
qcom,speed3-pvs4-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -1208,10 +1276,14 @@
|
||||
< 2265600000 1045000 716 >,
|
||||
< 2342400000 1060000 751 >,
|
||||
< 2419200000 1075000 786 >,
|
||||
- < 2457600000 1080000 802 >;
|
||||
+ < 2457600000 1080000 802 >,
|
||||
+ < 2572800000 1135000 827 >,
|
||||
+ < 2726400000 1165000 900 >,
|
||||
+ < 2880000000 1195000 937 >;
|
||||
|
||||
qcom,speed3-pvs5-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 795000 68 >,
|
||||
< 300000000 800000 76 >,
|
||||
< 345600000 800000 87 >,
|
||||
< 422400000 800000 106 >,
|
||||
@@ -1242,10 +1314,14 @@
|
||||
< 2265600000 1035000 716 >,
|
||||
< 2342400000 1050000 751 >,
|
||||
< 2419200000 1065000 786 >,
|
||||
- < 2457600000 1070000 802 >;
|
||||
+ < 2457600000 1070000 802 >,
|
||||
+ < 2572800000 1125000 827 >,
|
||||
+ < 2726400000 1155000 900 >,
|
||||
+ < 2880000000 1185000 937 >;
|
||||
|
||||
qcom,speed3-pvs6-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1276,10 +1352,14 @@
|
||||
< 2265600000 1025000 716 >,
|
||||
< 2342400000 1040000 751 >,
|
||||
< 2419200000 1055000 786 >,
|
||||
- < 2457600000 1060000 802 >;
|
||||
+ < 2457600000 1060000 802 >,
|
||||
+ < 2572800000 1115000 827 >,
|
||||
+ < 2726400000 1145000 900 >,
|
||||
+ < 2880000000 1175000 937 >;
|
||||
|
||||
qcom,speed3-pvs7-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1310,10 +1390,14 @@
|
||||
< 2265600000 1015000 716 >,
|
||||
< 2342400000 1030000 751 >,
|
||||
< 2419200000 1045000 786 >,
|
||||
- < 2457600000 1050000 802 >;
|
||||
+ < 2457600000 1050000 802 >,
|
||||
+ < 2572800000 1105000 827 >,
|
||||
+ < 2726400000 1135000 900 >,
|
||||
+ < 2880000000 1165000 937 >;
|
||||
|
||||
qcom,speed3-pvs8-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1344,10 +1428,14 @@
|
||||
< 2265600000 1005000 716 >,
|
||||
< 2342400000 1020000 751 >,
|
||||
< 2419200000 1035000 786 >,
|
||||
- < 2457600000 1040000 802 >;
|
||||
+ < 2457600000 1040000 802 >,
|
||||
+ < 2572800000 1095000 827 >,
|
||||
+ < 2726400000 1125000 900 >,
|
||||
+ < 2880000000 1155000 937 >;
|
||||
|
||||
qcom,speed3-pvs9-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1378,10 +1466,14 @@
|
||||
< 2265600000 995000 716 >,
|
||||
< 2342400000 1010000 751 >,
|
||||
< 2419200000 1025000 786 >,
|
||||
- < 2457600000 1030000 802 >;
|
||||
+ < 2457600000 1030000 802 >,
|
||||
+ < 2572800000 1085000 827 >,
|
||||
+ < 2726400000 1115000 900 >,
|
||||
+ < 2880000000 1145000 937 >;
|
||||
|
||||
qcom,speed3-pvs10-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1412,10 +1504,14 @@
|
||||
< 2265600000 985000 716 >,
|
||||
< 2342400000 1000000 751 >,
|
||||
< 2419200000 1015000 786 >,
|
||||
- < 2457600000 1020000 802 >;
|
||||
+ < 2457600000 1020000 802 >,
|
||||
+ < 2572800000 1075000 827 >,
|
||||
+ < 2726400000 1105000 900 >,
|
||||
+ < 2880000000 1135000 937 >;
|
||||
|
||||
qcom,speed3-pvs11-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1446,10 +1542,14 @@
|
||||
< 2265600000 975000 716 >,
|
||||
< 2342400000 990000 751 >,
|
||||
< 2419200000 1005000 786 >,
|
||||
- < 2457600000 1010000 802 >;
|
||||
+ < 2457600000 1010000 802 >,
|
||||
+ < 2572800000 1065000 827 >,
|
||||
+ < 2726400000 1095000 900 >,
|
||||
+ < 2880000000 1125000 937 >;
|
||||
|
||||
qcom,speed3-pvs12-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1480,10 +1580,14 @@
|
||||
< 2265600000 965000 716 >,
|
||||
< 2342400000 980000 751 >,
|
||||
< 2419200000 995000 786 >,
|
||||
- < 2457600000 1000000 802 >;
|
||||
+ < 2457600000 1000000 802 >,
|
||||
+ < 2572800000 1065000 827 >,
|
||||
+ < 2726400000 1085000 900 >,
|
||||
+ < 2880000000 1115000 937 >;
|
||||
|
||||
qcom,speed3-pvs13-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 770000 68 >,
|
||||
< 300000000 775000 76 >,
|
||||
< 345600000 775000 87 >,
|
||||
< 422400000 775000 106 >,
|
||||
@@ -1514,10 +1618,14 @@
|
||||
< 2265600000 955000 716 >,
|
||||
< 2342400000 970000 751 >,
|
||||
< 2419200000 985000 786 >,
|
||||
- < 2457600000 990000 802 >;
|
||||
+ < 2457600000 990000 802 >,
|
||||
+ < 2572800000 1045000 827 >,
|
||||
+ < 2726400000 1065000 900 >,
|
||||
+ < 2880000000 1095000 937 >;
|
||||
|
||||
qcom,speed3-pvs14-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 750000 87 >,
|
||||
< 422400000 750000 106 >,
|
||||
@@ -1548,10 +1656,14 @@
|
||||
< 2265600000 945000 716 >,
|
||||
< 2342400000 960000 751 >,
|
||||
< 2419200000 975000 786 >,
|
||||
- < 2457600000 980000 802 >;
|
||||
+ < 2457600000 980000 802 >,
|
||||
+ < 2572800000 1035000 827 >,
|
||||
+ < 2726400000 1055000 900 >,
|
||||
+ < 2880000000 1085000 937 >;
|
||||
|
||||
qcom,speed3-pvs15-bin-v1 =
|
||||
< 0 0 0 >,
|
||||
+ < 268800000 745000 68 >,
|
||||
< 300000000 750000 76 >,
|
||||
< 345600000 750000 87 >,
|
||||
< 422400000 750000 106 >,
|
||||
@@ -1582,9 +1694,39 @@
|
||||
< 2265600000 935000 716 >,
|
||||
< 2342400000 950000 751 >,
|
||||
< 2419200000 965000 786 >,
|
||||
- < 2457600000 970000 802 >;
|
||||
+ < 2457600000 970000 802 >,
|
||||
+ < 2572800000 1025000 827 >,
|
||||
+ < 2726400000 1045000 900 >,
|
||||
+ < 2880000000 1075000 937 >;
|
||||
};
|
||||
|
||||
+ qcom,msm-cpufreq@0 {
|
||||
+ reg = <0 4>;
|
||||
+ compatible = "qcom,msm-cpufreq";
|
||||
+ qcom,cpufreq-table =
|
||||
+ < 268800 /* 75 MHz */ >,
|
||||
+ < 300000 /* 75 MHz */ >,
|
||||
+ < 422400 /* 150 MHz */ >,
|
||||
+ < 652800 /* 200 MHz */ >,
|
||||
+ < 729600 /* 307 MHz */ >,
|
||||
+ < 883200 /* 307 MHz */ >,
|
||||
+ < 960000 /* 460 MHz */ >,
|
||||
+ < 1036800 /* 460 MHz */ >,
|
||||
+ < 1190400 /* 460 MHz */ >,
|
||||
+ < 1267200 /* 614 MHz */ >,
|
||||
+ < 1497600 /* 614 MHz */ >,
|
||||
+ < 1574400 /* 800 MHz */ >,
|
||||
+ < 1728000 /* 800 MHz */ >,
|
||||
+ < 1958400 /* 931 MHz */ >,
|
||||
+ < 2265600 /* 931 MHz */ >,
|
||||
+ < 2342400 /* 931 MHz */ >,
|
||||
+ < 2419200 /* 931 MHz */ >,
|
||||
+ < 2457600 /* 931 MHz */ >,
|
||||
+ < 2572800 /* 931 MHz */ >,
|
||||
+ < 2726400 /* 931 MHz */ >,
|
||||
+ < 2880000 /* 931 MHz */ >;
|
||||
+ };
|
||||
+
|
||||
i2c@f9928000 { /* BLSP-1 QUP-6 */
|
||||
cell-index = <3>;
|
||||
compatible = "qcom,i2c-qup";
|
||||
@@ -1745,7 +1887,7 @@
|
||||
<1880000 2068000>,
|
||||
<3008000 3309000>,
|
||||
<3760000 4136000>,
|
||||
- <4468000 2457000>;
|
||||
+ <4468000 2457600>;
|
||||
qcom,dec-ocmem-ab-ib = <0 0>,
|
||||
<176000 519000>,
|
||||
<456000 519000>,
|
||||
--
|
||||
2.10.2
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 94d13624a7710818698d5787a7bcd7f8a272762b Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Sat, 17 Oct 2015 20:50:31 -0400
|
||||
Subject: [PATCH] Update defconfig
|
||||
|
||||
---
|
||||
arch/arm/configs/cyanogenmod_bacon_defconfig | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/configs/cyanogenmod_bacon_defconfig b/arch/arm/configs/cyanogenmod_bacon_defconfig
|
||||
index 33ceebd..8cb1936 100644
|
||||
--- a/arch/arm/configs/cyanogenmod_bacon_defconfig
|
||||
+++ b/arch/arm/configs/cyanogenmod_bacon_defconfig
|
||||
@@ -591,3 +591,6 @@ CONFIG_CRYPTO_TWOFISH=y
|
||||
CONFIG_CRYPTO_DEV_QCRYPTO=y
|
||||
CONFIG_CRYPTO_DEV_QCE=y
|
||||
CONFIG_CRYPTO_DEV_QCEDEV=y
|
||||
+
|
||||
+CONFIG_DIAG_CHAR=y
|
||||
+CONFIG_DIAG_OVER_USB=y
|
||||
--
|
||||
2.10.2
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user