Commit graph

267 commits

Author SHA1 Message Date
LuK1337
85df0ebcb0 msm8226-common: Import sensors MultiHAL
Change-Id: I8dbe13560d74f88109b7265d1c511ad3beab731e
2019-08-17 10:49:17 +02:00
PythonLimited
eaaeb567ac msm8226-common: update seccomp policy
* fix audio issues
2019-08-17 10:49:17 +02:00
Ethan Chen
ba208be44d msm8226-common: Add seccomp policy
Change-Id: I1d5017228a4a9318f8a77ef4036532d64718ecbb
2019-08-17 10:49:17 +02:00
PythonLimited
e86f1d480c WIP: msm8226-common: rootdir: update for O
* general cleanup
    * add init.ril.sh
    * enable adaptive LMK
    * update charger context
    * configure the CPU when boot is completed
2019-08-17 10:48:35 +02:00
D. Andrei Măceș
7b991f7569 libril: Protect against NULL unsolicited response function
Upstream change I732234a22328a1bfcb603bb020547f543b6fd766 makes
RIL_UNSOL_DC_RT_INFO_CHANGED's responseFunction() NULL, without
protecting against it in RIL_onUnsolicitedResponse(), thus crash-
ing at least hammerhead's RIL stack upon mobile data connection.

https://android-review.googlesource.com/#/c/platform/hardware/ril/+/345950/

Change-Id: I6567019cb6daf6492a29e04cc9872e69b2ba456d
Signed-off-by: D. Andrei Măceș <Andrei.Maces@alumni.nd.edu>
(cherry picked from commit e73eafff8695ab28201acbc03a362d5b177047aa)
2019-08-16 10:18:55 +02:00
Paul Keith
dacd5f2865 msm8974-common: libril: Use libril way of freeing strings for nitz hack
Change-Id: I7addc27abb3730873799518ea2ac6ec51a280bd9
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
a156f226d1 msm8974-common: libril: Build non-inlined android_atomic methods
* All of the libsec-ril*.so libraries reference these symbols, but
  Google finally dropped the non-inlined versions from libcutils with
  Android 8.0. This could be handled with shims in numerous device
  trees, but shim semantics and implementation aren't exactly stable
  and we can handle it more cleanly here in one place.
* See LineageOS/android_system_core@103e8f560

Change-Id: I787372b739f3ace0d9cbbc33e4bffafa6876665e
2019-08-16 10:18:55 +02:00
Paul Keith
72a873bbd4 msm8974-common: libril: Fix RIL_Call struct for 64-bit platforms
* While msm8974 is not 64 bit, certain users of this libril will be
* A previous revision of this libril had 16 bytes of padding in this
  struct for 64-bit platforms (due to word size and struct alignment),
  but a change by me to use a long instead of a pointer and an int
  broke this padding for 64-bit platforms because a long is still
  just 8 bytes on 64-bit platforms, where 16 bytes is necessary
* Use two pointers as padding instead to make 64-bit great again

Change-Id: If599bdb625f7a45e083f5b30df512d12810be79b
2019-08-16 10:18:55 +02:00
Paul Keith
b868ef1e4e msm8974-common: libril: Add hacks for spliting of index
* This is based on how it was done in cm-14.1, but redone
  because the old code completely ignored signedness
* Samsung, in their stock RIL.java, reads index as an int,
  sets the first 8 bits to index, the next 8 bits to call_id,
  and ignores the upper 16 bytes of the int parcelled up
* This emulates that behavior here, except it only sends the
  first 8 bits so that AOSP's RIL.java doesn't get confused

Change-Id: I5c78447fdef7d5fd7fc39addb970300ee1188cd1
2019-08-16 10:18:55 +02:00
Paul Keith
097a9a38fe msm8974-common: libril: Fix RIL_UNSOL_NITZ_TIME_RECEIVED Parcel
* Sometimes, the modem is sending 1-2 extra fields with
  the country mcc, which confuses ServiceStateTracker
* Drop the extra data here, instead of in our RIL class

[haggertk]: Forward port to ril-caf on lineage-15.

Change-Id: Ifbec67bb0dac271226bd8b5471deaf6a2ef33f2b
2019-08-16 10:18:55 +02:00
Paul Keith
c9b78b3d92 msm8974-common: libril: Get off my back
* Checking numInts and numStrings for strict equality when
  we're not looping is dumb, because Samsung is notorious
  for sending extra information in their RIL
* Check if there's *enough* data rather than the *exact amount*
  to fix a bunch of invalid response errors

Change-Id: I14bc37240e5760b4629fcb74b64f25ad95d4fdfc
2019-08-16 10:18:55 +02:00
Paul Keith
73d7a547be msm8974-common: libril: Add workaround for "ring of death" bug
[javelinanddart]: Forward port to ril-caf on lineage-15.1

Change-Id: Ifeeee11ee83deddb8eff565847641c45a105378f
2019-08-16 10:18:55 +02:00
Martin Bouchet
98efc5c486 msm8974-common: libril: Fix network operator search
* For search, the number of strings returned for
  RIL_REQUEST_QUERY_AVAILABLE_NETWORKS should be defined in the system
  prop ro.ril.telephony.qan_resp_strings

Change-Id: Ie5bb8ba80c5ac93b7502da3b1bb3d2b4404ecd5e
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
7b8fef8d76 msm8974-common: libril: Fix SMS on certain variants
* Samsung added an int to the end of the RIL_SMS_Response
  struct in some of the variants (like vzw) but not all
* The presence of this field was discovered by examining
  the stock RIL.java, which conditionally read an extra
  int from the parcel, based on the device specific
  CscFeature_RIL_SmsErrorClassRetry feature
* This causes SMS messages to show as "failed to send"
  in the app, when they actually suceeded in sending
* Allow Samsung's custom struct and AOSP's to fix it

* Forward port to ril-caf on lineage-15.1

Change-Id: I6b3e545c2c42ab2de2ac11e93dfdf9546248080a
2019-08-16 10:18:55 +02:00
Paul Keith
7dc3a73fca msm8974-common: libril: Add Samsung changes
***** SIGNAL STRENGTH HACKS NOT PORTED YET *****

[javelinanddart]: Redo this code from 14.1 to include
  the proper RIL_Call fixes, no Samsung unsol/request
  handling as it was unnecessary, and a extensible way
  to remap RIL unsols if necessary for the device

Change-Id: I59bad9925d141e6cefbc24d4eefdc0c79017852a
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
4f78ec0c07 msm8974-common: ril: Makefile maintenance
* Add top-level Android.mk
* Invert libril/Android.mk build guard (build if BOARD_PROVIDES_LIBRIL
  is true)

Change-Id: I4eb6c2316d268c2f8045dbb909322b731df47d8c
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
cabcead070 msm8974-common: ril: Import libril from hardware/ril-caf
* LineageOS/android_hardware_ril@1375242 (staging/lineage-15.1-caf)

Change-Id: Id1b4abe64f6b8f65cc88555ff4799f71f3264f6b
2019-08-16 10:18:55 +02:00
Francescodario Cuzzocrea
6e7140d9ee msm8226-common: remove custom power hal implementation 2019-08-16 10:18:55 +02:00
Francescodario Cuzzocrea
f34a734c58 msm8226-common: overlay: also pin the camera application 2019-08-16 10:18:55 +02:00
Francescodario Cuzzocrea
6139a15184 msm8226-common: overlay: add operating voltage for bluetooth controller 2019-08-16 10:18:55 +02:00
Francescodario Cuzzocrea
0b2abd06a6 msm8226-common: drop config_viewConfigurationTouchSlop 2019-08-16 10:18:55 +02:00
Jorim Jaggi
1f15763182 msm8226-common: PIN critical apps and system services that get swapped
Pin critical system apps that always need to be responsive, no
mattter what:
- SystemUI for expanding the notification shade/navigation bar
- SF: Doesn't need introduction, but still gets zram'ed in certain
cases:

Total memory impact: About 5-6 MB (since regularly not all code is
loaded)
Test: Flash device with CL and make sure actions like expanding
notification shade isn't as janky under memory pressure anymore
Bug: 111132016

[aviraxp]: Original code pins the pre-odexed file of SytemUI, but we
           do not dexpreopt priv-apps. So pin the SystemUI apk as well
           just as what it is for camera pinning.

Change-Id: I3bc93204147502bec2e983f7ee37555294db308c
2019-08-16 10:18:55 +02:00
Elektroschmock
28d022c6b5 msm8226-common: Pin surfaceflinger into RAM
Prevents it getting swapped to ZRAM

Change-Id: Ie3dab04351967cc422c9b5bea316d7e062d9a1a3
Signed-off-by: Felipe Leon <fglfgl27@gmail.com>
2019-08-16 10:18:55 +02:00
Jorim Jaggi
e8586abfac msm8226-common: Pin HOME application
Test: adb shell dumpsys pinner after boot
Bug: 111132016
Bug: 78585335
Change-Id: I4ed0587ae5348bbe03ad9ac5f1c5b1726dbb8246
2019-08-16 10:18:55 +02:00
Bruno Martins
c00b62c5c6 msm8226-common: Allow media UID process to access CameraServiceProxy
* This fixes the following error on camera-in-mediaserver devices:

   E CameraService_proxy: Calling UID: 1013 doesn't match expected  camera service UID!

Change-Id: I185e34e8983b286436bfc0fe36cfdf260ef78170
2019-08-16 10:18:55 +02:00
Adithya R
afa5c36c89 msm8226-common: overlay: Extend wifi scanning interval to 40s
* Default is 15s, extend it to 40 seconds to save some juice
2019-08-16 10:18:55 +02:00
Mathieu Chartier
298bcc63ff msm8226-common: overlay: Fix shared vdex name
The files in arm/arm64 are symlinks and pinning symlinks is not
supported. Pin the target vdex file intead.

Bug: 73990433
Test: manual
Change-Id: I313e1f53487c0a21b615f65dc64c21a1ecb4b7d5
2019-08-16 10:18:55 +02:00
Philip Cuadra
20c903cd32 msm8226-common: overlay: Pin .vdex files as well
.vdex files have been added to allow pre-verified dex.  The pinner
service needs to take this in account when pinning.  Add pinning of
appropriate system .vdex files on 8996 targets.

Bug 33168521
Test:  Tested manually by confirming pinning is successful

Change-Id: Ice2c3f0ec0b314963fb136793d9fa36ecba58490
2019-08-16 10:18:55 +02:00
Adam Farden
115e4caec7 msm8226-common: overlay: Enable the Pinner Service for pinning files into memory
* Pin key files into memory to prevent having to fetch from flash
  after boot. Improves system performance by preventing page cache
  thrash. Retrieves files from a device-specific overlay to allow
  specialization.

Change-Id: I53f8227c66c44d3955422b41d623e450ec2be421
2019-08-16 10:18:55 +02:00
maxwen
dc40b4d236 msm8226-common: Update overlay to hide sRGB toggle
* Now expected as an array in Settings package

Change-Id: I92a56abb0fc1379e4482d1889d04d8db6a14ea2b
2019-08-16 10:18:55 +02:00
dianlujitao
cdcf4f4d6d msm8226-common: Hide sRGB toggle in developer options
* This is only available on Nexus/Pixel devices and we don't even
   support such color space.

Change-Id: I8343e4986d7dd8413bd8d36dfad0309a4c08026e
2019-08-16 10:18:55 +02:00
Wayne Lin
57e9e293db Changing SUPL_ES=1 for SUPL end point control
SUPL_ES=1 ensures the GnssLocationProvider and related framework code
accepts incoming SMS SUPL_INIT messages with ES-bit=1
(which allow redirection of the ESLP
end-point e.g. to the current local emergency services provider when
you are travelling) only during an emergency call

Bug: 115331218
Bug: 112159033
Test: Build pass
Change-Id: I5075f7887a184ce18bb1815b35a2ce7acd8bca10
2019-08-16 10:18:55 +02:00
Gareth Kitchen
a7b9a54d05 Localise NTP to improve GPS TTFF
Testing response times to time.android.com from around the globe reveals
in ms:-

Europe			 <30
Middle East		 <68
North America		<150
Johannesburg		 183
Buenos Aires		 220
Tokyo			 226
Sydney			 276
Hong Kong		 285
Brisbane		 295
Mumbai			 349
Beijing			4691
Shanghai		4906
Russia			 n/a

Whilst time.android.com is NOT used for GPS NTP, North American time servers
are, by specifying north-america.pool.ntp.org as default in the framework,
to align with pixel devices.  I am assuming similar response times to these
servers from around the world.

Great for North America and it appears Europe but it does not address the
global issue. Also, the pool.ntp.org project forbids both hardware and
software vendors from using these default zone names.
http://www.pool.ntp.org/en/vendors.html

It makes sense, therefore, to leverage the ntp.org's existing 'android' vendor
name to make the default ntp server for GPS purposes:
1.android.pool.ntp.org this will return a random but accurate NTP server in
close geopraphic proximity to the device.

Testing on my own build in the UK seems to improve hot and cold TTFF
considerably.

Change-Id: I144af45757efa35b32daf034eece6e046d2bde79
2019-08-16 10:18:55 +02:00
Paul Keith
625ba1b9b2 msm8974-common: Correct MCC code for Verizon CarrierConfig
* Verizon's operator numeric is 311480 not 310480

Change-Id: I0732fc277f412c151a235a4abdc27011d7ba10c7
2019-08-16 10:18:55 +02:00
Paul Keith
526700513d msm8974-common: Add comments to explain carrier hackery
Change-Id: Id414b2daa08186f2f426f450391a8d2c0b695397
2019-08-16 10:18:55 +02:00
Paul Keith
37fe55dbcf msm8974-common: Don't mess with APN or CDMA CarrierConfig options
* These should be set appropriately by carrier, and should already be
  at the correct values by default in packages/apps/CarrierConfig

Change-Id: I433b110570c2b79b15076dadf58777e0289e347a
2019-08-16 10:18:55 +02:00
Paul Keith
73d078ef4d msm8974-common: Move sprint_mwi_quirk overlay to CarrerConfig
[javelinanddart]: msm8974-common never had sprint_mwi_quirk

Change-Id: I65cbdb8cb0305f41735ddcafe275250c678dda55
2019-08-16 10:18:55 +02:00
Paul Keith
2545f9ac4c msm8974-common: Import CarrierConfig overlay
* From LineageOS/android_device_samsung_klte@3ea5d5050b

Change-Id: Ifcb775aa6a1893dd3e2ad93c81b338493cd9337a
2019-08-16 10:18:55 +02:00
Bruno Martins
fe2a12f801 msm8226-common: Inform Trust about legacy encryption support
* Encryption causes noticeable performances loss, because HW crypto
   is not suported.

Change-Id: I4336c0cd050584020780d8ff97f454e40c7e6125
2019-08-16 10:18:55 +02:00
Zhao Wei Liew
eadb8f8f64 msm8226-common: Enable HBM for outdoor mode
Add a device-specific SunlightEnhancement CMHW class.

In addition to enabling outdoor mode, crank the display brightness
up, allowing for much better visibility in bright sunlight.

Change-Id: I6a87d438a0aecd9e068de932d4133e69e0563cf8
2019-08-16 10:18:55 +02:00
Ziyan
b801b0667c msm8974-common: ril: add squash of OSS libsecnativefeature
msm8974-common: ril: add open-sourced libsecnativefeature, used by libsec-ril

 Change-Id: I2f487db23b31c63ba919863f393ca37cc9a81191

 libsecnativefeature: fix build with clang

 Change-Id: Ibda3234af2b1184e094913e35cb919a75f972c87

 msm8974-common: ril: Move device dependent modules to /vendor

 Change-Id: Ia2f4835e3325f3d8d53db26fb632b3b9eedcc382

Change-Id: Iaaa06fa527cedce6609a95b21d787c13dda6a30a
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
bc1c24125f msm8226-common: Build the GPS HAL and copy config files
Change-Id: I86fb9fff481b7bcf926b1ddce4f79fe0d87325a6
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
757b1241e0 msm8226-common: Move XTRA_SERVER entries to overlays
* XTRA_SERVERs are important, right? Like to get the almanac data
  necessary for aGPS. Without the XTRA download, the chip needs to
  collect sufficient navigation messages from the birds to compute
  where they are in order to make sense of the ranging signals.
* Well, it seems that O doesn't like reading these entries from the
  gps.conf file.

  When in gps.conf:
  GpsXtraDownloader: No XTRA servers were specified in the GPS configuration

  When in overlay:
  <that noise doesn't exist>

* This seems to, finally, return GPS fix performance to what we had
  in N.

Change-Id: I70679835ec5dea053c5aa3750acee628906d6390
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
6a9beb962e msm8226-common: Import GPS overlays
* Squash of:
  klte-common: Move to commonized, overlay-based GPS config
  Change-Id: I9a66eb156df69340d35c139d20f835fa8693a716

  klte-common: fw/b overlay: Change GPS capabilities bitmask
  Change-Id: I2b060a11795a97889e96b3d7de26b0ed28392841

  klte-common: Use https for XTRA download
  Change-Id: Ie16206b51e3eef729851fd5c8e3defd768581771

  klte-common: Refactor common gps configurations into gps.conf
  Change-Id: I888ef88c249cb09404336e7273088eeea4fc7d3d

  klte-common: Add GPS configuration for China
  Change-Id: I781a251bb20885c1a9e545b6678018b64ddce760

Change-Id: I2eabf59aaafec19ba5a03a7337dd5c76a7a5a031
2019-08-16 10:18:55 +02:00
Kevin F. Haggerty
06d7b10cd6 msm8226-common: gps: Import configs from G800HXXU1CRJ1
Change-Id: I92fbf38ecac658fa69191b89890b79e82e05acec
2019-08-16 10:18:55 +02:00
Christopher R. Palmer
139a0b73af msm8226-common: gps: Unlock the GPS
[haggertk]:
 * During bring-up of O, GPS was exhibiting different behavior from
   N -- an appropriate number of satellites would immediately lock,
   but a fix would not resolve for 30-90 seconds. Digging up this
   change from the L-era allows GPS to resolve a fix in a nominal
   amount of time.

Change-Id: If9fd67483fedee915d46f7b9d2a7e0851400de3c
2019-08-16 10:18:55 +02:00
Diego Wilson
4baa0e946f msm8226-common: gps: Move device dependent modules to /vendor
Change-Id: I8229a6e4a9512a03cbc6c9522bb1dc0ce988d1c9
2019-08-16 10:18:55 +02:00
Kevin Tang
d567cb031b msm8226-common: gps: LOC logging macro changes
The current logging macro always uses LOGE, which is
confusing to external developer looking at our logs.
Also changed LOC_LOGx definition to follow the same
syntax as that of LOC_LOGX.

Bug: 29499503

Change-Id: I803233a9d0b241bf9aeb2ee0d4bd2e7cc52ed75b
CRs-Fixed: 1113702
2019-08-16 10:18:55 +02:00
David Ng
2ab0808104 msm8226-common: gps: Add explicit liblog dependency
Explicitly add liblog as dependency for modules that use Android
logging.  Also remove obsolete build flag.

Change-Id: I91a458b44ff34c91a8f6875f5c3e931f620c613a
2019-08-16 10:18:54 +02:00
Saurabh Srivastava
5898541b1c msm8226-common: gps: Enabling CLANG compilation and fixing all resulting errors
Removing statement to set LOCAL_CLANG flag explicity to
true. It will be true by default.

Change-Id: I2eaba5a89e64088e3383b962dceaaa7e975e997a
CRs-Fixed: 989476
2019-08-16 10:18:54 +02:00