Commit Graph

449 Commits

Author SHA1 Message Date
Kevin F. Haggerty
399e9af90a msm8974-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
2018-03-07 06:44:43 -07:00
Paul Keith
306c353400 msm8974-common: Allow overriding full dex preopt
* This is wonderful for users, but I want to override this

Change-Id: I12b0cd7620b4615f8f3ba945fbae8a332d4ea203
2018-03-03 05:39:35 +01:00
Paul Keith
da14a8d88a 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
2018-03-01 19:48:48 +00:00
Kevin F. Haggerty
778c310204 msm8974-common: sepolicy: Add policy statements for power HAL
Change-Id: I5fbf737a2dddf4e70a1a51e23b2e06a153a6f769
2018-02-28 07:17:50 -07:00
Kevin F. Haggerty
993b723e0b Revert "Revert "msm8974-common: Use QTI HIDL power HAL""
This reverts commit 24d70a1aec.

* The new HIDL power HAL seems to be appropriately riced^Wfixed for
  8974 now.

Change-Id: I629ab2314dec4698a0d4d45d77cdc48bf92a4d74
2018-02-27 20:37:50 -07:00
Paul Keith
f159447f74 msm8974-common: Remove exfat and ntfs sepolicies
* They are labelled as vfat now

Change-Id: I1f1df3b7c1c294b2efb5ce9417838b9932eb08f1
2018-02-22 23:27:10 +01:00
Paul Keith
a6a77f987c msm8974-common: Wire up mDNIe features
Change-Id: Ib5d2825bb50c90b6743157bd624e7156c6d5ad01
2018-02-22 23:27:10 +01:00
Zhao Wei Liew
e05835ea4d msm8974-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
2018-02-22 23:25:57 +01:00
razorloves
6279ca895c msm8974-common: update dexpreopt option
The recent change we made in the build repo makes all
builds dexpreopt only boot img and system server.
This changes angler builds back to full dexpreopt.

Change-Id: I0cf03634ee7bbc93b18b49d3f1efe82a6302b447
2018-02-17 22:54:08 +00:00
Paul Keith
d5d83cb89e msm8974-common: Remove noatsecure
* Shims have been moved to a board flag, so we no longer need
  noatsecure to make LD_SHIM_LIBS persist through services

Change-Id: I94b8c30e28e6dd297e0020ddfb46b2af21068721
2018-02-17 13:20:49 +00:00
Kevin F. Haggerty
4bb6449aad msm8974-common: sepolicy: Allow hostapd to read wifi rfkill dev
avc: denied { read } for name="rfkill" dev="tmpfs" ino=8177
  scontext=u:r:hostapd:s0 tcontext=u:object_r:wlan_device:s0
  tclass=chr_file permissive=0

Change-Id: Iea5deec2736f0eac50aa30858889d51b86e58788
2018-02-16 17:15:39 -07:00
Kevin F. Haggerty
6e24e03dd3 msm8974-common: Set TARGET_BOOTANIMATION_HALF_RES to true
* No apparent resolution difference
* Much smoother animation
* Much faster boot
* What's not to like?

Change-Id: I2119fe826146a3103da50b4862ad88f5950a97ec
2018-02-10 17:38:46 +00:00
Paul Keith
71900d444e 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
2018-02-08 03:48:38 +01:00
Paul Keith
dc5d57cf0a 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
2018-02-06 04:29:30 +00:00
Paul Keith
6f2f2902ee 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
2018-02-06 04:26:37 +00:00
Paul Keith
2d9467684d msm8974-common: libril: Add workaround for "ring of death" bug
[javelinanddart]: Forward port to ril-caf on lineage-15.1

Change-Id: Ifeeee11ee83deddb8eff565847641c45a105378f
2018-02-06 04:25:39 +00:00
Martin Bouchet
e384dfb0f8 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
2018-02-06 04:25:17 +00:00
Kevin F. Haggerty
8c30fb5d12 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
2018-02-06 04:24:32 +00:00
Paul Keith
9a9121b070 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
2018-02-06 04:24:06 +00:00
Kevin F. Haggerty
47a0f43fd5 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
2018-02-06 04:22:25 +00:00
Kevin F. Haggerty
54fdadc48b msm8974-common: ril: Import libril from hardware/ril-caf
* LineageOS/android_hardware_ril@1375242 (staging/lineage-15.1-caf)

Change-Id: Id1b4abe64f6b8f65cc88555ff4799f71f3264f6b
2018-02-06 04:22:04 +00:00
Kevin F. Haggerty
24d70a1aec Revert "msm8974-common: Use QTI HIDL power HAL"
This reverts commit e955914336.

* As it turns out, the brand new HIDL power HAL isn't ready, at
  least not for legacy devices like msm8974. Symptoms were that
  after waking from sleep, cores 1-3 are not brought back online
  consistently.
* Let's go back to the old thing, at least for now.

Change-Id: Ica2ddbeb42635662167efe0b48f0fe4051591b26
2018-02-06 00:32:32 +00:00
Kevin F. Haggerty
68b75f9105 msm8974-common: sepolicy: Import common sepolicy from klte-common
* The bulk of the device family policy was common and applicable
  to all Samsung msm8974-devices. Move that common stuff here to
  ease maintenance.

Change-Id: I86516adfb1b9c55a6959a7faf4ee424a4b3385c8
2018-02-03 15:07:03 -07:00
Michael Bestas
635b864067 msm8974-common: Move permissions to vendor
Change-Id: Idf4022e03ba376f7971d02be973444e70dbc4521
2018-02-03 15:07:03 -07:00
Paul Keith
f0aad1c584 msm8974: Enable full dex preopt
* So, uh, it turns out we need to disable booting with all
  but 1 CPU core to fix CDMA RIL on klte (and hlte?), so
  let's enable full dex preopt so that we don't need to
  dex opt after system updates

Change-Id: I6fe57f9dcd1da8245eebd51d61055d6de7ffe6cd
2018-01-26 07:55:57 -07:00
Ritesh Harjani
7184df9837 msm8974-common: Add AID_QCOM_DIAG, AID_RFS, and AID_RFS_SHARED to config.fs
Change-Id: I9da576900ed29a2633bb997dbbea4565b489a418
2018-01-26 06:32:36 -07:00
Ziyan
79060a6bb2 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
2018-01-23 06:42:56 -07:00
Artem Borisov
9cec898d4d msm8974-common: Use 64-bit binder API
AOSP and mainline are going towards removing old 32-bit binder API support.
64-bit binder is 100% compatible with 32-bit kernel and userspace,
so there is no reason for us to keep using the old solution anymore.
We've switched to new API in our kernel, same thing should be applied to our userspace.

Change-Id: I3c95bd7fbd023c5cb08e856b3a3889c03228e843
2018-01-20 06:47:06 +00:00
Paul Keith
e955914336 msm8974-common: Use QTI HIDL power HAL
* Let's use the new shiny binderized HAL in hardware/qcom/power

Change-Id: I2abf4ca9b0b5a0cb031f12c400a1159962f5e94c
2018-01-19 20:08:00 +00:00
Kevin F. Haggerty
04e9f0c1e4 msm8974-common: Build the GPS HAL and copy config files
Change-Id: I86fb9fff481b7bcf926b1ddce4f79fe0d87325a6
2018-01-18 04:37:27 -07:00
Kevin F. Haggerty
6912a15c55 msm8974-common: proprietary-files: Add GPS blobs
* OnePlus bacon - lineage-14.1-20170807-nightly-bacon-signed.zip

Change-Id: I880fb6f05310ac0d65489819148749f5479c6ceb
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
10320f7968 msm8974-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
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
772578a15a msm8974-common: gps: Import configs from klte-common
Change-Id: I92fbf38ecac658fa69191b89890b79e82e05acec
2018-01-18 04:37:20 -07:00
Christopher R. Palmer
c911560316 msm8974-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
2018-01-18 04:37:20 -07:00
Diego Wilson
f5411b66d1 msm8974-common: gps: Move device dependent modules to /vendor
Change-Id: I8229a6e4a9512a03cbc6c9522bb1dc0ce988d1c9
2018-01-18 04:37:20 -07:00
Kevin Tang
581ea51a62 msm8974-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
2018-01-18 04:37:20 -07:00
David Ng
b4741134f2 msm8974-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
2018-01-18 04:37:20 -07:00
Saurabh Srivastava
08edaade5f msm8974-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
2018-01-18 04:37:20 -07:00
Michael Bestas
0551f61a2a msm8974-common: gps: Hack HAL for N
* Replace GnssSvStatus with HaxxSvStatus

Change-Id: Ib96e5caff7db7cf2a7bd1cd5d9ef147c9c4b70d7
2018-01-18 04:37:20 -07:00
Scott Mertz
f066fa2e3a msm8974-common: gps: Fix build for OSS builds
gps: Correct forward declaration in proprietary definitions

Fix gps runtime error

The qcom prebuilt binary relies on FlpExtLocation_s,
so we cannot change it to FlpExtLocation.
This patch fixes it.

gps: fix remove trailing space

In setXtraUserAgent,
size_t is unsigned and never being negative.
Will cause segmentation fault, if string is all space.

Change-Id: I1cf1f956943b0739640afe909954ade6921e28a1
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
4dd7fbc1e4 msm8974-common: gps: Remove etc/Android.mk
* We don't need the target, we'll PRODUCT_COPY_FILES like sane people

Change-Id: I7f4a79d95791d974cb4b6642ef3ba76fa93a5172
2018-01-18 04:37:20 -07:00
Michael Bestas
1a49af68a6 msm8974-common: gps: Cleanup makefiles and remove useless files
Change-Id: I66848d2e220817ae61642d7211f7eabf5e4efcea
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
9cf367bddf msm8974-common: gps: Delete libloc_api-rpc
* This isn't needed

Change-Id: I7b4b33256fac5ae71b2e556ed04f0069d1aa9f39
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
29b6ae6ad8 msm8974-common: gps: Add top-level Android.mk
Change-Id: I04b2ab8c5f348dcfce23cb49b0dfeb1d3e335641
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
9433f7ab16 msm8974-common: gps: Import CAF HAL
* https://source.codeaurora.org/quic/la/platform/hardware/qcom/gps
* Tag: LA.BF.1.1.3_rb1.13

Change-Id: Ied5197b459ccc51c8b7c8288a8b1d4a6839685e4
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
472c04c4d1 msm8974-common: manifest: Correct wifi HAL version
* 1.1 accidentally slipped in here while commonizing

Change-Id: Iea601c80a8411f7e57aecf000180a24632430f2e
2018-01-18 04:37:04 -07:00
Kevin F. Haggerty
904d0acb37 msm8974-common: Use AOSP charger
* Lineage charger is horrible brokenness

Change-Id: I91f781d566db5e894ea3c39598fbdac72e778309
2018-01-14 15:13:09 -07:00
Ethan Chen
84b97c9d61 msm8974-common: Add seccomp policy
Change-Id: I1d5017228a4a9318f8a77ef4036532d64718ecbb
2018-01-04 21:59:45 -07:00
Artem Borisov
9e14a9cbdf msm8974-common: Enable boot and system server dex-preopt
As stated in https://android.googlesource.com/platform/build/+/418258c
this is required in O-MR1 since sepolicy now prevents system server from
loading anything from /data making our system extremely slow and janky.

Change-Id: I215ec7ebe95981ef0b953fe938e12b83675795ab
2018-01-04 17:57:19 -07:00
Kevin F. Haggerty
c5a6d91889 msm8974-common: Fix setup-makefiles.sh typo
Change-Id: I19fbd61e8f028e62e900e031b97c0f6ddcef1977
2018-01-02 19:48:37 -07:00