147 Commits
ten ... eleven

Author SHA1 Message Date
jeangraff30
42feeb5d47 msm8953-common: Use wcnss_service prebuilt 2021-11-23 21:59:11 -03:00
Luk1337
9111b8b459 msm8953-common: Add fingerprint navigation support
* Imported from berkeley-dev's kirin970-common tree, and edited.

* Opt to not use Moto's OneNav solution and instead just listen
  for keycodes without a middleman listener.

* This likely means we can't support the on-button-release
  events they do (keycode 615 for example).

* Add Needed sepolicy

Change-Id: I4ca3ac00719aca0cd4521ae3191bf59b641546a4
Signed-off-by: Erfan Abdi <erfangplus@gmail.com>
Signed-off-by: Nolen Johnson <johnsonnolen@gmail.com>

msm8953-common: Convert java KeyDisabler to Touch HAL

Change-Id: I19d4736a01604b354e43029ea77e54b698517954

msm8953-common: Remove libhwbinder/libhidltransport deps

Since these were combined into libhidlbase.

Bug: 135686713

Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I640a3f0e0839214523627bf0b59fd5ae9dd2c61c
2021-09-25 17:24:22 -04:00
Kevin F. Haggerty
e98eb2f72a msm8953-common: sepolicy: Allow system_app to read /proc/pagetypeinfo
avc: denied { read } for name="pagetypeinfo" dev="proc" ino=4026543033
scontext=u:r:system_app:s0 tcontext=u:object_r:proc_pagetypeinfo:s0
tclass=file permissive=0

Change-Id: I16465eb9acca9ff64a755d47f86f4ff424ebe4de
2021-09-19 20:01:11 -03:00
Jarl-Penguin
40768c7e46 msm8953-common: sepolicy: Address fingerprint HAL denials
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: I5decdc962117320dc432800f7a5b82fe66b45aee
2021-09-19 20:01:11 -03:00
Joshua Blanchard
ad4357d8aa msm8953-common: rootdir: Convert Android.mk -> Android.bp
* Leave ueventd.rc in Amdroid.mk for now.

Change-Id: If2f012dbb1e290567afd126ee2666d808840eee0
2021-09-19 20:01:07 -03:00
Jeferson
1dd3dd16d3 msm8953-common: libshims: Adress compiler warnings
Change-Id: Ib6a560c94edd982156fb8b997e7891d4a406a1f4
2021-09-19 16:00:07 -03:00
Prema Chand Alugu
3018438ec7 msm8953-common: libqsap: Include necessary headers explicitly
device/motorola/msm8916-common/libshims/libqsap_shim.c: 57:5: error: implicitly declaring library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
    strlcpy(wrq.ifr_name, iface, sizeof(wrq.ifr_name));
    ^
device/motorola/msm8916-common/libshims/libqsap_shim.c: 57:5: note: include the header <string.h> or explicitly provide a declaration for 'strlcpy'
Change-Id: I663edbb2ac09363dcac9dec3acf4289349af46d2
2021-09-19 15:59:55 -03:00
Sonal Singh
d8e72e0b21 msm8953-common: sepolicy: Add sepolicy for battery health
Change-Id: I2092c760a81328ec4c93b4b47520213b65f0fa6e
2021-09-19 15:59:53 -03:00
Rahul Krishna
ad0237e19a msm8953-common: Disable GPU protected composition
Change-Id: I54c40e9ba876c88185afbdbfa586e5f988741657
2021-09-19 15:59:53 -03:00
Ady Abraham
df3b301de5 msm8953-common: Enable GL comp backpressure
Enable backpressure for client composition to avoid jank due to
HWC queue stuffing.

Test: 1. Open Camera
      2. Swipe horizontally to go back to previous app.

Bug: 138083790
Change-Id: I3d26aa470c1660b23bd97133f39858f92638aca8
2021-09-19 15:59:53 -03:00
Jeferson
7dc147b5d3 msm8953-common: Solve some init denials
Change-Id: Id3cb44112e0219dd9d003ab1bf5acbf5762f095c
2021-09-19 15:59:53 -03:00
Chirayu Desai
f78ec94081 msm8953-common: rro_overlays: Move CarrierConfig to RRO
Change-Id: Ia57acd244608848f70fdcc30d5694c919db60671
2021-09-19 15:59:43 -03:00
Timi
c5eea592fa msm8953-common: sepolicy: silence fsck denials
* Don't audit dac_override, dac_read_search denials for fsck

Change-Id: I3883861b2bff61834718239522ec28f09b30e6c5
2021-09-19 15:59:15 -03:00
orgesified
84e29f9c37 msm8953-common: sepolicy: address kernel denial
avc: denied { create } for scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=socket permissive=0

Change-Id: I045d4f0c43814f607747ee938d82d147683fc805
2021-09-19 15:58:57 -03:00
Jeferson
18f0b938bd msm8953-common: Adress fsck_untrusted denials
[244457.303036] type=1400 audit(1624810115.905: 76046): avc: denied {read } for comm="fsck.exfat" uid=0 name="start" dev="sysfs" ino=41979
scontext=u: r:fsck_untrusted:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [244457.303320] type=1400 audit(1624810115.908:76047):
avc: denied { open } for comm="fsck.exfat" uid=0 path="/sys/devices/soc/c084000.sdhci/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p1/start" dev="sysfs" ino=41979 scontext=u:r:fsck_untrusted:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[244457.303418] type=1400 audit(1624810115.908: 76048): avc: denied { getattr } for comm="fsck.exfat" uid=0 path="/sys/devices/soc/c084000.sdhci/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p1/start" dev="sysfs" ino=41979 scontext=u:r:fsck_untrusted:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

Change-Id: I73a58794c00693c6a259f631a14638c7b18454d5
2021-09-19 15:58:35 -03:00
jeangraff30
7abe0d3f66 msm8953-common: Use MotoActions from hardware/motorola 2021-09-18 16:40:45 -03:00
jeangraff30
cf311b4e17 msm8953-common: Decommonize keylayout and idc 2021-09-18 16:39:41 -03:00
Jarl-Penguin
3bc4a210df msm8953-common: Drop more QCOM WFD components
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: I6b8e4d7743bb9c7130ce8afcdc86426b9bf5c80f
2021-09-12 11:42:23 -03:00
Nolen Johnson
ff4e0f0cb5 Revert "mms8953-common: Disable WiFi display for now"
This reverts commit 8de45fc749273c56bab02dd2f52edd1e936afec4.

Change-Id: Idd39c35bc506a1f3d478885dcac240d65398945a
2021-09-12 11:40:32 -03:00
Marc Bourgoin
cebafd6aed msm8953-common: Drop QCOM WFD
Change-Id: I3dd591444dc54ebe3a32e0385cbfc3db6bfc5e1f
2021-09-12 11:39:12 -03:00
LuK1337
ac23b8983a msm8953-common: Drop TARGET_EXFAT_DRIVER flag
* No longer needed.

Change-Id: Icb0df10fece66ee2ded0fe9c4ae329c50b3d2571
2021-08-22 16:35:42 -04:00
Nolen Johnson
6a71b45eb4 msm8953-common: Kill deprecated TARGET_USES_MKE2FS
* This has been useless since some time in Pie.

Change-Id: Ic02238aa0f1c25cfad20a2b827c3c2fe128f3543
2021-08-22 16:33:59 -04:00
Nolen Johnson
a85669f571 msm8953-common: Kill deprecated/unneeded board flags
* TARGET_DISABLE_WCNSS_CONFIG_COPY - We no longer need this.

Change-Id: I8d140fecdbbaac979bc8398745ffa95b911e4c89
2021-08-22 13:17:01 -04:00
Aayush Gupta
8c1d3f5af3 msm8953-common: Allow thermal-engine r_dir_file perms for sysfs*
[    8.618801] type=1400 audit(69459649.586:21): avc: denied { read } for comm="thermal-engine" name="kgsl" dev="sysfs" ino=29020 scontext=u:r:thermal-engine:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
12-18 04:50:58.101   648   648 I auditd  : type=1400 audit(0.0:32): avc: denied { search } for uid=0 comm="thermal-engine" name="qpnp-vadc-10" dev="sysfs" ino=14445 scontext=u:r:thermal-engine:s0 tcontext=u:object_r:sysfs_vadc_dev:s0 tclass=dir permissive=0

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I09c8dbaf80ecb7a6a511cc83b934dcb3128b0e76
2021-06-20 19:11:01 -03:00
jeangraff30
ea6b45d633 msm8953-common: kang ims apk from river 2021-06-20 19:01:12 -03:00
jeangraff30
9f78431624 msm8953-common: Update blobs to deen_sprout QPKS30.54-22-21 2021-06-20 18:55:03 -03:00
chingtzunglin
31c47c9320 msm8953-common: set selabel for metadata for vold to acess 2021-06-18 18:25:08 -03:00
jeangraff30
a6143c02e7 msm8953-common: Update Graphics blobs from river QPUS30.52-33-11
* Fix several problem with glitch
* continue with deen_sprout SDM color blobs so as not to break night mode
2021-06-06 00:48:45 -03:00
UtsavisGreat
fb4c0fc523 msm8953-common: rootdir: use all cores for camera daemon
Signed-off-by: UtsavisGreat <utsavbalar1231@gmail.com>
2021-05-26 12:12:23 -03:00
Jeferson
0af5cf7c3c msm8953-common: Downrev audio to 4.0
* Audio v6 has issues related with setMicrophoneFieldDimension, killing audio input causing
  signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
* Kill soundtrigger while we are it too

Change-Id: Iff802131e67ca6cb507f5a3d3d850ad153288b83
2021-05-16 16:35:10 -03:00
Nolen Johnson
7278919e58 msm8953-common: Append vendor prefix to several properties
* Needed after `LA.UM.9.2.r1-02700-SDMxx0.0` merge.

* Also remove duplicated vendor_fm_prop, as its now in
  qcom/sepolicy.

Change-Id: Iea4145ae677b463f9370843d4db5c16d8862a6fe
2021-05-15 17:11:27 -03:00
Michael Bestas
e9d8ad8894 msm8953-common: sepolicy: Add vendor prefix to qcom_ims_prop
* qcom_ims_prop -> vendor_qcom_ims_prop
* Fixes build after device/qcom/sepolicy-legacy-um update

Change-Id: I8d1b736deaaf54ce012cf3e42a4c927d43326631
2021-05-15 17:11:27 -03:00
Nolen Johnson
d2463902e2 msm8953-common: Fold important parts of late-fs into init.mmi.rc
* I0731bb767ae22863bcb2245eb2f8d5e94d7b3672 dropped `late-fs`
  to prevent bootanimation from starting in charge_only_mode.
  Unfortunately, we missed a few small bits of `late-fs`
  trigger than charge_only_mode depends on. The only remaining
  parts of `late-fs` that have been omitted are "fs tuning" and
  the Pixel optimizations that early start bootanimation.

Change-Id: Iec9146ba7902e78f02361ad3aa53ff76e89feabc
2021-04-06 12:37:25 -03:00
Nolen Johnson
c1b0fbc8b0 msm8953-common: Don't run late-fs on charger
* Pixel boot enhancements start boot animation and
  its dependencies in `late-fs`. Hence our charger mode
  was horridly broken in 11. to mitigate this, just don't
  run `late-fs` on charger - the only net loss is some
  "read optimizations", which are no-ops here as we won't
  be reading/writing anything in charger mode.

Change-Id: I0731bb767ae22863bcb2245eb2f8d5e94d7b3672
2021-04-06 12:37:25 -03:00
Nolen Johnson
f420d8a819 msm8953-common: Set TARGET_LEGACY_HW_DISK_ENCRYPTION
* This is back, again.

Change-Id: I11fc7c2e6ad9cf912fc596a79e6ab13377588109
2021-04-06 12:37:25 -03:00
Jorge Lucas
5352fa3bad Revert "msm8953-common: Drop pixel boot enhancements"
This reverts commit d14e9e83fd.
2021-04-06 12:37:08 -03:00
dianlujitao
1fb63a6bcf msm8953-common: Disable the Significant Motion Detector
Holds an unexpected sensor_SMD wake lock on R from time to time

Change-Id: Ib1eab796c186904db8ae342c9078de7c26cdf1dc
2021-03-15 00:31:51 -03:00
jeangraff30
6167b5e618 msm8953-common: Address laser denials
based https://github.com/LineageOS/android_device_motorola_griffin
2021-03-11 23:48:36 -03:00
Joshua Blanchard
eb816e2712 msm8953-common: Only build 32bit audio stack
Change-Id: I088b21c69b306bf908d54c69c12bfd16ee552a9c
2021-03-10 22:51:12 -03:00
Joshua Blanchard
e94b9e5b3e msm8953-common: sepolicy: Add rules for Moto ADSPD HAL
Change-Id: Ib3760a1dcece4428e5ed8adc9cae1ecc3e0f01b0
2021-03-10 22:47:48 -03:00
jeangraff30
4e18f5a8c6 msm8953-common: Switch to snap camera 2021-03-07 13:37:21 -03:00
Jorge Lucas
31af7ced40 msm8953-common: Fix typo on sanders model 2021-03-06 03:04:32 +00:00
Jorge Lucas
6b56c51280 msm8953-common: Add support for potter
Signed-off-by: Jorge Lucas <jorgelucas@pixelexperience.org>
2021-03-06 03:02:25 +00:00
Brad Ebinger
7a83fee3ea msm8953-common: overlay: Add translatable="false" tags to ims package overlays
Bug: 147569830
Test: atest TeleServiceTests:PhoneGlobalsTest
Change-Id: I57d80bbf17fafdc87ba04c6e7f7ab9573482e395
2021-03-05 15:28:17 +00:00
Han Wang
3c4a11279b Revert "msm8953-common: Force enable mobile network settings v2"
* This prop is not honored anymore on 11.

This reverts commit 9c3436802860786f782335e08dc5ad4c1a009a1d.

Change-Id: I7a10d9918a0218d607d65203e9a38d3e484a618f
2021-03-05 15:28:17 +00:00
Michael Bestas
231c883687 msm8953-common: Disable WiFi display for now
* Don't show the broken setting until we have a working
  QCOM wfd stack

Change-Id: Ie0637914b853609e27e8c5cb5699364b1717f712
2021-03-05 15:28:17 +00:00
jeangraff30
ce44eb9889 msm8953-common: Add perm laser device 2021-03-05 15:28:17 +00:00
LuK1337
e324816129 msm8953-common: Fix host_init_verifier errors
Change-Id: Ieb693814ad69e6864c7baadf6922ab7cbdb6ac4c
2021-03-05 15:28:17 +00:00
dianlujitao
5f052ffa08 msm8953-common: Switch to source built vendor.qti.hardware.perf@2.0.so
For some reason, any prebuilt ones from pre-R ROMs no longer work on R
and cause the following error:
  E ANDR-PERF: Unable to link to gPerfHal death notifications!

What's worse, the minimal CPU frequency of both clusters will be locked
at 1036MHz on msm8953.

Change-Id: I1dc96e4a51c4c81dd847c59a58ec670d89054f64
2021-03-05 15:28:17 +00:00
jeangraff30
591f5d58d9 msm8953-common: address denials 2021-03-05 15:28:17 +00:00
Michael Bestas
85f5c393ae msm8953-common: Switch to standalone extract utils
* Align with templates while we are at it
2021-03-05 15:28:17 +00:00
jeangraff30
dcd3793e03 msm8953-common: Drop liboemcrypto
* Disable L1 temporarily as it is causing a problem in some applications
2021-03-05 15:28:17 +00:00
Quallenauge
f27a110c79 msm8953-common: WifiOverlay: Disable WPA2 -> WPA3 upgrade.
Our device doesn't simply support sae.

Change-Id: Ibf8b9e363b4677cf2ab9590cc2ea1ba2341e29ca
2021-03-05 15:28:17 +00:00
Andrew Hexen
fb1c02ddd3 msm8953-common: rro_overlays: Move to Vendor
* For GSI compatibility.

Signed-off-by: Andrew Hexen <SyberHexen@gmail.com>
Change-Id: I21180e80de1109483f8ce0ab67fba021d4a74b08
2021-03-05 15:28:17 +00:00
jeangraff30
2d7510968e msm8953-common: Align overlays with stock 2021-03-05 15:28:17 +00:00
Bruno Martins
53526993b6 msm8953-common: Use CodeAurora ImsService implementation for RCS
There is no evidence that Qualcomm devices running a rather recent IMS
stack need to include AOSP RCS packages. RCS already worked before this
change and continues to do so, but the main goal was to get rid of some
of the RCS related log spam, which was accomplished here.

Change-Id: I219546e29d288373877e9bcd194a60ef5e09f224
2021-03-05 15:28:17 +00:00
Brad Ebinger
a926d9650c msm8953-common: overlay: Remove old configuration and use new config for MMTEL/RCS
Remove the old config_ims_package device config and configure the
new MMTEL and RCS configurations in Telephony instead. Also,
configure the RcsService to be the default RCS service.

Bug: 111305845
Test: make checkbuild
Change-Id: I0d709b8248f1c40f0a5b50ec799396706eeadd65
2021-03-05 15:28:17 +00:00
Soul Trace
b3153b9950 msm8953-common: sepolicy: address WLAN tethering denials
Fix reboot after 120 seconds on WLAN tethering enable.
Fix "target device is connected but no internet" issue.

Move ipacm-related sections from rootdir/etc/init.qcom.rc to data-ipa-cfg-mgr/ipacm/src/ipacm.rc
Make ipacm.rc look like vendor/qcom/opensource/data-ipa-cfg-mgr/ipacm/src/ipacm.rc but add
writepid /dev/cpuset/system-background/tasks to the service definition.
This let ipacm start after data decryption (it got killed on data decrypt and not respawned,
because was disabled).
This fixes following errors:
04-01 14:35:57.525   591 17586 W libc    : Unable to set property "ctl.interface_start" to "android.hardware.tetheroffload.config@1.0::IOffloadConfig/default": error code: 0x20
04-01 14:35:57.526  2665  3190 I ServiceManagement: getService: Trying again for android.hardware.tetheroffload.config@1.0::IOffloadConfig/default...
04-01 14:35:57.526   591 17586 E hwservicemanager: Failed to set property for starting android.hardware.tetheroffload.config@1.0::IOffloadConfig/default

Set wifi.active.interface context to exported_wifi_prop and allow hal_wifi_default to set it.
I don't know why context definition was not embedded to the contexts file, but now it is.
This fixes following errors:
[163263.846522] selinux: avc:  denied  { set } for property=wifi.active.interface pid=2733 uid=1010 gid=1010 scontext=u:r:hal_wifi_default:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0

Signed-off-by: TheSync <repo-sync@outlook.com>
2021-03-05 15:28:17 +00:00
Erfan Abdi
a545cbf3ec msm8953-common: disable qemu.hw.mainkeys setprop
We are enabling software navigation bar using overlay. Thus, this is
not required. Not to mention, this causes SELinux denials as well.

[    8.853895] selinux: avc:  denied  { set } for property=qemu.hw.mainkeys pid=1262 uid=0 gid=0 scontext=u:r:qti_init_shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=0

Signed-off-by: Erfan Abdi <erfangplus@gmail.com>
Change-Id: I36473bb7b5e2c22cbc60b96d0fab0f4446314701
2021-03-05 15:28:17 +00:00
Markdarkness
c418c64651 msm8953-common: sepolicy: address hwservicemanager denials 2021-03-05 15:28:17 +00:00
Kevin F. Haggerty
580c7b4bae msm8953-common: sepolicy: Quiet priv_app opening sysfs_android_usb files
* Reading these is disallowed globally, no need to see logspam of
  open attempts

Change-Id: I4c0094097d39456c65720cbdfb949d14439ce5f4
2021-03-05 15:28:17 +00:00
Pranav
62dc805d7b msm8953-common: sepolicy: Don't audit hal_audio_default 2021-03-05 15:28:17 +00:00
Roman Kiryanov
adf08614c2 msm8953-common: Replace audio@2.0-service with audio.service
Legacy service name, use android.hardware.audio.service instead

Bug: 153579444
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Merged-In: I4c05accb86dd0c9cd1b3fef3d84e0d54b2afc6a1
Change-Id: I6b55b4b1db2577f4176c99dca7021cfe78e13307
2021-03-05 15:28:17 +00:00
Palakurthi Sreekanth
89e072c010 msm8953-common: Add TUI hidl to manifest
Cannot find entry vendor.qti.hardware.tui_comm@1.0::ITuiComm/default in either framework or device manifest...

Signed-off-by: Palakurthi Sreekanth <palakurthisreekanth995@gmail.com>
2021-03-05 15:28:17 +00:00
jeangraff30
e2e1a607c5 msm8953-common: Add missing permission for ModServices 2021-03-05 15:28:17 +00:00
jeangraff30
1559da0ea1 msm8953-common: enabled fluence speaker
* Fixed call speaker
2021-03-05 15:28:17 +00:00
Michael Bestas
d22a46eb24 msm8953-common: Switch to AOSP FM radio app
Reason for revert: Apparently qcom app randomly has issues
when not used in combination with qcom fm scripts.
Revert to AOSP app for now that is tested for a long time.
2021-03-05 15:28:17 +00:00
Aayush Gupta
65b963a271 msm8953-common: Remove qcom.fmradio from PRODUCT_BOOT_JARS
- It's loaded as app library, hence not needed to be a boot jar

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I1b1357be08b511f5af7663dee256849e2f2b1b63
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
2021-03-05 15:28:17 +00:00
Jorge Lucas
ada1e34e80 msm8953-common: Decommonize nfc permissions
Signed-off-by: Jorge Lucas <jorgelucas@pixelexperience.org>
2021-03-05 15:28:17 +00:00
David Su
2561c2a828 msm8953-common: Don't sign Wifi RROs with platform cert
Preinstalled overlays needn't be signed with the same cert
as the package it overlays, simply being preinstalled is
enough. Sign with the default cert instead for now, which
provides fewer special privileges.

Bug: 162195999
Test: verify values still overlaid correctly
Change-Id: I017491fd383551c5aadf8648edb900e0c12a27b8
2021-03-05 15:28:17 +00:00
Roshan Pius
edac4d8f98 msm8953-common: Add WifiOverlay
Bug: 148617260
Test: Device boots up and connects to wifi networks.
Change-Id: Iec27a6d947a232a42451ef095dc73d1a52327db5
2021-03-05 15:28:17 +00:00
Bruno Martins
63217da21e msm8953-common: Sign Tether RROs with default cert
In analogy to commit 70d7541daf964240d88f38e8231a0f57fdc56d5b.

Change-Id: I18f770da2986653a70fdfa92f3be5e1199d06d08
2021-03-05 15:28:17 +00:00
LuK1337
88f5c17a4a msm8953-common: TetheringOverlay: Disable BPF
* Such is life with 3.18 kernels.

Change-Id: I1c5e3fab63271b1e3fe6c814d96edbde782f27e8
2021-03-05 15:28:17 +00:00
Alessandro Astone
59d3433270 msm8953-common: Disable SF backpressure
Change-Id: I4d5e9ec52901a8b7da9c0c439417a4ac90c512b3
2021-03-05 15:28:17 +00:00
Bruno Martins
8c06c4ea22 msm8953-common: Split product, odm and vendor props
Signed-off-by: jeangraff30 <jeangraff30@gmail.com>
2021-03-05 15:28:17 +00:00
jeangraff30
930acbbc84 msm8953-common: decommonize gatekeeper and keymaster
Reason : ali and deen_sprout uses qti
2021-03-05 15:28:17 +00:00
jeangraff30
0a1448e67e msm8953-common: drop fingerprint 2021-03-05 15:28:17 +00:00
Baldev Sahu
3b7dcf9598 msm8953-common: Update display config to version 1.9
upgrade display config version to 1.9.

Change-Id: I7fdd3d527ba732897e4fe91849996b895bc88037
2021-03-05 15:28:17 +00:00
Jan Altensen
545bc491b3 msm8953-common: libshims: add shim for android_memset32
* memset32.S and android_memset.S taken from Q
2021-03-05 15:28:17 +00:00
Subhajeet Muhuri
75fce9194b msm8953-common: overlay: Update pinner list for new SystemUI location
Change-Id: I93c1a4b73ca1f03ca0fcf9cbe4ce1b057a739ca6
2021-03-05 15:28:17 +00:00
Zhao Wei Liew
2e405fd45e msm8953-common: Remove unnecessary kernel board flags
TARGET_KERNEL_ARCH is a no-op unless it is different from TARGET_ARCH.

TARGET_KERNEL_HEADER_ARCH is also a no-op unless
it is different from TARGET_KERNEL_ARCH.

Change-Id: If64fb040c8ec61394e2657f13e51ff7a08519220
2021-03-05 15:28:17 +00:00
Arne Coucheron
ad65ba60c7 msm8953-common: Remove deprecated TARGET_BOARD_PLATFORM_GPU
Change-Id: I40a14bce12ee4725af17a3e8fbc05143e5577f8e
2021-03-05 15:28:17 +00:00
Nolen Johnson
f0ec5dce00 msm8953-common: Kill deprecated/unneeded board flags
* USE_OPENGL_RENDERER - Not used in any repos we build
  (msm8960 display HAL leftover).

Change-Id: I8d140fecdbbaac979bc8398745ffa95b911e4c89
2021-03-05 15:28:17 +00:00
Anton Hansson
029fe26593 msm8953-common: Remove obsolete dex settings
This block is completely redundant because..
- WITH_DEXPREOPT := true is the default
- WITH_DEXPREOPT_PIC is never read
- DEX_PREOPT_DEFAULT := nostripping has no effect when the
  BOARD_USES_SYSTEM_OTHER_ODEX flag is set to true

Test: make
Change-Id: I618a1e395ca1a14555cd50eef1a4f1aa079b553d
2021-03-05 15:28:17 +00:00
Cosme Domínguez Díaz
15a1ee045f msm8953-common: Drop TARGET_USES_NEW_ION_API flag
* Deprecated

Change-Id: Id50d6721cb1fb96bdb6d3ddb40b36a0147094b86
2021-03-05 15:28:17 +00:00
Ethan Chen
e82e921f06 msm8953-common: Remove unnecessary netutils packages
* These are already packaged by AOSP.

Change-Id: I77f91fbbb33a6d891d14fe852b094ab914ca3111
2021-03-05 15:28:17 +00:00
Michael Bestas
6e2432d236 msm8953-common: Remove unused libextmedia_jni
Change-Id: Id57661f4f1c4143cbd7b69472e6ab4b428ffab4f
2021-03-05 15:28:17 +00:00
Michael Bestas
1126957d71 msm8953-common: Cleanup dead targets
Change-Id: Ib1e2965a5e9f16929f1dc11c719d917cd85604d1
2021-03-05 15:28:17 +00:00
Erfan Abdi
42ccc30a9e msm8953-common: Add missing kernel cmdline
Change-Id: I9838371f5f9ab32fc84b0bba28b0069623c3e7a5
2021-03-05 15:28:17 +00:00
Dybios
56851bd344 msm8953-common: MotoActions: Adapt launchAssist method for R
Due to the API change for SearchManager to generalize
handle launching Assistant on both Phones and TVs alike.
  25b0f41e84

Signed-off-by: Dybios <dibyajyoti.samal@gmail.com>
2021-03-05 15:28:17 +00:00
Joshua Blanchard
3746c2f486 msm8953-common: sepolicy: Add missing rules for persist_audio_file
* Rules for persist_audio_file have been removed for legacy devices.

* Instead of labeling "/mnt/vendor/persist/audio", which is the default
  path for audio calibration, label "/mnt/vendor/persist/factory/audio"
  as this is where Moto devices store these calibration files anyway.

Change-Id: Ic27eb7f713e145a795cfec9de3c684fe9e2fc985
2021-03-05 15:28:17 +00:00
LuK1337
739c49d0e0 msm8953-common: Update qcom sepolicy include
Change-Id: I7167575e82eb8c5de2d822643261757edda73a07
2021-03-05 15:28:17 +00:00
jeangraff30
cb9158848a msm8953-common: Cleanup 2021-03-05 15:28:17 +00:00
jeangraff30
f57e00e939 msm8953-common: add dependencies 2021-03-05 15:28:16 +00:00
Jorge Lucas
d14e9e83fd msm8953-common: Drop pixel boot enhancements
Signed-off-by: Jorge Lucas <jorgelucas@pixelexperience.org>
2021-03-05 15:28:16 +00:00
Jorge Lucas
a1d8ed9b3d msm8953-common: qti telephony common is deprecated
also drop telephony injection

Signed-off-by: Jorge Lucas <jorgelucas@pixelexperience.org>
2021-03-05 15:28:16 +00:00
Felix
566811d0f7 msm8953-common: sepolicy: Use BOARD_VENDOR_SEPOLICY_DIRS
BOARD_SEPOLICY_DIRS is deprecated.

Change-Id: I046282b2a2e8c541726fb29cb0044503322d4be9
2021-03-05 15:28:16 +00:00
Kyle Lin
ced21791ef msm8953-common: Adjust dex2oat thread count after setup wizard
Test: Forrest appinstall test
Bug: 149395059
Change-Id: I9c5db865c616480b0f00629aba54e02b97bc4674
2021-03-05 15:28:16 +00:00
Pavan Kumar M
1b6c15c663 msm8953-common: Add permissions for RCS service
Add permissions to Rcs service to access QMI IMSS service

Change-Id: I263a0b6413c1ae26ab57a96936bc983c68ef709e
2021-03-05 15:28:16 +00:00
Ethan Chen
8d73c2f067 msm8953-common: Add AOSP RCS packages
Change-Id: Ic16d3b92820d246db73ad70ccaa0f4bc7f50e515
2021-03-05 15:28:16 +00:00
Ethan Chen
a54d87d166 msm8953-common: Remove dead RCS packages
Change-Id: Ie2c03fa11cb08c7ab900d7b666981d592aba19c7
2021-03-05 15:28:16 +00:00
David Sehr
c06de7f838 msm8953-common: Enable usage of dex2oat64
Use 64-bit dex2oat for better dexopt time.

Bug: 153380900
Test: boot and install an application
Change-Id: I3e7a6e6e9385ff6564d1a2e6dda004ebb061f095
(cherry picked from commit 126f03be80f57a8a0411842011152d9381589b78)
Merged-In: I3e7a6e6e9385ff6564d1a2e6dda004ebb061f095
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2021-03-05 15:28:16 +00:00
Kevin Chyn
062f4d7c7d msm8953-common: Add fingerprint configuration to overlay
The framework was changed in Android R to require explicit authenticator registration.
This change allows apps to continue to use the fingerprint sensor.

Bug: 147445115

Test: Builds
Change-Id: Id3385edc784b2053c8b54ec3153728f4e6e22a45
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2021-03-05 15:28:16 +00:00
vivekachooz
e8ab5eac6f msm8953-common: sepolicy: Allow camera hal to access ubwc property
vendor.video.disable.ubwc prop fails to read without this.

Change-Id: Ic0bd8e5b4a56a7e7776d7c57d4260aae4d957f64
2021-03-05 15:28:16 +00:00
Lucchetto
7ebebdc551 msm8953-common: Adapt libinit to Android 11
Change-Id: Ia6b6f753891b639dad4e380bdba6b594faf2a550
2021-02-03 13:42:09 -03:00
Roshan Pius
e9c28120b4 msm8953-common: overlay: Remove wifi related internal overlays
These are replaced by formal mainline module overlays.

Bug: 143464763
Test: Send for  Wifi regression tests
Change-Id: I45881ed210132252b9c5c7d6be03ed845e33f971
2021-02-03 13:42:09 -03:00
Martin Stjernholm
5dbec85823 msm8953-common: overlay: Update paths to the new ART APEX.
Test: Presubmits
Bug: 135753770
Change-Id: I98378100456dce927ccc253301a398d70d1b7368
2021-02-03 13:42:09 -03:00
Nicolas Geoffray
26b32a3234 msm8953-common: overlay: Update in pinned files.
Remove or update paths that don't exist.

Bug: 119800099
Test: boots
Change-Id: Ib2cea88499cf08274d620d9d85ffcafc31fee868
2021-02-03 13:42:09 -03:00
Robert Shih
7422cfbb7d msm8953-common: Enable v1.3 drm plugins
Bug: 139134043
Test: MediaDrmTest
Change-Id: I7453b035ca29c7ee889d03de0d55e6d947b3cb77
2021-02-03 13:42:09 -03:00
Yifan Hong
683258557d msm8953-common: Replace BOARD_CHARGER_ENABLE_SUSPEND with ro.charger.enable_suspend
Test: charger mode
Bug: 124118169
Change-Id: I3825d08e38d677bd7154879609857de302348b6f
2021-02-03 13:42:09 -03:00
Ramakant Singh
324e5ceae8 msm8953-common: init: Add vendor prefix for shell
qti_init_shell renamed to
vendor_qti_init_shell

Change-Id: I4cfe1d8e15892a4948ece52aa799b2a60826d5f9
2021-02-03 13:42:09 -03:00
Arian
fceea59c74 msm8953-common: Build new aidl qti power HAL
Change-Id: I4bdea354e54d34d0dfe9b811e228fc6f8762d2ed
2021-02-03 13:42:09 -03:00
dianlujitao
e2b506061a msm8953-common: Provide shim for libril-qc-hal-qmi.so
Change-Id: Ic5d732f3e98ba45c886db9646d6ef30eb0d42bf4
2021-02-03 13:42:09 -03:00
Mikhail Naganov
c9baa6479f msm8953-common: Switch to Audio HAL V6
Switch to Audio HAL V6

Bug: 141989952
Test: atest VtsHalAudioV6_0TargetTest
      atest VtsHalAudioEffectV6_0TargetTest
            manual audio "smoke" test on taimen and walleye

Change-Id: Ieb1cc5c7fdcc5416a328a0a5c4a1996258b81ac8
2021-02-03 13:42:09 -03:00
Arian
16d2a7b1b2 msm8953-common: Remove usb hidl entry from manifest.xml
Change-Id: I105e682daec37c5663592b3955565d46cdbc6f11
2021-02-03 13:42:09 -03:00
Jimmy Chen
677cbd53fb msm8953-common: Move supplicant service init to wpa_supplicant
Bug: 138790309
Test: boot and wifi function is ok
Change-Id: I35cf3e03566443e20799623045eacd423fd7f5c4
2021-02-03 13:42:09 -03:00
Jimmy Chen
d5e10be172 msm8953-common: Move wpa_supplicant VINTF definition to wpa_supplicant module
Bug: 36505680
Test: atest FrameworksNetTests
Test: atest VtsHalWifiSupplicantV1_3TargetTest
Test: connect EAP access point and verify PMK cache works correctly.
Change-Id: I2c382765b8e84951fc17bb9f1c3785dcd66e7b51
2021-02-03 13:42:09 -03:00
Ahmed ElArabawy
5be3582c40 msm8953-common: wifi: Remove IWifi hidl entry from manifest.xml
This CL removes the definition for the IWifi hidl interface from
manifest.xml and rely on vint-fragements entry.
This is to avoid the need to modify the revision in future

Bug: 138243400
Test: builds and wifi works
Change-Id: Icaff93193e10d4953d9947d2739b05959ece79f1
2021-02-03 13:42:09 -03:00
Ahmed ElArabawy
4376e03175 msm8953-common: Wifi: Remove hostapd hidl entry from manifest.xml
This CL removes the definition for the hostapd hidl interface from
manifest.xml and rely on vint-fragements entry.
This is to avoid the need to modify the revision in future

Bug: 145780363
Test: builds and wifi softap works
Change-Id: I2a9cb25209efc94f6306f38d89cb5e1ff6f72bed
2021-02-03 13:42:09 -03:00
LuK1337
780672cea2 msm8953-common: sepolicy: Label /persist
Change-Id: I471c0d1fedb51eabc32b54ab35a9823db8efd034
2021-02-03 13:42:09 -03:00
LuK1337
c7eb206752 msm8953-common: Fix host_init_verifier errors 2021-02-03 13:42:09 -03:00
Divya Sharma
cf84da3077 msm8953-common: load_system_props is deprecated and causes a build error.
Change-Id: I71df37c605ed805dc1f8bc2e626a33cf6818e9f7
2021-02-03 13:42:09 -03:00
Joshua Blanchard
afa5c28987 msm8953-common: persist_camera_prop -> vendor_persist_camera_prop
* Add vendor prefix to persist_camera_prop.

Change-Id: I228b4d1b1c7f0354b31c08ceb08202235f825acb
2021-02-03 13:42:09 -03:00
LuK1337
6e1a74106a msm8953-common: Switch vintf manifest from copy files to build targets
* Fixes:
  build/make/core/Makefile:49: error: VINTF metadata found in PRODUCT_COPY_FILES

Change-Id: I0a7ddebff54563f7901b6ce5d6af9580ea201a77
2021-02-03 13:42:09 -03:00
P.Adarsh Reddy
6401c73046 msm8953-common: Add build broken flags in BoardConfig.mk
BUILD_BROKEN_USES_BUILD_COPY_HEADERS

Change-Id: I7b115f5bb7990c438c595b4b1ff536598786d529
2021-02-03 13:42:09 -03:00
ix5
479f832aef msm8953-common: Add protobuf vendorcompat lib
Our blobs are compiled against libprotobuf-full-cpp.so, but
starting in R, Android is using a versioned naming approach,
e.g. libprotobuf-cpp-full-3.9.1.so.

See https://r.android.com/1109518

The entry in public.libraries.txt is needed to allow the
linker to find and use the lib outside the VNDK.

See https://source.android.com/devices/tech/config/namespaces_libraries

[wight554: added libprotobuf-cpp-lite as well]

Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com>
Change-Id: I28222c89e1e07017867088492a726ee9d45d8e6f
2021-02-03 13:42:09 -03:00
jeangraff30
6395a3e605 msm8953-common: Import public native libraries
from deen_sprout:10/QPKS30.54-22-11
2021-02-03 13:42:09 -03:00
Davide Garberi
d60baee4fa msm8953-common: Build libhidltransport and libhwbinder
Change-Id: I1b4b255ce40c94e3bf2e6234b7280fc094a9270b
2021-02-03 13:42:09 -03:00
Steven Moreland
63e44f7f3e msm8953-common: Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I640a3f0e0839214523627bf0b59fd5ae9dd2c61c
2021-02-03 13:42:06 -03:00
Joshua Blanchard
7f87f1f8a5 Revert "msm8953-common: Sign TimeService app with dedicated certificate"
* No longer present in qcom sepolicy

This reverts commit 9861958ee37d2090a5ac759f44b3ee83a2afcc0d.

Change-Id: Ib24bfa6acd5a1e1e3eefb369e4d59597fa50c858
2021-01-31 18:24:26 -03:00
Jorge Lucas
d096ccf818 msm8953-common: Add missing permission for /dev/pn544 2021-01-31 18:24:26 -03:00
Jorge Lucas
d9313a152a msm8953-common: Add DTV Support
- Add hidl to manifest
- Fix Sepolicy
- Add proper permissions for /dev/isdbt
2021-01-31 18:24:25 -03:00
Jorge Lucas
2478e765f5 msm8953-common: camera: Adress denials 2021-01-31 18:24:25 -03:00
Jorge Lucas
baeea07419 msm8953-common: Camera: Allow persist_camera_prop for cameraserver 2021-01-31 18:24:25 -03:00
Jorge Lucas
2cfc9fb07b msm8953-common: Add fingerprint perms for sanders/potter
Signed-off-by: Jorge Lucas <jorgelucas.sd@gmail.com>
2021-01-31 18:24:25 -03:00
Jorge Lucas
498023ed68 msm8953-common: Import init.recovery.qcom.rc from CAF 2021-01-31 18:24:25 -03:00
CrisBalGreece
718e615a83 msm8953-common: add a vendor copy of com.qualcomm.qti.wifidisplayhal@1.0.so
* It turns out that wifidisplayhalservice also wants a copy of it
  and with VNDK current it cannot read the system copy.
* Without the vendor copy though, Miracast still works, but let's
  provide a vendor copy to fix this error from appearing  in  our
  logcat.

F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/wifidisplayhalservice": library "com.qualcomm.qti.wifidisplayhal@1.0.so" not found

Change-Id: I700a4ba61089eae035e0af3ac3e23ea9c80a5cbc
2021-01-31 18:24:25 -03:00
jeangraff30
5d7dcdfc69 msm8953: kang light hal from moto msm8937 tree 2021-01-31 18:24:06 -03:00
Vachounet
d92733b312 msm8953-common: Add homebutton perms and address denials
Signed-off-by: trpsl <trpsl755@gmail.com>
2021-01-03 21:39:10 -03:00
Joshua Blanchard
20bb266be8 msm8953-common: Give audio hal access to prox and spkr calibration data
* Speaker (and receiver) calibration files are located on persist
  partition. Grant audio permission to find and read these files.

* Moto's libspeakerbundle needs access to the proximity sensor,
  so allow it to find sensorservice so MotSpeakerHelperProximity
  can instantiate SensorManager.

Change-Id: I888a424fc1c42dea0f130adfc74e02e47927e2b8
2021-01-03 21:39:10 -03:00
Joshua Blanchard
42e6a9e1f8 msm8953-common: sepolicy: Allow camera to read and set calibration data
Change-Id: I9a3d852fd2ac4501f1b38c2660fef366e1f26e30
2021-01-03 21:39:10 -03:00
jeangraff30
8351fcaa10 msm8953-common: switch to Camera2 2020-12-28 20:12:09 -03:00
jeangraff30
c274deb5fb msm8953-common: decomonize camera@1.0-impl
Signed-off-by: jeangraff30 <jeangraff30@gmail.com>
2020-12-28 20:12:09 -03:00
Nolen Johnson
eafd88e2a0 msm8953-common: Decomonize Audio HAL
* Let maintainers decide whether they go prebuilt or source built.
2020-12-28 20:12:09 -03:00
Erfan Abdi
75cbd48ef8 msm8953-common: Wrap libgui_vendor into libwui
Change-Id: Ifa25ec6a2aaf3855c24b2a3a46b80abb8501b189
Signed-off-by: Erfan Abdi <erfangplus@gmail.com>
2020-12-28 20:12:09 -03:00
Jorge Lucas
80b2a909c9 msm8953-common: Switch to VNDK full runtime
Signed-off-by: Jorge Lucas <jorgelucas@pixelexperience.org>
2020-12-28 20:12:09 -03:00
jeangraff30
a6eeb5ffa5 msm8953-common: decomonize prop cam 2020-12-28 20:12:09 -03:00
190 changed files with 1952 additions and 7971 deletions

View File

@@ -1,2 +1,3 @@
soong_namespace {
}
subdirs = [
"light",
]

View File

@@ -15,7 +15,7 @@
LOCAL_PATH := $(call my-dir)
ifneq ($(filter ali albus sanders,$(TARGET_DEVICE)),)
ifneq ($(filter ali albus potter sanders,$(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))

View File

@@ -15,8 +15,6 @@
COMMON_PATH := device/motorola/msm8953-common
TARGET_SPECIFIC_HEADER_PATH := $(COMMON_PATH)/include
BOARD_VENDOR := motorola
# Architecture
@@ -38,7 +36,6 @@ TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53
BOARD_USES_QCOM_HARDWARE := true
TARGET_BOOTLOADER_BOARD_NAME := msm8953
TARGET_BOARD_PLATFORM := msm8953
TARGET_BOARD_PLATFORM_GPU := qcom-adreno506
TARGET_NO_BOOTLOADER := true
# Audio
@@ -92,7 +89,7 @@ AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
# Build
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_PHONY_TARGETS := true
BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth
@@ -105,33 +102,21 @@ TARGET_USES_QTI_CAMERA_DEVICE := true
# Charger
BACKLIGHT_PATH := /sys/class/leds/lcd-backlight/brightness
BOARD_CHARGER_ENABLE_SUSPEND := true
BOARD_NO_CHARGER_LED := true
# Crypto
TARGET_HW_DISK_ENCRYPTION := true
TARGET_LEGACY_HW_DISK_ENCRYPTION := true
# Display
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
TARGET_USES_ION := true
TARGET_USES_NEW_ION_API :=true
TARGET_USES_HWC2 := true
TARGET_USES_GRALLOC1 := true
USE_OPENGL_RENDERER := true
# DRM
TARGET_ENABLE_MEDIADRM_64 := true
# Enable dexpreopt to speed boot time
ifeq ($(HOST_OS),linux)
ifneq ($(TARGET_BUILD_VARIANT),eng)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true
endif
endif
endif
# FM
BOARD_HAVE_QCOM_FM := true
TARGET_QCOM_NO_FM_FIRMWARE := true
@@ -160,8 +145,6 @@ BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
BOARD_RAMDISK_OFFSET := 0x01000000
TARGET_KERNEL_ARCH := arm64
TARGET_KERNEL_HEADER_ARCH := arm64
TARGET_KERNEL_SOURCE := kernel/motorola/msm8953
TARGET_KERNEL_CLANG_COMPILE := true
@@ -171,12 +154,10 @@ TARGET_PROVIDES_LIBLIGHT := true
# Partitions
BOARD_FLASH_BLOCK_SIZE := 131072
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_EXFAT_DRIVER := exfat
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
TARGET_USES_MKE2FS := true
TARGET_COPY_OUT_VENDOR := vendor
TARGET_COPY_OUT_PRODUCT := system/product
BOARD_ROOT_EXTRA_SYMLINKS := \
@@ -194,7 +175,12 @@ BOARD_VNDK_VERSION := current
TARGET_PER_MGR_ENABLED := true
# Power
TARGET_PROVIDES_POWERHAL := true
TARGET_USES_INTERACTION_BOOST := true
# Properties
TARGET_ODM_PROP += $(COMMON_PATH)/odm.prop
TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop
TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
# Timeservice
BOARD_USES_QC_TIME_SERVICES := true
@@ -207,8 +193,8 @@ CUSTOM_APNS_FILE := $(COMMON_PATH)/configs/sprint_apns.xml
BOARD_ROOT_EXTRA_FOLDERS := persist
# SELinux
include device/qcom/sepolicy-legacy-um/sepolicy.mk
BOARD_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
include device/qcom/sepolicy-legacy-um/SEPolicy.mk
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private
# Wifi
@@ -223,7 +209,7 @@ WIFI_DRIVER_FW_PATH_AP := "ap"
WIFI_DRIVER_FW_PATH_STA := "sta"
WIFI_DRIVER_FW_PATH_P2P := "p2p"
WPA_SUPPLICANT_VERSION := VER_0_8_X
TARGET_DISABLE_WCNSS_CONFIG_COPY := true
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
PRODUCT_VENDOR_MOVE_ENABLED := true
-include vendor/motorola/msm8953-common/BoardConfigVendor.mk

View File

@@ -1,25 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := MotoActions
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_USE_AAPT2 := true
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_RESOURCE_DIR := \
$(LOCAL_PATH)/res \
$(TOP)/packages/resources/devicesettings/res \
$(TOP)/packages/resources/devicesettings-custom/res
LOCAL_PROGUARD_ENABLED := disabled
include frameworks/base/packages/SettingsLib/common.mk
include $(BUILD_PACKAGE)

View File

@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.moto.actions"
android:sharedUserId="android.uid.system"
>
<original-package android:name="com.cyanogenmod.settings.device" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<protected-broadcast android:name="com.android.systemui.doze.pulse" />
<application
android:allowBackup="true"
android:label="@string/moto_actions_title"
android:icon="@drawable/ic_gesture"
android:persistent="true">
<provider
android:name=".MotoActionsSearchIndexablesProvider"
android:authorities="com.moto.actions"
android:multiprocess="false"
android:grantUriPermissions="true"
android:permission="android.permission.READ_SEARCH_INDEXABLES"
android:exported="true">
<intent-filter>
<action android:name="android.content.action.SEARCH_INDEXABLES_PROVIDER" />
</intent-filter>
</provider>
<receiver android:name="com.moto.actions.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<service android:name="ServiceWrapper" android:permission="ServiceWrapper">
<intent-filter>
<action android:name="ServiceWrapper"/>
</intent-filter>
</service>
<activity
android:name=".DozeSettingsActivity"
android:label="@string/ambient_display_title"
android:theme="@style/MotoActions">
<intent-filter>
<action android:name="com.moto.actions.DOZE_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".ActionsPreferenceActivity"
android:label="@string/moto_actions_title"
android:summary="@string/device_gestures_summary"
android:theme="@style/MotoActions">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.homepage" />
<meta-data
android:name="com.android.settings.icon"
android:resource="@drawable/ic_settings_gestures_dashboard" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/device_gestures_summary" />
</activity>
<activity
android:name=".GestureSettingsActivity"
android:label="@string/device_gestures_title"
android:theme="@style/MotoActions"
android:exported="true">
</activity>
<activity
android:name=".FPGestureSettingsActivity"
android:label="@string/fingerprint_gestures_title"
android:theme="@style/MotoActions"
android:exported="true">
</activity>
</application>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:name="vector" android:tint="?android:attr/colorControlNormal" android:height="1600dp" android:width="1600dp" android:viewportWidth="1600" android:viewportHeight="1600">
<group android:name="group">
<path android:name="path" android:fillColor="#000" android:pathData="M 980 1360 C 929 1314 921 1310 872 1310 C 803 1310 765 1290 750 1245 C 743 1225 741 1203 743 1196 C 747 1186 736 1180 705 1175 C 649 1167 620 1134 620 1079 C 620 1040 620 1040 581 1040 C 523 1040 486 1006 486 951 C 485 911 484 910 452 910 C 411 910 364 887 350 860 C 338 837 343 711 357 687 C 381 645 645 371 667 365 C 706 356 730 368 806 437 L 878 501 L 888 471 C 904 426 935 400 974 400 C 1005 400 1029 419 1198 575 C 1428 788 1425 784 1424 960 C 1423 1062 1419 1094 1403 1131 C 1376 1192 1326 1247 1271 1275 C 1246 1288 1200 1323 1170 1354 C 1122 1404 1111 1410 1075 1410 C 1041 1409 1026 1401 980 1360 Z M 1202 1238 C 1257 1222 1325 1159 1346 1105 C 1370 1040 1372 857 1348 813 C 1332 784 1001 470 977 461 C 964 456 940 488 940 511 C 940 520 962 562 989 603 C 1045 688 1047 694 1037 731 C 1025 778 996 782 694 779 C 439 775 417 776 406 793 C 398 805 398 815 406 828 C 416 843 442 845 679 848 L 940 850 L 940 910 L 751 910 C 591 910 560 912 549 926 C 540 937 539 946 547 958 C 556 973 584 976 746 980 L 935 985 L 938 1013 L 941 1040 L 823 1040 C 758 1040 699 1044 692 1049 C 684 1053 680 1068 682 1081 C 684 1101 693 1106 730 1112 C 755 1115 812 1119 858 1119 L 941 1120 L 938 1148 C 935 1174 932 1175 874 1178 C 809 1181 791 1197 812 1234 C 820 1248 844 1250 992 1250 C 1094 1250 1178 1245 1202 1238 Z M 660 670 C 690 640 673 605 629 605 C 599 605 595 608 592 635 C 589 654 594 668 606 677 C 630 694 637 693 660 670 Z M 198 729 C 156 705 169 566 225 454 C 286 329 415 232 551 208 C 601 199 614 200 635 214 C 662 232 669 271 648 288 C 641 293 613 301 585 304 C 438 325 309 452 281 601 C 276 632 274 667 277 678 C 280 691 274 706 261 719 C 238 742 224 744 198 729 Z" android:strokeWidth="1"/>
</group>
</vector>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:name="vector" android:tint="?android:attr/colorControlNormal" android:height="1600dp" android:width="1600dp" android:viewportWidth="1600" android:viewportHeight="1600">
<group android:name="group">
<path android:name="path" android:fillColor="#000" android:pathData="M 287 1283 C 273 1270 280 1223 298 1207 C 315 1192 365 1190 808 1190 L 1300 1190 L 1316 1214 C 1324 1228 1330 1249 1328 1262 L 1325 1285 L 809 1288 C 526 1289 290 1287 287 1283 Z M 382 1008 C 261 895 234 858 219 794 C 209 752 210 734 224 686 C 239 635 253 616 329 539 C 427 440 463 420 547 420 C 654 420 682 441 976 732 C 1189 944 1240 1000 1240 1021 C 1240 1094 1139 1125 1057 1077 C 1033 1063 1008 1044 1000 1036 C 983 1014 970 1016 970 1040 C 970 1082 939 1097 851 1097 C 755 1097 731 1084 705 1016 C 688 973 692 919 715 857 C 721 842 714 840 636 840 C 584 840 550 844 550 850 C 550 856 561 883 575 910 C 611 980 606 1034 560 1080 C 519 1121 488 1108 382 1008 Z M 532 1016 C 541 995 538 979 510 916 C 481 851 478 837 488 815 C 505 779 537 770 653 770 C 805 770 812 773 966 916 C 1084 1026 1104 1040 1135 1040 C 1157 1040 1170 1035 1170 1027 C 1170 1020 1059 903 923 768 C 663 510 626 481 547 480 C 488 480 448 504 366 590 C 280 681 262 723 281 793 C 290 827 312 854 398 937 C 457 994 508 1040 513 1040 C 517 1040 525 1029 532 1016 Z M 781 955 L 774 885 L 762 926 C 750 967 753 992 773 1018 C 788 1036 788 1032 781 955 Z M 910 987 C 910 953 904 938 882 917 C 867 902 851 890 847 890 C 843 890 840 911 840 938 C 840 991 861 1030 891 1030 C 907 1030 910 1023 910 987 Z" android:strokeWidth="1"/>
<path android:name="path_1" android:fillColor="#000" android:pathData="M 1284 1086 C 1268 1074 1264 1054 1259 933 C 1254 830 1247 780 1232 737 C 1180 593 1093 488 986 440 C 917 408 902 385 923 340 C 958 266 1133 346 1236 483 C 1339 620 1379 738 1387 926 C 1393 1051 1392 1058 1371 1079 C 1347 1103 1312 1106 1284 1086 Z" android:strokeWidth="1"/>
</group>
</vector>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:name="vector" android:tint="?android:attr/colorControlNormal" android:height="1610dp" android:width="1610dp" android:viewportWidth="1610" android:viewportHeight="1610">
<group android:name="group">
<path android:name="path" android:fillColor="#000" android:pathData="M 592 1464 C 571 1450 570 1442 570 1311 C 570 1190 572 1171 588 1157 C 612 1135 633 1136 653 1158 C 667 1173 670 1200 670 1313 C 670 1442 669 1450 648 1464 C 636 1473 623 1480 620 1480 C 617 1480 604 1473 592 1464 Z M 720 1460 C 704 1444 700 1427 700 1377 C 700 1298 713 1277 760 1282 L 795 1285 L 798 1373 C 801 1459 800 1460 775 1470 C 741 1483 743 1483 720 1460 Z" android:strokeWidth="1"/>
<path android:name="path_1" android:fillColor="#000" android:pathData="M 1073 1437 C 1027 1394 1022 1392 946 1385 C 850 1376 820 1354 820 1292 C 820 1254 819 1252 782 1246 C 729 1238 695 1200 695 1149 C 695 1111 694 1110 662 1110 C 612 1110 570 1064 570 1011 L 570 970 L 529 970 C 497 970 482 964 458 940 C 426 907 426 913 448 782 C 456 730 461 724 605 580 C 700 485 764 429 781 425 C 818 417 854 437 920 504 C 976 561 990 570 990 547 C 990 529 1029 494 1058 485 C 1093 475 1137 510 1318 694 C 1442 820 1481 866 1490 897 C 1498 922 1501 982 1498 1061 C 1495 1171 1491 1191 1468 1236 C 1436 1296 1383 1345 1321 1373 C 1295 1383 1257 1410 1234 1431 C 1208 1457 1181 1473 1158 1477 C 1125 1482 1117 1478 1073 1437 Z M 1309 1310 C 1362 1284 1416 1218 1429 1165 C 1445 1100 1443 935 1426 902 C 1418 887 1337 801 1246 710 C 1104 569 1077 547 1062 556 C 1030 576 1037 614 1084 693 C 1135 776 1140 810 1109 841 C 1088 862 1081 863 961 857 C 892 853 760 847 669 844 L 502 837 L 495 860 C 481 904 499 908 765 920 C 903 927 1019 935 1024 940 C 1028 944 1027 956 1022 967 C 1012 983 996 985 823 985 L 635 985 L 632 1013 C 630 1028 630 1041 632 1041 C 634 1042 721 1048 825 1054 L 1015 1065 L 1015 1115 L 892 1115 C 794 1115 767 1118 760 1130 C 748 1149 748 1151 760 1170 C 767 1181 797 1186 887 1190 C 1005 1195 1005 1195 1005 1220 C 1005 1243 1001 1245 945 1250 C 886 1255 885 1256 885 1285 C 885 1311 889 1316 920 1321 C 939 1325 1026 1328 1113 1329 C 1252 1330 1275 1328 1309 1310 Z M 440 1451 C 434 1439 430 1354 430 1245 C 430 1136 434 1051 440 1039 C 452 1017 499 1013 518 1032 C 535 1049 535 1441 518 1458 C 499 1477 452 1473 440 1451 Z M 300 582 C 269 557 282 540 330 540 C 378 540 391 557 360 582 C 348 592 334 600 330 600 C 326 600 312 592 300 582 Z" android:strokeWidth="1"/>
<path android:name="path_2" android:fillColor="#000" android:pathData="M 485 550 C 468 532 454 530 308 530 C 174 530 148 528 143 514 C 140 505 148 488 163 472 C 185 448 188 434 192 348 C 197 256 196 250 174 229 C 146 203 143 182 166 173 C 177 169 223 208 322 306 C 510 493 546 536 530 555 C 514 575 507 574 485 550 Z M 356 314 L 267 219 L 287 182 C 309 139 349 131 364 166 C 369 177 386 194 401 203 C 449 230 471 276 468 344 C 466 377 460 405 455 407 C 449 409 404 367 356 314 Z" android:strokeWidth="1"/>
</group>
</vector>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:name="vector" android:tint="?android:attr/colorControlNormal" android:height="1600dp" android:width="1600dp" android:viewportWidth="1600" android:viewportHeight="1600">
<group android:name="group">
<path android:name="path" android:fillColor="#000" android:pathData="M 375 1429 C 345 1401 295 1366 263 1350 C 193 1317 139 1262 108 1195 C 88 1151 86 1128 85 1015 C 85 906 88 879 104 846 C 117 821 194 742 318 629 C 492 470 517 450 548 450 C 573 450 589 458 611 481 C 627 498 640 518 640 526 C 640 550 652 542 718 478 C 776 420 784 415 825 415 C 869 415 871 416 1025 570 C 1110 655 1180 732 1180 740 C 1180 749 1191 771 1204 789 C 1236 832 1244 869 1230 906 C 1213 951 1180 980 1138 986 C 1102 992 1100 995 1100 1027 C 1100 1072 1049 1125 997 1135 C 965 1141 960 1146 960 1170 C 960 1209 917 1257 870 1271 C 838 1281 831 1288 826 1316 C 822 1336 806 1361 783 1380 C 749 1410 744 1412 675 1409 C 603 1406 602 1406 561 1443 C 526 1474 513 1480 474 1480 C 433 1480 423 1475 375 1429 Z M 541 1374 C 555 1361 558 1348 553 1311 C 548 1268 551 1260 580 1227 C 598 1206 628 1185 651 1179 C 683 1169 690 1162 690 1142 C 690 1105 759 1040 799 1040 C 827 1040 830 1037 830 1009 C 830 986 840 967 869 939 C 904 903 912 900 961 900 C 1009 900 1018 896 1052 863 C 1073 843 1090 821 1090 815 C 1090 810 1020 735 935 650 L 780 495 L 495 780 C 338 937 210 1069 210 1075 C 210 1084 510 1390 519 1390 C 521 1390 531 1383 541 1374 Z M 728 1293 C 731 1272 727 1270 691 1270 C 649 1270 634 1281 644 1306 C 648 1317 661 1320 687 1318 C 718 1316 726 1311 728 1293 Z M 864 1169 C 869 1165 870 1154 866 1145 C 857 1121 786 1128 782 1154 C 780 1164 784 1176 791 1181 C 806 1190 849 1183 864 1169 Z M 1004 1030 C 1022 1012 1001 990 965 990 C 928 990 913 1007 924 1036 C 929 1048 938 1050 962 1045 C 980 1041 999 1034 1004 1030 Z M 539 634 C 564 594 571 574 566 554 C 562 540 553 530 545 532 C 538 534 457 603 367 685 C 181 853 160 883 160 976 L 160 1035 L 333 862 C 429 766 521 664 539 634 Z M 1140 885 C 1161 860 1141 854 1118 878 C 1100 896 1099 900 1112 900 C 1120 900 1133 893 1140 885 Z M 1385 753 C 1332 740 1312 679 1350 645 C 1364 632 1379 629 1405 633 L 1440 639 L 1426 612 C 1382 527 1255 384 1155 309 C 1089 259 1078 230 1111 194 C 1123 181 1141 170 1151 170 C 1194 170 1412 371 1488 483 C 1554 578 1576 661 1550 711 C 1528 750 1454 770 1385 753 Z" android:strokeWidth="1"/>
<path android:name="path_1" android:fillColor="#000" android:pathData="M 1180 633 C 1166 624 1120 587 1077 551 C 928 427 830 277 830 175 C 830 128 834 119 861 96 C 878 82 904 70 919 70 C 956 70 1030 109 1054 143 L 1074 170 L 1053 198 C 1037 219 1025 225 997 224 L 961 223 L 980 260 C 1012 323 1089 409 1169 471 C 1286 563 1290 567 1290 593 C 1290 644 1228 666 1180 633 Z" android:strokeWidth="1"/>
</group>
</vector>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:name="vector" android:tint="?android:attr/colorControlNormal" android:height="1610dp" android:width="1610dp" android:viewportWidth="1610" android:viewportHeight="1610">
<group android:name="group">
<path android:name="path" android:fillColor="#000" android:pathData="M 977 1350 C 956 1344 926 1333 910 1325 C 894 1317 870 1310 856 1310 C 798 1310 750 1264 750 1208 C 750 1193 711 1146 625 1060 C 512 946 500 930 500 898 C 500 878 509 852 520 837 C 546 804 546 799 509 764 C 445 704 433 642 475 592 C 497 566 498 559 489 531 C 468 471 512 410 577 410 C 595 410 610 405 610 400 C 610 394 621 378 635 365 C 653 346 670 340 704 340 C 740 340 750 336 755 320 C 758 309 773 291 787 280 C 811 261 827 260 1027 260 L 1242 260 L 1271 289 C 1299 317 1300 323 1300 404 C 1300 489 1300 490 1325 490 C 1339 490 1358 498 1368 508 C 1388 528 1391 561 1406 907 C 1414 1085 1405 1121 1340 1185 C 1318 1207 1300 1229 1300 1236 C 1300 1262 1261 1293 1192 1321 C 1110 1353 1034 1364 977 1350 Z M 1150 1269 C 1202 1243 1297 1154 1326 1104 L 1352 1059 L 1341 827 C 1335 699 1330 585 1330 573 C 1330 545 1301 542 1272 568 C 1257 580 1246 610 1234 670 C 1214 776 1200 800 1158 800 C 1129 800 1102 776 924 599 C 760 436 718 399 699 402 C 683 404 674 413 672 429 C 669 449 701 485 846 631 C 999 785 1022 811 1011 824 C 1003 833 993 840 987 840 C 981 840 892 756 789 654 C 638 504 598 469 579 472 C 562 474 554 482 552 500 C 550 521 582 557 735 710 C 837 812 920 900 920 906 C 920 912 913 923 905 930 C 891 941 866 920 726 782 C 637 693 557 620 549 620 C 530 620 510 640 510 659 C 510 668 583 748 672 837 C 811 977 832 1001 821 1014 C 813 1023 802 1030 796 1030 C 790 1030 746 992 700 945 C 632 877 610 860 590 862 C 572 864 564 872 561 890 C 559 911 586 942 731 1083 C 827 1176 919 1259 935 1268 C 1000 1302 1084 1303 1150 1269 Z M 1170 683 C 1191 576 1200 554 1230 525 C 1257 499 1260 490 1260 433 L 1260 370 L 1030 370 C 854 370 800 373 800 382 C 800 395 1139 740 1152 740 C 1155 740 1164 714 1170 683 Z M 407 1243 C 403 1240 400 1223 400 1206 C 400 1181 412 1162 458 1117 C 516 1059 552 1046 578 1072 C 603 1097 590 1131 533 1191 C 488 1239 471 1250 445 1250 C 428 1250 410 1247 407 1243 Z M 317 1142 C 307 1132 300 1115 300 1104 C 300 1078 420 960 446 960 C 475 960 490 979 490 1015 C 490 1041 479 1058 431 1103 C 368 1163 343 1171 317 1142 Z" android:strokeWidth="1"/>
<path android:name="path_1" android:fillColor="#000" android:pathData="M 217 1042 C 207 1032 200 1015 200 1005 C 200 995 246 941 302 884 C 390 794 408 780 437 780 C 473 780 495 807 485 839 C 476 868 275 1060 253 1060 C 242 1060 226 1052 217 1042 Z" android:strokeWidth="1"/>
</group>
</vector>

View File

@@ -1,20 +0,0 @@
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M 10,9C 10,8.4477 10.4477,8 11,8C 11.5523,8 12,8.4477 12,9L 12,13.47L 13.21,13.6L 18.15,15.79C 18.6759,16.0317 19.0093,16.5613 19,17.14L 19,21.5C 18.974,22.3174 18.3174,22.974 17.5,23L 11,23C 10.6216,23.0009 10.2596,22.8453 10,22.57L 5.1,18.37L 5.84,17.6C 6.03083,17.3942 6.29936,17.2781 6.58,17.28L 6.8,17.28L 10,19L 10,9 Z M 11,5C 13.2091,5 15,6.79086 15,9C 15,10.4806 14.1956,11.7733 13,12.4649L 13,11.2361C 13.6137,10.6868 14,9.8885 14,9.00001C 14,7.34315 12.6568,6.00001 11,6.00001C 9.34314,6.00001 8,7.34315 8,9.00001C 8,9.88851 8.38625,10.6868 9,11.2361L 9,12.4649C 7.8044,11.7733 7,10.4806 7,9C 7,6.79086 8.79086,5 11,5 Z M 11,3C 14.3137,3 17,5.6863 17,9C 17,10.6993 16.2936,12.2336 15.1584,13.3253L 14.1554,12.8788C 15.2811,11.9619 16,10.5649 16,9C 16,6.23858 13.7614,4.00001 11,4.00001C 8.23857,4.00001 6,6.23858 6,9C 6,11.0503 7.23409,12.8124 9,13.584L 9,14.6586C 6.66961,13.8349 5,11.6124 5,9C 5,5.6863 7.68629,3 11,3 Z " />
</vector>

View File

@@ -1,20 +0,0 @@
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M 17.8075,4.4675C 17.73,4.4675 17.6513,4.4488 17.5787,4.4088C 15.6587,3.4175 13.9987,2.9978 12.0113,2.9978C 10.0288,2.9978 8.15,3.4713 6.44,4.4088C 6.20125,4.5413 5.89875,4.4488 5.76125,4.2087C 5.63,3.9695 5.7175,3.6625 5.9625,3.53C 7.8225,2.5205 9.85875,2.0025 12.0113,2.0025C 14.1412,2.0025 16.0012,2.4713 18.0425,3.52C 18.2913,3.6521 18.3788,3.95 18.2525,4.19C 18.1588,4.37 17.9887,4.4675 17.8075,4.4675 Z M 3.50125,9.7212C 3.39875,9.7212 3.30125,9.6925 3.2075,9.6287C 2.97875,9.4675 2.93,9.16 3.09125,8.9312C 4.0825,7.5287 5.34125,6.4313 6.84125,5.6588C 9.98,4.0375 13.9987,4.0287 17.1488,5.65C 18.6525,6.4212 19.9125,7.51 20.8984,8.9012C 21.06,9.1213 21.0107,9.4388 20.7813,9.6C 20.5518,9.7612 20.2393,9.7125 20.0787,9.4825C 19.18,8.2175 18.0425,7.2312 16.69,6.5375C 13.8188,5.0687 10.1512,5.0687 7.29,6.5475C 5.9275,7.2512 4.79,8.2525 3.89125,9.5112C 3.80875,9.6488 3.6625,9.7212 3.50125,9.7212 Z M 9.75125,21.7925C 9.61875,21.7925 9.4925,21.7388 9.4,21.64C 8.53,20.7712 8.06125,20.21 7.3875,18.9988C 6.69875,17.7687 6.3375,16.27 6.3375,14.6588C 6.3375,11.69 8.88125,9.2675 12.0025,9.2675C 15.1225,9.2675 17.6612,11.69 17.6612,14.6588C 17.6612,14.9412 17.4413,15.1613 17.1587,15.1613C 16.88,15.1613 16.66,14.9412 16.66,14.6588C 16.66,12.2413 14.57,10.2688 12.0025,10.2688C 9.42875,10.2688 7.33875,12.2413 7.33875,14.6588C 7.33875,16.0988 7.66125,17.4313 8.27125,18.5113C 8.91125,19.6588 9.35,20.1512 10.1225,20.9275C 10.3075,21.1275 10.3075,21.44 10.1225,21.64C 10.01,21.7388 9.8775,21.7925 9.75125,21.7925 Z M 16.9188,19.9412C 15.7325,19.9412 14.6775,19.6388 13.8188,19.0475C 12.3287,18.0425 11.44,16.4012 11.44,14.6588C 11.44,14.38 11.66,14.16 11.9388,14.16C 12.2212,14.16 12.4413,14.38 12.4413,14.6588C 12.4413,16.0687 13.1587,17.4025 14.38,18.2175C 15.0875,18.7013 15.9175,18.9312 16.9188,18.9312C 17.1587,18.9312 17.5587,18.9012 17.9587,18.8275C 18.2325,18.7787 18.4912,18.96 18.54,19.2388C 18.5888,19.5112 18.4087,19.77 18.13,19.8187C 17.5587,19.9313 17.06,19.9412 16.9188,19.9412 Z M 14.9125,22.0025C 14.8688,22.0025 14.8187,21.9925 14.78,21.9825C 13.1888,21.5375 12.1488,20.9525 11.06,19.8775C 9.65875,18.4913 8.89125,16.64 8.89125,14.6588C 8.89125,13.0425 10.2688,11.7188 11.9675,11.7188C 13.6725,11.7188 15.0487,13.0425 15.0487,14.6588C 15.0487,15.7325 15.9813,16.6013 17.1288,16.6013C 18.2813,16.6013 19.2087,15.7325 19.2087,14.6588C 19.2087,10.8887 15.9625,7.8325 11.9575,7.8325C 9.12125,7.8325 6.51875,9.4087 5.35125,11.86C 4.96125,12.6713 4.76125,13.6187 4.76125,14.6588C 4.76125,15.44 4.82875,16.67 5.43,18.2712C 5.5325,18.53 5.4,18.8188 5.14125,18.9113C 4.8775,19.0087 4.59,18.8725 4.5025,18.6187C 4.00875,17.31 3.77,16.0113 3.77,14.6588C 3.77,13.4625 3.99875,12.3687 4.44875,11.4213C 5.78125,8.6275 8.73,6.8212 11.9575,6.8212C 16.5088,6.8212 20.21,10.3325 20.21,14.6487C 20.21,16.27 18.8287,17.5875 17.1288,17.5875C 15.43,17.5875 14.0475,16.27 14.0475,14.6487C 14.0475,13.5788 13.12,12.71 11.9675,12.71C 10.82,12.71 9.8875,13.5788 9.8875,14.6487C 9.8875,16.3625 10.5513,17.9587 11.7575,19.16C 12.71,20.0975 13.6188,20.62 15.0288,21.0113C 15.2975,21.0788 15.4488,21.3625 15.3813,21.6213C 15.3325,21.85 15.1225,22.0025 14.9125,22.0025 Z " />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -1,9 +0,0 @@
<!-- drawable/ic_hand.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M6.58,19H14.58V22H6.58V19M19.74,11.6C19.55,11.4 19.29,11.28 19,11.28L18.78,11.31L15.58,13V11.83L16.09,2.9C16.12,2.35 15.7,1.87 15.15,1.84C14.6,1.81 14.12,2.23 14.09,2.78L13.82,7.47H13.58L12.54,7.58V2A1,1 0 0,0 11.54,1C11,1 10.54,1.45 10.54,2V8.41L9.72,8.78L9.03,3.32C8.96,2.77 8.46,2.38 7.91,2.45C7.36,2.5 6.97,3 7.04,3.57L7.81,9.63L7.43,9.8C7.3,9.85 7.18,9.93 7.07,10L5.97,6.11C5.81,5.54 5.25,5.2 4.71,5.34C4.18,5.5 3.88,6.08 4.04,6.65L6.61,15.77C6.61,15.8 6.63,15.84 6.64,15.87L6.67,16H6.68C6.9,16.57 7.47,17 8.08,17H14.58C14.97,17 15.32,16.84 15.58,16.57L20.5,12.37L19.74,11.6Z" />
</vector>

View File

@@ -1,9 +0,0 @@
<!-- drawable/ic_pickup.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M9.64,13.4C8.63,12.5 7.34,12.03 6,12V15L2,11L6,7V10C7.67,10 9.3,10.57 10.63,11.59C10.22,12.15 9.89,12.76 9.64,13.4M18,15V12C17.5,12 13.5,12.16 13.05,16.2C14.61,16.75 15.43,18.47 14.88,20.03C14.33,21.59 12.61,22.41 11.05,21.86C9.5,21.3 8.67,19.59 9.22,18.03C9.5,17.17 10.2,16.5 11.05,16.2C11.34,12.61 14.4,9.88 18,10V7L22,11L18,15M13,19A1,1 0 0,0 12,18A1,1 0 0,0 11,19A1,1 0 0,0 12,20A1,1 0 0,0 13,19M11,11.12C11.58,10.46 12.25,9.89 13,9.43V5H16L12,1L8,5H11V11.12Z" />
</vector>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="1000.000000"
android:viewportHeight="1000.000000"
android:tint="?android:attr/colorControlNormal">
<group
android:translateY="1000.000000"
android:scaleX="0.100000"
android:scaleY="-0.100000">
<path
android:fillColor="#FFFFFFFF"
android:strokeWidth="1"
android:pathData="M3022 9600 c-109 -29 -187 -74 -272 -160 -87 -86 -131 -163 -160 -276 -20 -76 -20
-127 -20 -4094 0 -3967 0 -4018 20 -4094 29 -113 73 -190 160 -276 86 -87 163 -131
276 -160 75 -20 117 -20 1849 -20 1732 0 1774 0 1849 20 113 29 190 73 276 160 87
86 131 163 160 276 20 76 20 127 20 4094 0 3967 0 4018 -20 4094 -29 113 -73 190
-160 276 -86 87 -163 131 -276 160 -75 20 -116 20 -1853 19 -1716 0 -1778 -1 -1849
-19z m1943 -2149 c51 -23 93 -65 116 -116 14 -31 19 -65 19 -150 l0 -110 83 -19
c227 -50 446 -169 623 -338 195 -187 315 -391 387 -658 l32 -115 3 -785 2 -785 363
-357 362 -357 -2075 0 -2075 0 352 347 352 347 3 795 3 795 32 115 c72 267 192 471
387 658 177 169 396 288 624 338 l82 19 0 110 c0 85 5 119 19 150 38 84 117 135
211 135 32 0 72 -8 95 -19z m415 -4018 c-1 -27 -32 -118 -60 -172 -60 -119 -188
-221 -325 -257 -27 -8 -86 -14 -130 -14 -95 0 -157 15 -244 60 -119 60 -221 188
-257 325 -8 28 -14 53 -14 58 0 4 232 7 515 7 283 0 515 -3 515 -7z" />
</group>
</vector>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path android:fillColor="#FFFFFFFF" android:pathData="M11.83,1.73C8.43,1.79 6.23,3.32 6.23,3.32C5.95,3.5 5.88,3.91 6.07,4.19C6.27,4.5 6.66,4.55 6.96,4.34C6.96,4.34 11.27,1.15 17.46,4.38C17.75,4.55 18.14,4.45 18.31,4.15C18.5,3.85 18.37,3.47 18.03,3.28C16.36,2.4 14.78,1.96 13.36,1.8C12.83,1.74 12.32,1.72 11.83,1.73M12.22,4.34C6.26,4.26 3.41,9.05 3.41,9.05C3.22,9.34 3.3,9.72 3.58,9.91C3.87,10.1 4.26,10 4.5,9.68C4.5,9.68 6.92,5.5 12.2,5.59C17.5,5.66 19.82,9.65 19.82,9.65C20,9.94 20.38,10.04 20.68,9.87C21,9.69 21.07,9.31 20.9,9C20.9,9 18.15,4.42 12.22,4.34M11.5,6.82C9.82,6.94 8.21,7.55 7,8.56C4.62,10.53 3.1,14.14 4.77,19C4.88,19.33 5.24,19.5 5.57,19.39C5.89,19.28 6.07,18.92 5.95,18.6V18.6C4.41,14.13 5.78,11.2 7.8,9.5C9.77,7.89 13.25,7.5 15.84,9.1C17.11,9.9 18.1,11.28 18.6,12.64C19.11,14 19.08,15.32 18.67,15.94C18.25,16.59 17.4,16.83 16.65,16.64C15.9,16.45 15.29,15.91 15.26,14.77C15.23,13.06 13.89,12 12.5,11.84C11.16,11.68 9.61,12.4 9.21,14C8.45,16.92 10.36,21.07 14.78,22.45C15.11,22.55 15.46,22.37 15.57,22.04C15.67,21.71 15.5,21.35 15.15,21.25C11.32,20.06 9.87,16.43 10.42,14.29C10.66,13.33 11.5,13 12.38,13.08C13.25,13.18 14,13.7 14,14.79C14.05,16.43 15.12,17.54 16.34,17.85C17.56,18.16 18.97,17.77 19.72,16.62C20.5,15.45 20.37,13.8 19.78,12.21C19.18,10.61 18.07,9.03 16.5,8.04C14.96,7.08 13.19,6.7 11.5,6.82M11.86,9.25V9.26C10.08,9.32 8.3,10.24 7.28,12.18C5.96,14.67 6.56,17.21 7.44,19.04C8.33,20.88 9.54,22.1 9.54,22.1C9.78,22.35 10.17,22.35 10.42,22.11C10.67,21.87 10.67,21.5 10.43,21.23C10.43,21.23 9.36,20.13 8.57,18.5C7.78,16.87 7.3,14.81 8.38,12.77C9.5,10.67 11.5,10.16 13.26,10.67C15.04,11.19 16.53,12.74 16.5,15.03C16.46,15.38 16.71,15.68 17.06,15.7C17.4,15.73 17.7,15.47 17.73,15.06C17.79,12.2 15.87,10.13 13.61,9.47C13.04,9.31 12.45,9.23 11.86,9.25M12.08,14.25C11.73,14.26 11.46,14.55 11.47,14.89C11.47,14.89 11.5,16.37 12.31,17.8C13.15,19.23 14.93,20.59 18.03,20.3C18.37,20.28 18.64,20 18.62,19.64C18.6,19.29 18.3,19.03 17.91,19.06C15.19,19.31 14.04,18.28 13.39,17.17C12.74,16.07 12.72,14.88 12.72,14.88C12.72,14.53 12.44,14.25 12.08,14.25Z" />
</vector>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="32.0"
android:viewportHeight="32.0"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#FF000000"
android:pathData="M20,20.2V24H6V5.3h8.7l2.4,-4H7.6c-2.2,0 -4,1.8 -4,4v21.3c0,2.2 1.8,4 4,4h10.7c2.2,0 4,-1.8 4,-4V14.9L20,20.2zM15.6,28h-5.3v-1.3h5.3V28z"/>
<path
android:fillColor="#FF000000"
android:pathData="M28.5,7l1.1,-2.4L32,3.5l-2.4,-1.1L28.5,0l-1.1,2.4L25,3.5l2.4,1.1L28.5,7zM21,7.4l-2.2,-4.8l-2.2,4.8l-4.8,2.2l4.8,2.2l2.2,4.8l2.2,-4.8l4.8,-2.2L21,7.4zM28.5,12.2l-1.1,2.4L25,15.6l2.4,1.1l1.1,2.4l1.1,-2.4l2.4,-1.1l-2.4,-1.1L28.5,12.2z"/>
</vector>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="32.0"
android:viewportHeight="32.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M20,20.2V24H6V5.3h8.7l2.4,-4H7.6c-2.2,0 -4,1.8 -4,4v21.3c0,2.2 1.8,4 4,4h10.7c2.2,0 4,-1.8 4,-4V14.9L20,20.2zM15.6,28h-5.3v-1.3h5.3V28z"/>
<path
android:fillColor="#FFFFFFFF"
android:pathData="M28.5,7l1.1,-2.4L32,3.5l-2.4,-1.1L28.5,0l-1.1,2.4L25,3.5l2.4,1.1L28.5,7zM21,7.4l-2.2,-4.8l-2.2,4.8l-4.8,2.2l4.8,2.2l2.2,4.8l2.2,-4.8l4.8,-2.2L21,7.4zM28.5,12.2l-1.1,2.4L25,15.6l2.4,1.1l1.1,2.4l1.1,-2.4l2.4,-1.1l-2.4,-1.1L28.5,12.2z"/>
</vector>

View File

@@ -1,22 +0,0 @@
<!--
Copyright (C) 2016 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M9,11.24L9,7.5C9,6.12 10.12,5 11.5,5S14,6.12 14,7.5v3.74c1.21,-0.81 2,-2.18 2,-3.74C16,5.01 13.99,3 11.5,3S7,5.01 7,7.5c0,1.56 0.79,2.93 2,3.74zM18.84,15.87l-4.54,-2.26c-0.17,-0.07 -0.35,-0.11 -0.54,-0.11L13,13.5v-6c0,-0.83 -0.67,-1.5 -1.5,-1.5S10,6.67 10,7.5v10.74l-3.43,-0.72c-0.08,-0.01 -0.15,-0.03 -0.24,-0.03 -0.31,0 -0.59,0.13 -0.79,0.33l-0.79,0.8 4.94,4.94c0.27,0.27 0.65,0.44 1.06,0.44h6.79c0.75,0 1.33,-0.55 1.44,-1.28l0.75,-5.27c0.01,-0.07 0.02,-0.14 0.02,-0.2 0,-0.62 -0.38,-1.16 -0.91,-1.38z"/>
</vector>

View File

@@ -1,20 +0,0 @@
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M 10,9C 10,8.4477 10.4477,8 11,8C 11.5523,8 12,8.4477 12,9L 12,13.47L 13.21,13.6L 18.15,15.79C 18.6759,16.0317 19.0093,16.5613 19,17.14L 19,21.5C 18.974,22.3174 18.3174,22.974 17.5,23L 11,23C 10.6216,23.0009 10.2596,22.8453 10,22.57L 5.1,18.37L 5.84,17.6C 6.03083,17.3942 6.29936,17.2781 6.58,17.28L 6.8,17.28L 10,19L 10,9 Z M 3,4L 6,7L 6,5L 12,5L 12,3L 6,3L 6,1L 3,4 Z " />
</vector>

View File

@@ -1,20 +0,0 @@
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M 10,9C 10,8.4477 10.4477,8 11,8C 11.5523,8 12,8.4477 12,9L 12,13.47L 13.21,13.6L 18.15,15.79C 18.6759,16.0317 19.0093,16.5613 19,17.14L 19,21.5C 18.974,22.3174 18.3174,22.974 17.5,23L 11,23C 10.6216,23.0009 10.2596,22.8453 10,22.57L 5.1,18.37L 5.84,17.6C 6.03083,17.3942 6.29936,17.2781 6.58,17.28L 6.8,17.28L 10,19L 10,9 Z M 12,4L 9,1L 9,3L 3,3L 3,5L 9,5L 9,7L 12,4 Z " />
</vector>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorControlNormal" >
<path
android:fillColor="#000"
android:pathData="M 10,9C 10,8.4477 10.4477,8 11,8C 11.5523,8 12,8.4477 12,9L 12,13.47L 13.21,13.6L 18.15,15.79C 18.6759,16.0317 19.0093,16.5613 19,17.14L 19,21.5C 18.974,22.3174 18.3174,22.974 17.5,23L 11,23C 10.6216,23.0009 10.2596,22.8453 10,22.57L 5.1,18.37L 5.84,17.6C 6.03083,17.3942 6.29936,17.2781 6.58,17.28L 6.8,17.28L 10,19L 10,9 Z M 11,5C 13.2091,5 15,6.79086 15,9C 15,10.4806 14.1956,11.7733 13,12.4649L 13,11.2361C 13.6137,10.6868 14,9.8885 14,9C 14,7.34315 12.6569,6 11,6C 9.34315,6 8,7.34315 8,9C 8,9.8885 8.38625,10.6868 9,11.2361L 9,12.4649C 7.8044,11.7733 7,10.4806 7,9C 7,6.79086 8.79086,5 11,5 Z "/>
</vector>

View File

@@ -1,20 +0,0 @@
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M 10,9C 10,8.45 10.45,8 11,8C 11.55,8 12,8.45 12,9L 12,13.47L 13.21,13.6L 18.15,15.79C 18.68,16.03 19,16.56 19,17.14L 19,21.5C 18.97,22.32 18.32,22.97 17.5,23L 11,23C 10.62,23 10.26,22.85 10,22.57L 5.1,18.37L 5.84,17.6C 6.03,17.39 6.3,17.28 6.58,17.28L 6.8,17.28L 10,19L 10,9 Z M 9,12.441L 9,9C 9,7.897 9.897,7 11,7C 12.103,7 13,7.897 13,9L 13,12.441C 14.188,11.746 15,10.469 15,9C 15,6.8 13.2,5 11,5C 8.8,5 7,6.8 7,9C 7,10.469 7.812,11.746 9,12.441 Z " />
</vector>

View File

@@ -1,20 +0,0 @@
<!--
Copyright (c) google/material-design-icons
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M 16,19L 8,19L 8,5L 16,5M 16.5,3L 7.5,3C 6.67,3 6,3.67 6,4.5L 6,19.5C 6,20.33 6.67,21 7.5,21L 16.5,21C 17.33,21 18,20.33 18,19.5L 18,4.5C 18,3.67 17.33,3 16.5,3 Z M 19,17L 21,17L 21,7L 19,7M 22,9L 22,15L 24,15L 24,9M 3,17L 5,17L 5,7L 3,7M 0,15L 2,15L 2,9L 0,9L 0,15 Z" />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2020, ronaxdevil <pratabidya.007@gmail.com>
**
** 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.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="match_parent">
<ImageView
android:id="@+id/motoactions_pic"
android:layout_width="match_parent"
android:layout_height="160dp"
android:scaleType="centerCrop"
android:src="@drawable/motoactions_png" />
</LinearLayout>

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2014, The Android Open Source Project
** Copyright 2020, ronaxdevil <pratabidya.007@gmail.com>
**
** 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.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="match_parent">
<ImageView
android:id="@+id/ambient_pic"
android:layout_width="match_parent"
android:layout_height="160dp"
android:scaleType="centerCrop"
android:src="@drawable/ambient_png" />
<include layout="@layout/switch_bar" />
</LinearLayout>

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2014, The Android Open Source Project
** Copyright 2020, ronaxdevil <pratabidya.007@gmail.com>
**
** 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.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="match_parent">
<ImageView
android:id="@+id/fpgesture_pic"
android:layout_width="match_parent"
android:layout_height="160dp"
android:scaleType="centerCrop"
android:src="@drawable/fpgesture_png" />
<include layout="@layout/switch_bar" />
</LinearLayout>

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 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.
-->
<!-- Based off frameworks/base/core/res/res/layout/preference_category_material.xml
except that this supports icon -->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" >
<LinearLayout
android:id="@+id/icon_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:orientation="horizontal">
<com.android.internal.widget.PreferenceImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="?android:attr/textColorPrimary"
android:maxWidth="18dp"
android:maxHeight="18dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="56dp"
android:orientation="vertical">
<TextView
android:id="@android:id/title"
android:layout_marginTop="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Material.Body2"
android:textColor="?android:attr/colorAccent"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"/>
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
android:ellipsize="end"
android:singleLine="true" />
</LinearLayout>
</FrameLayout>

View File

@@ -1,86 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<!-- Based off frameworks/base/core/res/res/layout/preference_material.xml
except that this has the negative margin on the image removed. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:gravity="center_vertical"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:background="?android:attr/selectableItemBackground"
android:clipToPadding="false">
<LinearLayout
android:id="@+id/icon_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="56dp"
android:gravity="start|center_vertical"
android:orientation="horizontal"
android:paddingEnd="12dp"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<com.android.internal.widget.PreferenceImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="48dp"
android:maxHeight="48dp"/>
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="12dp"
android:paddingBottom="12dp">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="24dp"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceListItem"
android:ellipsize="marquee"/>
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="24dp"
android:layout_below="@android:id/title"
android:layout_alignStart="@android:id/title"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
android:maxLines="10"/>
</RelativeLayout>
<!-- Preference should place its actual preference widget here. -->
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="end|center_vertical"
android:paddingStart="16dp"
android:orientation="vertical"/>
</LinearLayout>

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switch_bar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@drawable/switchbar_background"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:clickable="true"
android:gravity="center">
<TextView android:id="@+id/switch_text"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:paddingStart="48dp"
android:maxLines="2"
android:ellipsize="end"
android:textAppearance="@android:style/TextAppearance.Material.Title"
android:textColor="?android:attr/textColorPrimary"
android:textAlignment="viewStart"
android:text="@string/switch_bar_on" />
<Switch
android:id="@android:id/switch_widget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
android:theme="@style/MotoActions.SwitchBar" />
</LinearLayout>

View File

@@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013-2016 The CyanogenMod Project
(C) 2017 The LineageOS 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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Title and summary -->
<string name="moto_actions_title">Moto Ações</string>
<!-- Device gestures -->
<string name="device_gestures_title">Gestos do dispositivo</string>
<string name="device_gestures_summary">Gerenciar os gestos do dispositivo</string>
<!-- Ambient display gestures -->
<string name="ambient_display_manage_summary">Gerenciar os gestos da tela ambiente</string>
<!-- Fingerprint gestures -->
<string name="fingerprint_gestures_title">Gestos no sensor biométrico</string>
<string name="fingerprint_gestures_summary">Habilitar o uso de gestos no sensor biométrico</string>
<string name="fingerprint_gestures_manage_summary">Gerenciar os gestos do sensor biométrico</string>
<string name="fingerprint_actions_screenon">Ações com a tela ligada</string>
<string name="tap_title">Toque único</string>
<string name="tap_dlg_title">Selecione a ação para toque único</string>
<string name="double_tap_title">Toque duplo</string>
<string name="double_tap_dlg_title">Selecione a ação para toque duplo</string>
<string name="long_tap_title">Toque longo</string>
<string name="long_tap_dlg_title">Selecione a ação para toque longo</string>
<string name="touchscreen_swipe_left_title">Deslizar para a esquerda</string>
<string name="swipe_left_dlg_title">Selecione a ação para deslizar para a esquerda</string>
<string name="touchscreen_swipe_right_title">Deslizar para a direita</string>
<string name="swipe_right_dlg_title">Selecione a ação para deslizar para a direita</string>
<!-- Fingerprint gestures screen off -->
<string name="fingerprint_gestures_screenoff_title">Habilitar com a tela desligada</string>
<string name="fingerprint_gestures_screenoff_summary">Habilitar os gestos no sensor biométrico quando a tela estiver desligada.\n\nO desbloqueio por impressão digital deve estar desativado para usar esse recurso.</string>
<string name="fingerprint_actions_screenoff">Ações com a tela desligada</string>
<!-- Actions -->
<string name="action_none">Não fazer nada</string>
<string name="action_home">Início</string>
<string name="action_power">Ligar/desligar tela</string>
<string name="action_wake">Acordar o dispositivo</string>
<string name="action_back">Voltar</string>
<string name="action_recents">Recentes</string>
<string name="action_last_app">Último app</string>
<string name="action_volume_up">Aumentar volume</string>
<string name="action_volume_down">Diminuir volume</string>
<string name="action_voice_assistant">Assistente de voz</string>
<string name="action_play_pause">Tocar/pausar</string>
<string name="action_previous_track">Faixa anterior</string>
<string name="action_next_track">Próxima faixa</string>
<string name="action_flashlight">Ligar/desligar lanterna</string>
<string name="action_camera">Abrir câmera</string>
<string name="action_screenshot">Tirar uma captura de tela</string>
<string name="action_browser">Abrir navegador</string>
<string name="action_dialer">Abrir discador</string>
<string name="action_email">Abrir app de mail</string>
<string name="action_messages">Abrir app de mensagens</string>
<!-- Double tap to wake -->
<string name="tap_to_wake">Tocar para ativar</string>
<string name="tap_to_wake_summary">Toque duas vezes em qualquer parte da tela para ativar o dispositivo</string>
<!-- Screen off gestures haptic feedback -->
<string name="touchscreen_gesture_haptic_feedback">Retorno tátil</string>
<string name="touchscreen_gesture_haptic_feedback_summary">Vibrar quando um gesto for detectado</string>
</resources>

View File

@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 The LineageOS 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.
-->
<resources>
<string-array name="fp_keys_listArray">
<item>@string/action_none</item>
<item>@string/action_home</item>
<item>@string/action_power</item>
<item>@string/action_back</item>
<item>@string/action_recents</item>
<item>@string/action_last_app</item>
<item>@string/action_volume_up</item>
<item>@string/action_volume_down</item>
<item>@string/action_voice_assistant</item>
<item>@string/action_play_pause</item>
<item>@string/action_previous_track</item>
<item>@string/action_next_track</item>
<item>@string/action_flashlight</item>
<item>@string/action_camera</item>
<item>@string/action_screenshot</item>
</string-array>
<string-array name="fp_keys_listValues">
<item>0</item>
<item>100</item> <!-- home -->
<item>101</item> <!-- power -->
<item>102</item> <!-- back -->
<item>103</item> <!-- recents -->
<item>121</item> <!-- last app -->
<item>104</item> <!-- volume up -->
<item>105</item> <!-- volume down -->
<item>106</item> <!-- voice assistant -->
<item>107</item> <!-- play/pause -->
<item>108</item> <!-- previous track -->
<item>109</item> <!-- next track -->
<item>110</item> <!-- flashlight -->
<item>111</item> <!-- camera -->
<item>112</item> <!-- screenshot -->
</string-array>
<string-array name="fp_keys_screen_off_listArray">
<item>@string/action_none</item>
<item>@string/action_power</item>
<item>@string/action_volume_up</item>
<item>@string/action_volume_down</item>
<item>@string/action_play_pause</item>
<item>@string/action_previous_track</item>
<item>@string/action_next_track</item>
<item>@string/action_flashlight</item>
<item>@string/action_camera</item>
</string-array>
<string-array name="fp_keys_screen_off_listValues">
<item>0</item>
<item>101</item> <!-- power -->
<item>104</item> <!-- volume up -->
<item>105</item> <!-- volume down -->
<item>107</item> <!-- play/pause -->
<item>108</item> <!-- previous track -->
<item>109</item> <!-- next track -->
<item>110</item> <!-- flashlight -->
<item>111</item> <!-- camera -->
</string-array>
</resources>

View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The CyanogenMod Project
Copyright (C) 2017 The LineageOS 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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<style name="MotoActions" parent="@android:style/Theme.DeviceDefault.Settings">
<item name="dialogPreferenceStyle">@style/MotoActions.DialogPreferenceStyle</item>
<item name="preferenceCategoryStyle">@style/MotoActions.PreferenceCategoryStyle</item>
<item name="preferenceFragmentStyle">@style/MotoActions.PreferenceFragmentStyle</item>
<item name="preferenceStyle">@style/MotoActions.PreferenceStyle</item>
<item name="preferenceTheme">@style/MotoActions.PreferenceTheme</item>
<item name="switchPreferenceStyle">@style/MotoActions.SwitchPreferenceStyle</item>
</style>
<style name="MotoActions.DialogPreferenceStyle" parent="@style/MotoActions.PreferenceStyle">
</style>
<style name="MotoActions.PreferenceCategoryStyle" parent="@*android:style/Preference.DeviceDefault.Category">
<item name="allowDividerAbove">true</item>
<item name="allowDividerBelow">true</item>
<item name="android:layout">@layout/preference_category_material_settings</item>
</style>
<style name="MotoActions.PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
<item name="allowDividerAfterLastItem">false</item>
</style>
<style name="MotoActions.PreferenceStyle" parent="@*android:style/Preference.DeviceDefault">
<item name="allowDividerAbove">false</item>
<item name="allowDividerBelow">false</item>
<item name="singleLineTitle">false</item>
<item name="android:layout">@layout/preference_material_settings</item>
</style>
<style name="MotoActions.PreferenceTheme">
</style>
<style name="MotoActions.SwitchPreferenceStyle" parent="@style/MotoActions.PreferenceStyle">
<item name="widgetLayout">@*android:layout/preference_widget_switch</item>
</style>
<style name="MotoActions.SwitchBar" parent="@android:style/ThemeOverlay.Material.ActionBar">
</style>
</resources>

View File

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
Copyright (C) 2017 The LineageOS 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">
<SwitchPreference
android:key="gesture_camera_action"
android:defaultValue="true"
android:title="@string/camera_gesture_title"
android:summary="@string/camera_gesture_summary"
android:icon="@drawable/ic_actions_twist" />
<SwitchPreference
android:key="gesture_chop_chop"
android:defaultValue="true"
android:title="@string/chop_chop_gesture_title"
android:summary="@string/chop_chop_gesture_summary"
android:icon="@drawable/ic_actions_chop" />
<SwitchPreference
android:key="gesture_ir_silencer"
android:defaultValue="false"
android:title="@string/hand_wave_silencer_title"
android:summary="@string/hand_wave_silencer_summary"
android:icon="@drawable/ic_actions_wave" />
<SwitchPreference
android:key="gesture_flip_to_mute"
android:defaultValue="false"
android:title="@string/flip_to_mute_title"
android:summary="@string/flip_to_mute_summary"
android:icon="@drawable/ic_actions_flip" />
<SwitchPreference
android:key="gesture_lift_to_silence"
android:defaultValue="false"
android:title="@string/lift_to_silence_title"
android:summary="@string/lift_to_silence_summary"
android:icon="@drawable/ic_actions_lift" />
</PreferenceScreen>

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 The LineageOS 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">
<SwitchPreference
android:key="gesture_pick_up"
android:defaultValue="true"
android:title="@string/pick_up_gesture_title"
android:summary="@string/pick_up_gesture_summary"
android:icon="@drawable/ic_pickup" />
<SwitchPreference
android:key="gesture_hand_wave"
android:defaultValue="false"
android:title="@string/hand_wave_gesture_title"
android:summary="@string/hand_wave_gesture_summary"
android:icon="@drawable/ic_hand" />
</PreferenceScreen>

View File

@@ -1,157 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
Copyright (C) 2017-2019 The LineageOS 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">
<SwitchPreference
android:key="fp_home_scr_off"
android:enabled="false"
android:title="@string/fingerprint_gestures_screenoff_title"
android:icon="@drawable/ic_fingerprint"
android:summary="@string/fingerprint_gestures_screenoff_summary" />
<PreferenceCategory
android:key="fp_keys_scr_on"
android:title="@string/fingerprint_actions_screenon" >
<SwitchPreference
android:key="fp_haptic"
android:defaultValue="0"
android:icon="@drawable/ic_vibrate"
android:title="@string/touchscreen_gesture_haptic_feedback"
android:summary="@string/touchscreen_gesture_haptic_feedback_summary" />
<ListPreference
android:title="@string/tap_title"
android:summary="%s"
android:dialogTitle="@string/tap_dlg_title"
android:key="fp_keys"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:icon="@drawable/ic_tap"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:title="@string/double_tap_title"
android:summary="%s"
android:dialogTitle="@string/double_tap_dlg_title"
android:key="fp_key_dbltap"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:icon="@drawable/ic_double_tap"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:title="@string/long_tap_title"
android:summary="%s"
android:dialogTitle="@string/long_tap_dlg_title"
android:key="fp_key_hold"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:icon="@drawable/ic_tap_hold"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:title="@string/touchscreen_swipe_left_title"
android:summary="%s"
android:dialogTitle="@string/swipe_left_dlg_title"
android:key="fp_key_left"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:icon="@drawable/ic_swipe_left"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:title="@string/touchscreen_swipe_right_title"
android:summary="%s"
android:dialogTitle="@string/swipe_right_dlg_title"
android:key="fp_key_right"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:icon="@drawable/ic_swipe_right"
android:entryValues="@array/fp_keys_listValues" />
</PreferenceCategory>
<PreferenceCategory
android:key="fp_keys_scr_off"
android:title="@string/fingerprint_actions_screenoff"
android:enabled="false" >
<SwitchPreference
android:key="fp_haptic_scr_off"
android:dependency="fp_home_scr_off"
android:defaultValue="0"
android:icon="@drawable/ic_vibrate"
android:title="@string/touchscreen_gesture_haptic_feedback"
android:summary="@string/touchscreen_gesture_haptic_feedback_summary" />
<ListPreference
android:dependency="fp_home_scr_off"
android:title="@string/tap_title"
android:summary="%s"
android:dialogTitle="@string/tap_dlg_title"
android:key="fp_keys_off"
android:defaultValue="0"
android:entries="@array/fp_keys_screen_off_listArray"
android:icon="@drawable/ic_tap"
android:entryValues="@array/fp_keys_screen_off_listValues" />
<ListPreference
android:dependency="fp_home_scr_off"
android:title="@string/double_tap_title"
android:summary="%s"
android:dialogTitle="@string/double_tap_dlg_title"
android:key="fp_key_dbltap_off"
android:defaultValue="0"
android:entries="@array/fp_keys_screen_off_listArray"
android:icon="@drawable/ic_double_tap"
android:entryValues="@array/fp_keys_screen_off_listValues" />
<ListPreference
android:dependency="fp_home_scr_off"
android:title="@string/long_tap_title"
android:summary="%s"
android:dialogTitle="@string/long_tap_dlg_title"
android:key="fp_key_hold_off"
android:defaultValue="0"
android:entries="@array/fp_keys_screen_off_listArray"
android:icon="@drawable/ic_tap_hold"
android:entryValues="@array/fp_keys_screen_off_listValues" />
<ListPreference
android:dependency="fp_home_scr_off"
android:title="@string/touchscreen_swipe_left_title"
android:summary="%s"
android:dialogTitle="@string/swipe_left_dlg_title"
android:key="fp_key_left_off"
android:defaultValue="0"
android:entries="@array/fp_keys_screen_off_listArray"
android:icon="@drawable/ic_swipe_left"
android:entryValues="@array/fp_keys_screen_off_listValues" />
<ListPreference
android:dependency="fp_home_scr_off"
android:title="@string/touchscreen_swipe_right_title"
android:summary="%s"
android:dialogTitle="@string/swipe_right_dlg_title"
android:key="fp_key_right_off"
android:defaultValue="0"
android:entries="@array/fp_keys_screen_off_listArray"
android:icon="@drawable/ic_swipe_right"
android:entryValues="@array/fp_keys_screen_off_listValues" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
Copyright (C) 2017 The LineageOS 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">
<Preference
android:key="gestures"
android:title="@string/device_gestures_title"
android:summary="@string/device_gestures_summary"
android:icon="@drawable/ic_settings_gestures">
<intent
android:targetPackage="com.moto.actions"
android:targetClass="com.moto.actions.GestureSettingsActivity" />
</Preference>
<Preference
android:key="doze"
android:title="@string/ambient_display_title"
android:summary="@string/ambient_display_manage_summary"
android:icon="@drawable/ic_settings_doze">
<intent
android:targetPackage="com.moto.actions"
android:targetClass="com.moto.actions.DozeSettingsActivity" />
</Preference>
<Preference
android:key="fp_gestures"
android:title="@string/fingerprint_gestures_title"
android:summary="@string/fingerprint_gestures_manage_summary"
android:icon="@drawable/ic_settings_fingerprint">
<intent
android:targetPackage="com.moto.actions"
android:targetClass="com.moto.actions.FPGestureSettingsActivity" />
</Preference>
</PreferenceScreen>

View File

@@ -1,35 +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 com.moto.actions;
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class ActionsPreferenceActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getActionBar() != null) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new ActionsPreferenceFragment()).commit();
}
}

View File

@@ -1,40 +0,0 @@
/*
* Copyright (C) 2015-2016 The CyanogenMod Project
* Copyright (C) 2017 The LineageOS 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.moto.actions;
import android.os.Bundle;
import androidx.preference.PreferenceFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class ActionsPreferenceFragment extends PreferenceFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = LayoutInflater.from(getContext()).inflate(R.layout.actions, container, false);
((ViewGroup) view).addView(super.onCreateView(inflater, container, savedInstanceState));
return view;
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.main_panel);
}
}

View File

@@ -1,68 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.util.Log;
import com.moto.actions.actions.Constants;
import com.moto.actions.ServiceWrapper.LocalBinder;
public class BootCompletedReceiver extends BroadcastReceiver {
static final String TAG = "MotoActions";
final String NAVBAR_SHOWN = "navbar_shown";
private ServiceWrapper mServiceWrapper;
@Override
public void onReceive(final Context context, Intent intent) {
Log.i(TAG, "Booting");
if (intent.getAction() != null && !intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
return;
}
// Restore nodes to saved preference values
for (String pref : Constants.sPrefKeys) {
Constants.writePreference(context, pref);
}
context.startService(new Intent(context, ServiceWrapper.class));
}
private ServiceConnection serviceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName className, IBinder service) {
LocalBinder binder = (LocalBinder) service;
mServiceWrapper = binder.getService();
mServiceWrapper.start();
}
@Override
public void onServiceDisconnected(ComponentName className) {
mServiceWrapper = null;
}
};
}

View File

@@ -1,35 +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 com.moto.actions;
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class DozeSettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getActionBar() != null) {
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setTitle(R.string.ambient_display_title);
}
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new DozeSettingsFragment()).commit();
}
}

View File

@@ -1,101 +0,0 @@
/*
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import android.os.Bundle;
import androidx.preference.PreferenceFragment;
import android.provider.Settings;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
import android.view.MenuItem;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
public class DozeSettingsFragment extends PreferenceFragment {
private SwitchPreference mHandwavePreference;
private SwitchPreference mPickupPreference;
private TextView mSwitchBarText;
private Switch mAmbientDisplaySwitch;
private String KEY_GESTURE_HAND_WAVE = "gesture_hand_wave";
private String KEY_GESTURE_PICK_UP = "gesture_pick_up";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = LayoutInflater.from(getContext()).inflate(R.layout.doze, container, false);
((ViewGroup) view).addView(super.onCreateView(inflater, container, savedInstanceState));
return view;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
View switchBar = view.findViewById(R.id.switch_bar);
mAmbientDisplaySwitch = (Switch) switchBar.findViewById(android.R.id.switch_widget);
mAmbientDisplaySwitch.setChecked(MotoActionsSettings.isDozeEnabled(getActivity().getContentResolver()));
mAmbientDisplaySwitch.setOnCheckedChangeListener(mAmbientDisplayPrefListener);
switchBar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mAmbientDisplaySwitch.toggle();
}
});
mSwitchBarText = switchBar.findViewById(R.id.switch_text);
mSwitchBarText.setText(MotoActionsSettings.isDozeEnabled(getActivity().getContentResolver()) ? R.string.switch_bar_on :
R.string.switch_bar_off);
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.doze_panel);
boolean dozeEnabled = MotoActionsSettings.isDozeEnabled(getActivity().getContentResolver());
mHandwavePreference = (SwitchPreference) findPreference(KEY_GESTURE_HAND_WAVE);
mPickupPreference = (SwitchPreference) findPreference(KEY_GESTURE_PICK_UP);
updatePrefs(dozeEnabled);
}
private CompoundButton.OnCheckedChangeListener mAmbientDisplayPrefListener =
new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean enable) {
if (enableDoze(enable)) {
updatePrefs(enable);
mSwitchBarText.setText(enable ? R.string.switch_bar_on : R.string.switch_bar_off);
}
}
};
private void updatePrefs(boolean enabled){
mHandwavePreference.setEnabled(enabled);
mPickupPreference.setEnabled(enabled);
}
private boolean enableDoze(boolean enable) {
return Settings.Secure.putInt(getActivity().getContentResolver(),
Settings.Secure.DOZE_ENABLED, enable ? 1 : 0);
}
}

View File

@@ -1,37 +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 com.moto.actions;
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class FPGestureSettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getActionBar() != null) {
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setTitle(R.string.fingerprint_gestures_title);
}
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new FPGestureSettingsFragment()).commit();
}
}

View File

@@ -1,120 +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 com.moto.actions;
import android.app.ActionBar;
import android.os.Bundle;
import android.content.Context;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
import androidx.preference.PreferenceCategory;
import androidx.preference.SwitchPreference;
import android.hardware.fingerprint.FingerprintManager;
import androidx.preference.PreferenceFragment;
import android.view.MenuItem;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
import com.moto.actions.actions.Constants;
import static com.moto.actions.actions.Constants.FP_HOME_KEY;
import static com.moto.actions.actions.Constants.FP_HOME_KEY_OFF;
public class FPGestureSettingsFragment extends PreferenceFragment {
private SwitchPreference mFPScreenOffGesture;
private PreferenceCategory mFPScreenOffCategory;
private PreferenceCategory mFPScreenOnCategory;
private TextView mSwitchBarText;
private Switch mFPGestureSwitch;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = LayoutInflater.from(getContext()).inflate(R.layout.fp_gesture, container, false);
((ViewGroup) view).addView(super.onCreateView(inflater, container, savedInstanceState));
return view;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
View switchBar = view.findViewById(R.id.switch_bar);
mFPGestureSwitch = (Switch) switchBar.findViewById(android.R.id.switch_widget);
mFPGestureSwitch.setChecked(isFPGestureEnabled());
mFPGestureSwitch.setOnCheckedChangeListener(mFPGesturePrefListener);
switchBar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mFPGestureSwitch.toggle();
}
});
mSwitchBarText = switchBar.findViewById(R.id.switch_text);
mSwitchBarText.setText(isFPGestureEnabled() ? R.string.switch_bar_on :
R.string.switch_bar_off);
}
private void updatePrefs(boolean enabled){
Editor prefEditor = PreferenceManager.getDefaultSharedPreferences(getActivity()).edit();
prefEditor.putBoolean(FP_HOME_KEY, enabled);
prefEditor.apply();
mFPScreenOnCategory.setEnabled(enabled);
mFPScreenOffGesture.setEnabled(enabled);
mFPScreenOffCategory.setEnabled(enabled);
if(enabled){
boolean hasEnrolledFingerprints = hasEnrolledFingerprints();
mFPScreenOffGesture.setEnabled(!hasEnrolledFingerprints);
mFPScreenOffCategory.setEnabled(!hasEnrolledFingerprints);
}
}
private boolean isFPGestureEnabled(){
return Constants.isPreferenceEnabled(getActivity(), FP_HOME_KEY);
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.fp_gesture_panel);
mFPScreenOffGesture = (SwitchPreference) findPreference(FP_HOME_KEY_OFF);
mFPScreenOffCategory = (PreferenceCategory) findPreference("fp_keys_scr_off");
mFPScreenOnCategory = (PreferenceCategory) findPreference("fp_keys_scr_on");
updatePrefs(isFPGestureEnabled());
}
private CompoundButton.OnCheckedChangeListener mFPGesturePrefListener =
new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean enable) {
updatePrefs(enable);
mSwitchBarText.setText(enable ? R.string.switch_bar_on : R.string.switch_bar_off);
}
};
private boolean hasEnrolledFingerprints(){
FingerprintManager fingerprintManager = (FingerprintManager) getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
return fingerprintManager.hasEnrolledFingerprints();
}
}

View File

@@ -1,36 +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 com.moto.actions;
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class GestureSettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getActionBar() != null) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new GestureSettingsFragment()).commit();
}
}

View File

@@ -1,40 +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 com.moto.actions;
import android.os.Bundle;
import androidx.preference.PreferenceFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class GestureSettingsFragment extends PreferenceFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = LayoutInflater.from(getContext()).inflate(R.layout.gesture, container, false);
((ViewGroup) view).addView(super.onCreateView(inflater, container, savedInstanceState));
return view;
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.actions_panel);
}
}

View File

@@ -1,756 +0,0 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
* Copyright (C) 2017 The LineageOS 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.moto.actions;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
import android.app.ISearchManager;
import android.app.KeyguardManager;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.hardware.Sensor;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraManager;
import android.hardware.input.InputManager;
import android.media.AudioAttributes;
import android.media.session.MediaSessionLegacyHelper;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.provider.MediaStore;
import android.provider.Settings;
import android.util.Log;
import android.view.InputDevice;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.ViewConfiguration;
import com.android.internal.os.DeviceKeyHandler;
import com.android.internal.util.ArrayUtils;
import com.moto.actions.util.FileUtils;
import java.util.List;
import static com.moto.actions.actions.Constants.*;
public class KeyHandler implements DeviceKeyHandler {
private static final String TAG = KeyHandler.class.getSimpleName();
private static final int GESTURE_REQUEST = 1;
private static final int FP_ACTION_REQUEST = 2;
private static final String ACTION_DISMISS_KEYGUARD =
"com.android.keyguard.action.DISMISS_KEYGUARD_SECURELY";
private static final String GESTURE_WAKEUP_REASON = "keyhandler-gesture-wakeup";
private static final int GESTURE_WAKELOCK_DURATION = 3000;
private static final AudioAttributes VIBRATION_ATTRIBUTES = new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
.build();
private final Context mContext;
private final PowerManager mPowerManager;
WakeLock mGestureWakeLock;
private KeyguardManager mKeyguardManager;
private FPScreenOffGesturesHandler mFPScreenOffGesturesHandler;
private CameraManager mCameraManager;
private String mRearCameraId;
private boolean mTorchEnabled;
private Vibrator mVibrator;
private ISearchManager mSearchManagerService;
private Handler mHandler;
private int fpTapCounts = 0;
private boolean fpTapPending = false;
private boolean fpGesturePending = false;
private Runnable doubleTapRunnable = new Runnable() {
public void run() {
int action = 0;
if (fpTapCounts > 1) {
action = str2int(FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEY_DBLTAP_NODE)));
} else {
if (isSingleTapEnabledOnFP()) {
action = str2int(FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEYS_NODE)));
}
}
if (action != 0) {
boolean isActionSupported = ArrayUtils.contains(mPowerManager.isScreenOn() ? sFPSupportedActions : sFPSupportedActionsScreenOff, action);
if (isActionSupported) {
fireFPAction(action, true);
}
}
resetDoubleTapOnFP();
}
};
private Runnable fpGestureRunnable = new Runnable() {
public void run() {
resetFPGestureDelay();
}
};
public KeyHandler(Context context) {
mContext = context;
mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
mFPScreenOffGesturesHandler = new FPScreenOffGesturesHandler();
mGestureWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"GestureWakeLock");
mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
if (mVibrator == null || !mVibrator.hasVibrator()) {
mVibrator = null;
}
mCameraManager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE);
mCameraManager.registerTorchCallback(new MyTorchCallback(), null);
mHandler = new Handler(Looper.getMainLooper());
}
static long[] getLongIntArray(Resources r, int resid) {
int[] ar = r.getIntArray(resid);
if (ar == null) {
return null;
}
long[] out = new long[ar.length];
for (int i = 0; i < ar.length; i++) {
out[i] = ar[i];
}
return out;
}
private static ActivityInfo getRunningActivityInfo(Context context) {
final ActivityManager am = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVICE);
final PackageManager pm = context.getPackageManager();
List<ActivityManager.RunningTaskInfo> tasks = am.getRunningTasks(1);
if (tasks != null && !tasks.isEmpty()) {
ActivityManager.RunningTaskInfo top = tasks.get(0);
try {
return pm.getActivityInfo(top.topActivity, 0);
} catch (PackageManager.NameNotFoundException e) {
}
}
return null;
}
private static void dispatchMediaKeyWithWakeLock(int keycode, Context context) {
if (ActivityManagerNative.isSystemReady()) {
KeyEvent event = new KeyEvent(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN, keycode, 0);
MediaSessionLegacyHelper.getHelper(context).sendMediaButtonEvent(event, true);
event = KeyEvent.changeAction(event, KeyEvent.ACTION_UP);
MediaSessionLegacyHelper.getHelper(context).sendMediaButtonEvent(event, true);
}
}
private static void switchToLastApp(Context context) {
final ActivityManager am =
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager.RunningTaskInfo lastTask = getLastTask(context, am);
if (lastTask != null) {
am.moveTaskToFront(lastTask.id, ActivityManager.MOVE_TASK_NO_USER_ACTION);
}
}
private static ActivityManager.RunningTaskInfo getLastTask(Context context,
final ActivityManager am) {
final String defaultHomePackage = resolveCurrentLauncherPackage(context);
List<ActivityManager.RunningTaskInfo> tasks = am.getRunningTasks(5);
for (int i = 1; i < tasks.size(); i++) {
String packageName = tasks.get(i).topActivity.getPackageName();
if (!packageName.equals(defaultHomePackage)
&& !packageName.equals(context.getPackageName())
&& !packageName.equals("com.android.systemui")) {
return tasks.get(i);
}
}
return null;
}
private static String resolveCurrentLauncherPackage(Context context) {
final Intent launcherIntent = new Intent(Intent.ACTION_MAIN)
.addCategory(Intent.CATEGORY_HOME);
final PackageManager pm = context.getPackageManager();
final ResolveInfo launcherInfo = pm.resolveActivity(launcherIntent, 0);
return launcherInfo.activityInfo.packageName;
}
private String getRearCameraId() {
if (mRearCameraId == null) {
try {
for (final String cameraId : mCameraManager.getCameraIdList()) {
CameraCharacteristics characteristics =
mCameraManager.getCameraCharacteristics(cameraId);
int cOrientation = characteristics.get(CameraCharacteristics.LENS_FACING);
if (cOrientation == CameraCharacteristics.LENS_FACING_BACK) {
mRearCameraId = cameraId;
break;
}
}
} catch (CameraAccessException e) {
// Ignore
}
}
return mRearCameraId;
}
private Intent getLaunchableIntent(Intent intent) {
PackageManager pm = mContext.getPackageManager();
List<ResolveInfo> resInfo = pm.queryIntentActivities(intent, 0);
if (resInfo.isEmpty()) {
return null;
}
return pm.getLaunchIntentForPackage(resInfo.get(0).activityInfo.packageName);
}
private void triggerCameraAction() {
ensureKeyguardManager();
WakeLock wl = mPowerManager.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "GestureWakeLock");
wl.acquire(500);
if (mKeyguardManager.inKeyguardRestrictedInputMode()) {
launchSecureCamera();
} else {
launchCamera();
}
}
private void launchCamera() {
Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
if (getBestActivityInfo(intent) != null) {
// Only launch if we can succeed, but let the user pick the action
mContext.startActivity(intent);
}
}
private void launchSecureCamera() {
// Keyguard won't allow a picker, try to pick the secure intent in the package
// that would be the one used for a default action of launching the camera
Intent normalIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
normalIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
normalIntent.addFlags(Intent.FLAG_FROM_BACKGROUND);
Intent secureIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
secureIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
secureIntent.addFlags(Intent.FLAG_FROM_BACKGROUND);
ActivityInfo normalActivity = getBestActivityInfo(normalIntent);
ActivityInfo secureActivity = getBestActivityInfo(secureIntent, normalActivity);
if (secureActivity != null) {
secureIntent.setComponent(new ComponentName(secureActivity.applicationInfo.packageName, secureActivity.name));
mContext.startActivity(secureIntent);
}
}
private ActivityInfo getBestActivityInfo(Intent intent) {
PackageManager pm = mContext.getPackageManager();
ResolveInfo resolveInfo = pm.resolveActivity(intent, 0);
if (resolveInfo != null) {
return resolveInfo.activityInfo;
} else {
// If the resolving failed, just find our own best match
return getBestActivityInfo(intent, null);
}
}
private ActivityInfo getBestActivityInfo(Intent intent, ActivityInfo match) {
PackageManager pm = mContext.getPackageManager();
List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
ActivityInfo best = null;
if (activities.size() > 0) {
best = activities.get(0).activityInfo;
if (match != null) {
String packageName = match.applicationInfo.packageName;
for (int i = activities.size() - 1; i >= 0; i--) {
ActivityInfo activityInfo = activities.get(i).activityInfo;
if (packageName.equals(activityInfo.applicationInfo.packageName)) {
best = activityInfo;
}
}
}
}
return best;
}
private void openBrowser() {
mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
mPowerManager.wakeUp(SystemClock.uptimeMillis(), GESTURE_WAKEUP_REASON);
final Intent intent = getLaunchableIntent(
new Intent(Intent.ACTION_VIEW, Uri.parse("http:")));
startActivitySafely(intent);
}
private void openDialer() {
mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
mPowerManager.wakeUp(SystemClock.uptimeMillis(), GESTURE_WAKEUP_REASON);
final Intent intent = new Intent(Intent.ACTION_DIAL, null);
startActivitySafely(intent);
}
private void openEmail() {
mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
mPowerManager.wakeUp(SystemClock.uptimeMillis(), GESTURE_WAKEUP_REASON);
final Intent intent = getLaunchableIntent(
new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:")));
startActivitySafely(intent);
}
private void openMessages() {
mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
mPowerManager.wakeUp(SystemClock.uptimeMillis(), GESTURE_WAKEUP_REASON);
final String defaultApplication = Settings.Secure.getString(
mContext.getContentResolver(), "sms_default_application");
final PackageManager pm = mContext.getPackageManager();
final Intent intent = pm.getLaunchIntentForPackage(defaultApplication);
if (intent != null) {
startActivitySafely(intent);
}
}
private void toggleFlashlight() {
String rearCameraId = getRearCameraId();
if (rearCameraId != null) {
mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
try {
mCameraManager.setTorchMode(rearCameraId, !mTorchEnabled);
mTorchEnabled = !mTorchEnabled;
} catch (CameraAccessException e) {
// Ignore
}
}
}
private void ensureKeyguardManager() {
if (mKeyguardManager == null) {
mKeyguardManager =
(KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
}
}
private void resetDoubleTapOnFP() {
fpTapCounts = 0;
fpTapPending = false;
mHandler.removeCallbacks(doubleTapRunnable);
}
private void detectDoubleTapOnFP() {
fpTapCounts++;
if (fpTapCounts == 1 || fpTapCounts == 2) {
doHapticFeedbackFP(false);
}
if (!fpTapPending) {
fpTapPending = true;
mHandler.postDelayed(doubleTapRunnable, ViewConfiguration.getDoubleTapTimeout());
}
}
private boolean isSingleTapEnabledOnFP() {
return !FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEYS_NODE)).equals("0");
}
private boolean isDoubleTapEnabledOnFP() {
return !FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEY_DBLTAP_NODE)).equals("0");
}
private boolean isHapticFeedbackEnabledOnFP() {
return !FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_HAPTIC_NODE)).equals("0");
}
private String getFPNodeBasedOnScreenState(String node) {
if (mPowerManager.isScreenOn()) {
return node;
}
switch (node) {
case FP_KEYS_NODE:
return FP_KEYS_SCREENOFF_NODE;
case FP_HAPTIC_NODE:
return FP_HAPTIC_SCREENOFF_NODE;
case FP_KEY_DBLTAP_NODE:
return FP_KEY_SCREENOFF_DBLTAP_NODE;
case FP_KEY_HOLD_NODE:
return FP_KEY_SCREENOFF_HOLD_NODE;
case FP_KEY_RIGHT_NODE:
return FP_KEY_SCREENOFF_RIGHT_NODE;
case FP_KEY_LEFT_NODE:
return FP_KEY_SCREENOFF_LEFT_NODE;
}
return node;
}
public KeyEvent handleKeyEvent(KeyEvent event) {
int scanCode = event.getScanCode();
if (DEBUG) {
Log.d(TAG, "DEBUG: action=" + event.getAction()
+ ", flags=" + event.getFlags()
+ ", keyCode=" + event.getKeyCode()
+ ", scanCode=" + event.getScanCode()
+ ", metaState=" + event.getMetaState()
+ ", repeatCount=" + event.getRepeatCount());
}
boolean isFPScanCode = ArrayUtils.contains(sSupportedFPGestures, scanCode);
if (!isFPScanCode) {
return event;
}
boolean isFPGestureEnabled = FileUtils.readOneLine(FP_HOME_NODE).equals("1");
boolean isFPGestureEnabledOnScreenOff = FileUtils.readOneLine(FP_HOME_OFF_NODE).equals("1");
boolean isScreenOn = mPowerManager.isScreenOn();
// We only want ACTION_UP event
if (event.getAction() != KeyEvent.ACTION_UP) {
return null;
}
if (isFPScanCode){
if (fpGesturePending) {
return event;
} else {
resetFPGestureDelay();
fpGesturePending = true;
mHandler.postDelayed(fpGestureRunnable, 10);
}
}
if (scanCode != FP_TAP_SCANCODE) {
resetDoubleTapOnFP();
}
if (isFPScanCode) {
if ((!isFPGestureEnabled) || (!isScreenOn && !isFPGestureEnabledOnScreenOff)) {
resetDoubleTapOnFP();
return event;
}
if (!isScreenOn && isFPGestureEnabledOnScreenOff) {
processFPScreenOffScancode(scanCode);
} else {
processFPScancode(scanCode);
}
}
return null;
}
private void processFPScancode(int scanCode) {
int action = 0;
boolean isScreenOn = mPowerManager.isScreenOn();
switch (scanCode) {
case FP_TAP_SCANCODE:
if (isDoubleTapEnabledOnFP()) {
detectDoubleTapOnFP();
return;
} else {
resetDoubleTapOnFP();
action = str2int(FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEYS_NODE)));
}
break;
case FP_HOLD_SCANCODE:
action = str2int(FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEY_HOLD_NODE)));
break;
case FP_RIGHT_SCANCODE:
action = str2int(FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEY_RIGHT_NODE)));
break;
case FP_LEFT_SCANCODE:
action = str2int(FileUtils.readOneLine(getFPNodeBasedOnScreenState(FP_KEY_LEFT_NODE)));
break;
}
boolean isActionSupported = ArrayUtils.contains(isScreenOn ? sFPSupportedActions : sFPSupportedActionsScreenOff, action);
if (isActionSupported) {
fireFPAction(action, false);
}
}
private void fireFPAction(int action, boolean isDoubleTap) {
ensureKeyguardManager();
boolean isHapticFeedbackEnabledOnFP = isHapticFeedbackEnabledOnFP();
if (isDoubleTap && action != ACTION_CAMERA && action != ACTION_FLASHLIGHT) {
isHapticFeedbackEnabledOnFP = false;
}
if (isHapticFeedbackEnabledOnFP){
if (action == ACTION_CAMERA || action == ACTION_FLASHLIGHT) {
vibrate(action == ACTION_CAMERA ? 500 : 250);
}else if (action != ACTION_VOICE_ASSISTANT) {
doHapticFeedbackFP(false);
}
}
switch (action) {
case ACTION_HOME:
if (!mKeyguardManager.inKeyguardRestrictedInputMode()) {
triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_HOME);
}
break;
case ACTION_POWER:
toggleScreenState();
break;
case ACTION_BACK:
triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_BACK);
break;
case ACTION_RECENTS:
if (!mKeyguardManager.inKeyguardRestrictedInputMode()) {
triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_APP_SWITCH);
}
break;
case ACTION_VOLUME_UP:
triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_VOLUME_UP);
break;
case ACTION_VOLUME_DOWN:
triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_VOLUME_DOWN);
break;
case ACTION_VOICE_ASSISTANT:
if (!mKeyguardManager.inKeyguardRestrictedInputMode()) {
fireGoogleNowOnTap();
}
return;
case ACTION_PLAY_PAUSE:
dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, mContext);
break;
case ACTION_PREVIOUS_TRACK:
dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_PREVIOUS, mContext);
break;
case ACTION_NEXT_TRACK:
dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_NEXT, mContext);
break;
case ACTION_FLASHLIGHT:
toggleFlashlight();
break;
case ACTION_CAMERA:
triggerCameraAction();
break;
case ACTION_SCREENSHOT:
triggerVirtualKeypress(mHandler, KeyEvent.KEYCODE_SYSRQ);
break;
case ACTION_LAST_APP:
if (!mKeyguardManager.inKeyguardRestrictedInputMode()) {
switchToLastApp(mContext);
}
break;
}
}
private void vibrate(int intensity) {
if (mVibrator == null) {
return;
}
mVibrator.vibrate(intensity);
}
private void toggleScreenState() {
if (mPowerManager.isScreenOn()) {
mPowerManager.goToSleep(SystemClock.uptimeMillis());
} else {
mPowerManager.wakeUp(SystemClock.uptimeMillis());
}
}
private void triggerVirtualKeypress(final Handler handler, final int keyCode) {
final InputManager im = InputManager.getInstance();
long now = SystemClock.uptimeMillis();
final KeyEvent downEvent = new KeyEvent(now, now, KeyEvent.ACTION_DOWN,
keyCode, 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0,
KeyEvent.FLAG_FROM_SYSTEM, InputDevice.SOURCE_CLASS_BUTTON);
final KeyEvent upEvent = KeyEvent.changeAction(downEvent,
KeyEvent.ACTION_UP);
// add a small delay to make sure everything behind got focus
handler.postDelayed(new Runnable() {
@Override
public void run() {
im.injectInputEvent(downEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
}
}, 10);
handler.postDelayed(new Runnable() {
@Override
public void run() {
im.injectInputEvent(upEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
}
}, 20);
}
private void fireGoogleNowOnTap() {
doHapticFeedbackFP(true);
mSearchManagerService = ISearchManager.Stub.asInterface(ServiceManager.getService(Context.SEARCH_SERVICE));
if (mSearchManagerService != null) {
try {
mSearchManagerService.launchAssist(new Bundle());
} catch (RemoteException e) {
}
}
}
private int str2int(String str) {
if (str == null || str.isEmpty()) {
return 0;
}
try {
return Integer.valueOf(str);
} catch (Exception e) {
return 0;
}
}
private void processFPScreenOffScancode(int scanCode) {
if (!mFPScreenOffGesturesHandler.hasMessages(FP_ACTION_REQUEST)) {
Message msg = mFPScreenOffGesturesHandler.obtainMessage(FP_ACTION_REQUEST);
msg.arg1 = scanCode;
mFPScreenOffGesturesHandler.sendMessage(msg);
}
}
private void resetFPGestureDelay() {
fpGesturePending = false;
mHandler.removeCallbacks(fpGestureRunnable);
}
private void fireScreenOffAction(int action) {
boolean haptic = Settings.System.getInt(mContext.getContentResolver(), KEY_GESTURE_ENABLE_HAPTIC_FEEDBACK, 1) != 0;
if (haptic && (action == ACTION_CAMERA || action == ACTION_FLASHLIGHT)) {
vibrate(action == ACTION_CAMERA ? 500 : 250);
}
if (haptic && action == ACTION_POWER){
doHapticFeedbackScreenOff();
}
switch (action) {
case ACTION_POWER:
toggleScreenState();
break;
case ACTION_PLAY_PAUSE:
dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, mContext);
break;
case ACTION_PREVIOUS_TRACK:
dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_PREVIOUS, mContext);
break;
case ACTION_NEXT_TRACK:
dispatchMediaKeyWithWakeLock(KeyEvent.KEYCODE_MEDIA_NEXT, mContext);
break;
case ACTION_FLASHLIGHT:
toggleFlashlight();
break;
case ACTION_CAMERA:
triggerCameraAction();
break;
case ACTION_BROWSER:
openBrowser();
break;
case ACTION_DIALER:
openDialer();
break;
case ACTION_EMAIL:
openEmail();
break;
case ACTION_MESSAGES:
openMessages();
break;
}
if (action != ACTION_FLASHLIGHT && action != ACTION_CAMERA && action != ACTION_POWER) {
doHapticFeedbackScreenOff();
}
}
private void startActivitySafely(Intent intent) {
intent.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_SINGLE_TOP
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
UserHandle user = new UserHandle(UserHandle.USER_CURRENT);
mContext.startActivityAsUser(intent, null, user);
} catch (ActivityNotFoundException e) {
// Ignore
}
}
private void doHapticFeedbackScreenOff() {
if (mVibrator == null) {
return;
}
boolean enabled = Settings.System.getInt(mContext.getContentResolver(), KEY_GESTURE_ENABLE_HAPTIC_FEEDBACK, 1) != 0;
if (enabled) {
mVibrator.vibrate(50);
}
}
private void doHapticFeedbackFP(boolean longpress) {
if (mVibrator == null) {
return;
}
if (isHapticFeedbackEnabledOnFP()) {
mHandler.post(new Runnable() {
public void run() {
int owningUid;
String owningPackage;
owningUid = android.os.Process.myUid();
owningPackage = mContext.getOpPackageName();
VibrationEffect effect = VibrationEffect.createOneShot(longpress ? 50 : 40, VibrationEffect.DEFAULT_AMPLITUDE);
mVibrator.vibrate(owningUid, owningPackage, effect, null, VIBRATION_ATTRIBUTES);
}
});
}
}
private class FPScreenOffGesturesHandler extends Handler {
@Override
public void handleMessage(Message msg) {
processFPScancode(msg.arg1);
}
}
private class MyTorchCallback extends CameraManager.TorchCallback {
@Override
public void onTorchModeChanged(String cameraId, boolean enabled) {
if (!cameraId.equals(mRearCameraId))
return;
mTorchEnabled = enabled;
}
@Override
public void onTorchModeUnavailable(String cameraId) {
if (!cameraId.equals(mRearCameraId))
return;
mTorchEnabled = false;
}
}
}

View File

@@ -1,92 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.provider.SearchIndexableResource;
import android.provider.SearchIndexablesProvider;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_CLASS_NAME;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_ICON_RESID;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_ACTION;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID;
import static android.provider.SearchIndexablesContract.INDEXABLES_RAW_COLUMNS;
import static android.provider.SearchIndexablesContract.INDEXABLES_XML_RES_COLUMNS;
import static android.provider.SearchIndexablesContract.NON_INDEXABLES_KEYS_COLUMNS;
public class MotoActionsSearchIndexablesProvider extends SearchIndexablesProvider {
private static final String TAG = "MotoActionsSearchIndexablesProvider";
@Override
public boolean onCreate() {
return true;
}
@Override
public Cursor queryXmlResources(String[] projection) {
MatrixCursor cursor = new MatrixCursor(INDEXABLES_XML_RES_COLUMNS);
cursor.addRow(generateResourceRef(new SearchIndexableResource(1, R.xml.actions_panel,
GestureSettingsActivity.class.getName(),
R.drawable.ic_settings_gestures)));
cursor.addRow(generateResourceRef(new SearchIndexableResource(1, R.xml.fp_gesture_panel,
FPGestureSettingsActivity.class.getName(),
R.drawable.ic_settings_fingerprint)));
cursor.addRow(generateResourceRef(new SearchIndexableResource(1, R.xml.fp_gesture_panel_indexable,
FPGestureSettingsActivity.class.getName(),
R.drawable.ic_settings_fingerprint)));
cursor.addRow(generateResourceRef(new SearchIndexableResource(1, R.xml.doze_panel,
DozeSettingsActivity.class.getName(),
R.drawable.ic_settings_doze)));
cursor.addRow(generateResourceRef(new SearchIndexableResource(1, R.xml.doze_panel_indexable,
DozeSettingsActivity.class.getName(),
R.drawable.ic_settings_doze)));
return cursor;
}
private static Object[] generateResourceRef(SearchIndexableResource sir) {
Object[] ref = new Object[7];
ref[COLUMN_INDEX_XML_RES_RANK] = sir.rank;
ref[COLUMN_INDEX_XML_RES_RESID] = sir.xmlResId;
ref[COLUMN_INDEX_XML_RES_CLASS_NAME] = null;
ref[COLUMN_INDEX_XML_RES_ICON_RESID] = sir.iconResId;
ref[COLUMN_INDEX_XML_RES_INTENT_ACTION] = "com.android.settings.action.EXTRA_SETTINGS";
ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE] = "com.moto.actions";
ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS] = sir.className;
return ref;
}
@Override
public Cursor queryRawData(String[] projection) {
MatrixCursor cursor = new MatrixCursor(INDEXABLES_RAW_COLUMNS);
return cursor;
}
@Override
public Cursor queryNonIndexableKeys(String[] projection) {
MatrixCursor cursor = new MatrixCursor(NON_INDEXABLES_KEYS_COLUMNS);
return cursor;
}
}

View File

@@ -1,115 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
import android.util.Log;
import java.util.List;
import java.util.LinkedList;
import com.moto.actions.actions.UpdatedStateNotifier;
import com.moto.actions.actions.CameraActivationSensor;
import com.moto.actions.actions.ChopChopSensor;
import com.moto.actions.actions.FlipToMute;
import com.moto.actions.actions.LiftToSilence;
import com.moto.actions.actions.ProximitySilencer;
import com.moto.actions.doze.DozePulseAction;
import com.moto.actions.doze.GlanceSensor;
import com.moto.actions.doze.ProximitySensor;
import com.moto.actions.doze.ScreenReceiver;
import com.moto.actions.doze.ScreenStateNotifier;
public class MotoActionsService extends IntentService implements ScreenStateNotifier,
UpdatedStateNotifier {
private static final String TAG = "MotoActions";
private final PowerManager mPowerManager;
private final PowerManager.WakeLock mWakeLock;
private final List<ScreenStateNotifier> mScreenStateNotifiers = new LinkedList<>();
private final List<UpdatedStateNotifier> mUpdatedStateNotifiers = new LinkedList<>();
public MotoActionsService(Context context) {
super("MotoActionService");
Log.d(TAG, "Starting");
MotoActionsSettings motoActionsSettings = new MotoActionsSettings(context, this);
SensorHelper sensorHelper = new SensorHelper(context);
new ScreenReceiver(context, this);
DozePulseAction mDozePulseAction = new DozePulseAction(context);
mScreenStateNotifiers.add(mDozePulseAction);
// Actionable sensors get screen on/off notifications
mScreenStateNotifiers.add(new GlanceSensor(motoActionsSettings, sensorHelper, mDozePulseAction));
mScreenStateNotifiers.add(new ProximitySensor(motoActionsSettings, sensorHelper, mDozePulseAction));
// Other actions that are always enabled
mUpdatedStateNotifiers.add(new CameraActivationSensor(motoActionsSettings, sensorHelper));
mUpdatedStateNotifiers.add(new ChopChopSensor(motoActionsSettings, sensorHelper));
mUpdatedStateNotifiers.add(new ProximitySilencer(motoActionsSettings, context, sensorHelper));
mUpdatedStateNotifiers.add(new FlipToMute(motoActionsSettings, context, sensorHelper));
mUpdatedStateNotifiers.add(new LiftToSilence(motoActionsSettings, context, sensorHelper));
mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
String tag = context.getPackageName() + ":ServiceWakeLock";
mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, tag);
updateState();
}
@Override
protected void onHandleIntent(Intent intent) {
}
@Override
public void screenTurnedOn() {
if (!mWakeLock.isHeld()) {
mWakeLock.acquire();
}
for (ScreenStateNotifier screenStateNotifier : mScreenStateNotifiers) {
screenStateNotifier.screenTurnedOn();
}
}
@Override
public void screenTurnedOff() {
if (mWakeLock.isHeld()) {
mWakeLock.release();
}
for (ScreenStateNotifier screenStateNotifier : mScreenStateNotifiers) {
screenStateNotifier.screenTurnedOff();
}
}
public void updateState() {
if (mPowerManager.isInteractive()) {
screenTurnedOn();
} else {
screenTurnedOff();
}
for (UpdatedStateNotifier notifier : mUpdatedStateNotifiers) {
notifier.updateState();
}
}
}

View File

@@ -1,147 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import android.content.ContentResolver;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.util.Log;
import com.moto.actions.actions.Constants;
import com.moto.actions.actions.UpdatedStateNotifier;
import com.moto.actions.actions.CameraActivationAction;
import com.moto.actions.actions.TorchAction;
public class MotoActionsSettings implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = "MotoActions";
private static final String GESTURE_CAMERA_ACTION_KEY = "gesture_camera_action";
private static final String GESTURE_CHOP_CHOP_KEY = "gesture_chop_chop";
private static final String GESTURE_PICK_UP_KEY = "gesture_pick_up";
private static final String GESTURE_IR_WAKEUP_KEY = "gesture_hand_wave";
private static final String GESTURE_IR_SILENCER_KEY = "gesture_ir_silencer";
private static final String GESTURE_FLIP_TO_MUTE_KEY = "gesture_flip_to_mute";
private static final String GESTURE_LIFT_TO_SILENCE_KEY = "gesture_lift_to_silence";
private final Context mContext;
private final UpdatedStateNotifier mUpdatedStateNotifier;
private boolean mCameraGestureEnabled;
private boolean mChopChopEnabled;
private boolean mPickUpGestureEnabled;
private boolean mIrWakeUpEnabled;
private boolean mIrSilencerEnabled;
private boolean mFlipToMuteEnabled;
private boolean mLiftToSilenceEnabled;
public MotoActionsSettings(Context context, UpdatedStateNotifier updatedStateNotifier) {
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
loadPreferences(sharedPrefs);
sharedPrefs.registerOnSharedPreferenceChangeListener(this);
mContext = context;
mUpdatedStateNotifier = updatedStateNotifier;
}
public boolean isCameraGestureEnabled() {
return mCameraGestureEnabled;
}
public boolean isChopChopGestureEnabled() {
return mChopChopEnabled;
}
public static boolean isDozeEnabled(ContentResolver contentResolver) {
return (Settings.Secure.getInt(contentResolver, Settings.Secure.DOZE_ENABLED, 1) != 0);
}
public boolean isDozeEnabled() {
return isDozeEnabled(mContext.getContentResolver());
}
public boolean isIrWakeupEnabled() {
return isDozeEnabled() && mIrWakeUpEnabled;
}
public boolean isPickUpEnabled() {
return isDozeEnabled() && mPickUpGestureEnabled;
}
public boolean isIrSilencerEnabled() {
return mIrSilencerEnabled;
}
public boolean isFlipToMuteEnabled() {
return mFlipToMuteEnabled;
}
public boolean isLiftToSilenceEnabled() {
return mLiftToSilenceEnabled;
}
public void cameraAction() {
new CameraActivationAction(mContext).action();
}
public void chopChopAction() {
new TorchAction(mContext).action();
}
private void loadPreferences(SharedPreferences sharedPreferences) {
mCameraGestureEnabled = sharedPreferences.getBoolean(GESTURE_CAMERA_ACTION_KEY, true);
mChopChopEnabled = sharedPreferences.getBoolean(GESTURE_CHOP_CHOP_KEY, true);
mIrWakeUpEnabled = sharedPreferences.getBoolean(GESTURE_IR_WAKEUP_KEY, false);
mPickUpGestureEnabled = sharedPreferences.getBoolean(GESTURE_PICK_UP_KEY, true);
mIrSilencerEnabled = sharedPreferences.getBoolean(GESTURE_IR_SILENCER_KEY, false);
mFlipToMuteEnabled = sharedPreferences.getBoolean(GESTURE_FLIP_TO_MUTE_KEY, false);
mLiftToSilenceEnabled = sharedPreferences.getBoolean(GESTURE_LIFT_TO_SILENCE_KEY, false);
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
boolean updated = true;
if (GESTURE_CAMERA_ACTION_KEY.equals(key)) {
mCameraGestureEnabled = sharedPreferences.getBoolean(GESTURE_CAMERA_ACTION_KEY, true);
} else if (GESTURE_CHOP_CHOP_KEY.equals(key)) {
mChopChopEnabled = sharedPreferences.getBoolean(GESTURE_CHOP_CHOP_KEY, true);
} else if (GESTURE_IR_WAKEUP_KEY.equals(key)) {
mIrWakeUpEnabled = sharedPreferences.getBoolean(GESTURE_IR_WAKEUP_KEY, false);
} else if (GESTURE_PICK_UP_KEY.equals(key)) {
mPickUpGestureEnabled = sharedPreferences.getBoolean(GESTURE_PICK_UP_KEY, true);
} else if (GESTURE_IR_SILENCER_KEY.equals(key)) {
mIrSilencerEnabled = sharedPreferences.getBoolean(GESTURE_IR_SILENCER_KEY, false);
} else if (GESTURE_FLIP_TO_MUTE_KEY.equals(key)) {
mFlipToMuteEnabled = sharedPreferences.getBoolean(GESTURE_FLIP_TO_MUTE_KEY, false);
} else if (GESTURE_LIFT_TO_SILENCE_KEY.equals(key)) {
mLiftToSilenceEnabled = sharedPreferences.getBoolean(GESTURE_LIFT_TO_SILENCE_KEY, false);
} else if (Constants.FP_HOME_KEY.equals(key) || Constants.FP_HAPTIC_KEY.equals(key) || Constants.FP_HOME_KEY_OFF.equals(key) || Constants.FP_HAPTIC_SCREENOFF_KEY.equals(key) || Constants.FP_KEYS.equals(key) || Constants.FP_KEY_DBLTAP.equals(key) || Constants.FP_KEY_HOLD.equals(key) || Constants.FP_KEY_LEFT.equals(key) || Constants.FP_KEY_RIGHT.equals(key)
|| Constants.FP_KEYS_OFF.equals(key) || Constants.FP_KEY_DBLTAP_OFF.equals(key) || Constants.FP_KEY_HOLD_OFF.equals(key) || Constants.FP_KEY_LEFT_OFF.equals(key) || Constants.FP_KEY_RIGHT_OFF.equals(key)) {
Constants.writePreference(mContext, key);
updated = false;
} else {
updated = false;
}
if (updated) {
mUpdatedStateNotifier.updateState();
}
}
}

View File

@@ -1,105 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import java.util.List;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
public class SensorHelper {
private static final String TAG = "MotoActions";
private static final int SENSOR_TYPE_MMI_CAMERA_ACTIVATION = 65540;
private static final int SENSOR_TYPE_MMI_CHOP_CHOP = 65546;
private static final int SENSOR_TYPE_MMI_FLAT_UP = 65537;
private static final int SENSOR_TYPE_MMI_FLAT_DOWN = 65538;
private static final int SENSOR_TYPE_MMI_STOW = 65539;
private static final int SENSOR_TYPE_MMI_GLANCE = 65548;
private static final int BATCH_LATENCY_IN_MS = 100;
private final Context mContext;
private final SensorManager mSensorManager;
public SensorHelper(Context context) {
mContext = context;
mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);
dumpSensorsList();
}
private void dumpSensorsList() {
try {
FileOutputStream out = mContext.openFileOutput("sensors.txt", Context.MODE_PRIVATE);
OutputStreamWriter writer = new OutputStreamWriter(out);
List<Sensor> sensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL);
for (Sensor sensor : sensorList) {
writer.write("sensor " + sensor.getType() + " = " + sensor.getName()
+ " max batch: " + sensor.getFifoMaxEventCount() + " isWakeUp: " + sensor.isWakeUpSensor() + "\n");
}
writer.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public Sensor getCameraActivationSensor() {
return mSensorManager.getDefaultSensor(SENSOR_TYPE_MMI_CAMERA_ACTIVATION, true);
}
public Sensor getChopChopSensor() {
return mSensorManager.getDefaultSensor(SENSOR_TYPE_MMI_CHOP_CHOP, true);
}
public Sensor getFlatUpSensor() {
return mSensorManager.getDefaultSensor(SENSOR_TYPE_MMI_FLAT_UP, true);
}
public Sensor getFlatDownSensor() {
return mSensorManager.getDefaultSensor(SENSOR_TYPE_MMI_FLAT_DOWN, true);
}
public Sensor getGlanceSensor() {
return mSensorManager.getDefaultSensor(SENSOR_TYPE_MMI_GLANCE, true);
}
public Sensor getProximitySensor() {
return mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY, true);
}
public Sensor getStowSensor() {
return mSensorManager.getDefaultSensor(SENSOR_TYPE_MMI_STOW, true);
}
public void registerListener(Sensor sensor, SensorEventListener listener) {
if (!mSensorManager.registerListener(listener, sensor,
SensorManager.SENSOR_DELAY_NORMAL, BATCH_LATENCY_IN_MS * 1000)) {
throw new RuntimeException("Failed to registerListener for sensor " + sensor);
}
}
public void unregisterListener(SensorEventListener listener) {
mSensorManager.unregisterListener(listener);
}
}

View File

@@ -1,66 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions;
import android.content.Intent;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
public class ServiceWrapper extends android.app.Service {
static final String TAG = "MotoActions-ServiceWrapper";
private final IBinder mBinder = new LocalBinder();
private MotoActionsService mMotoActionsService;
public interface ServiceCallback {
void sendResults(int resultCode, Bundle b);
}
public class LocalBinder extends Binder {
ServiceWrapper getService() {
// Return this instance of the service so clients can call public
// methods
return ServiceWrapper.this;
}
}
@Override
public void onCreate() {
Log.i(TAG, "onCreate");
super.onCreate();
mMotoActionsService = new MotoActionsService(this);
}
@Override
public IBinder onBind(Intent intent) {
Log.i(TAG, "onBind");
return null;
}
public void setCallback(ServiceCallback callback) {
}
public void start() {
Log.i(TAG, "start");
}
public void stop() {
}
}

View File

@@ -1,138 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.app.KeyguardManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.provider.MediaStore;
import com.moto.actions.SensorAction;
import java.util.List;
public class CameraActivationAction implements SensorAction {
private static final String TAG = "MotoActions";
private static final int TURN_SCREEN_ON_WAKE_LOCK_MS = 500;
private final Context mContext;
private final KeyguardManager mKeyguardManager;
private final PackageManager mPackageManager;
private final PowerManager mPowerManager;
public CameraActivationAction(Context context) {
mContext = context;
mKeyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
mPackageManager = context.getPackageManager();
}
@Override
public void action() {
vibrate();
turnScreenOn();
if (mKeyguardManager.isKeyguardLocked()) {
launchSecureCamera();
} else {
launchCamera();
}
}
private void vibrate() {
Vibrator vib = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
if (vib == null) return;
VibrationEffect effect = VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE);
vib.vibrate(effect);
}
private void turnScreenOn() {
String tag = mContext.getPackageName() + ":CameraWakeLock";
WakeLock wl = mPowerManager.newWakeLock(
PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, tag);
wl.acquire(TURN_SCREEN_ON_WAKE_LOCK_MS);
}
private void launchCamera() {
Intent intent = createIntent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
if (getBestActivityInfo(intent) != null) {
// Only launch if we can succeed, but let the user pick the action
mContext.startActivity(intent);
}
}
private void launchSecureCamera() {
// Keyguard won't allow a picker, try to pick the secure intent in the package
// that would be the one used for a default action of launching the camera
Intent normalIntent = createIntent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
Intent secureIntent = createIntent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
ActivityInfo normalActivity = getBestActivityInfo(normalIntent);
ActivityInfo secureActivity = getBestActivityInfo(secureIntent, normalActivity);
if (secureActivity != null) {
secureIntent.setComponent(componentName(secureActivity));
mContext.startActivity(secureIntent);
}
}
private Intent createIntent(String intentName) {
Intent intent = new Intent(intentName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
return intent;
}
private ActivityInfo getBestActivityInfo(Intent intent) {
ResolveInfo resolveInfo = mPackageManager.resolveActivity(intent, 0);
if (resolveInfo != null) {
return resolveInfo.activityInfo;
} else {
// If the resolving failed, just find our own best match
return getBestActivityInfo(intent, null);
}
}
private ActivityInfo getBestActivityInfo(Intent intent, ActivityInfo match) {
List <ResolveInfo> activities = mPackageManager.queryIntentActivities(intent, 0);
ActivityInfo best = null;
if (activities.size() > 0) {
best = activities.get(0).activityInfo;
if (match != null) {
String packageName = match.applicationInfo.packageName;
for (int i = activities.size()-1; i >= 0; i--) {
ActivityInfo activityInfo = activities.get(i).activityInfo;
if (packageName.equals(activityInfo.applicationInfo.packageName)) {
best = activityInfo;
}
}
}
}
return best;
}
private ComponentName componentName(ActivityInfo activity) {
return new ComponentName(activity.applicationInfo.packageName, activity.name);
}
}

View File

@@ -1,61 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorHelper;
public class CameraActivationSensor implements SensorEventListener, UpdatedStateNotifier {
private static final String TAG = "MotoActions-CameraSensor";
private final MotoActionsSettings mMotoActionsSettings;
private boolean mIsEnabled;
public CameraActivationSensor(MotoActionsSettings motoActionsSettings, SensorHelper sensorHelper) {
mMotoActionsSettings = motoActionsSettings;
Sensor sensor = sensorHelper.getCameraActivationSensor();
sensorHelper.registerListener(sensor, this);
}
@Override
public synchronized void updateState() {
if (mMotoActionsSettings.isCameraGestureEnabled() && !mIsEnabled) {
Log.d(TAG, "Enabling");
mIsEnabled = true;
} else if (! mMotoActionsSettings.isCameraGestureEnabled() && mIsEnabled) {
Log.d(TAG, "Disabling");
mIsEnabled = false;
}
}
@Override
public void onSensorChanged(SensorEvent event) {
Log.d(TAG, "activate camera");
if (mIsEnabled) mMotoActionsSettings.cameraAction();
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
}

View File

@@ -1,86 +0,0 @@
/*
* Copyright (c) 2015-2016 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorHelper;
public class ChopChopSensor implements SensorEventListener, UpdatedStateNotifier {
private static final String TAG = "MotoActions-ChopChopSensor";
private final MotoActionsSettings mMotoActionsSettings;
private final SensorHelper mSensorHelper;
private final Sensor mSensor;
private final Sensor mProx;
private boolean mIsEnabled;
private boolean mProxIsCovered;
public ChopChopSensor(MotoActionsSettings motoActionsSettings, SensorHelper sensorHelper) {
mMotoActionsSettings = motoActionsSettings;
mSensorHelper = sensorHelper;
mSensor = sensorHelper.getChopChopSensor();
mProx = sensorHelper.getProximitySensor();
}
@Override
public synchronized void updateState() {
if (mMotoActionsSettings.isChopChopGestureEnabled() && !mIsEnabled) {
Log.d(TAG, "Enabling");
mSensorHelper.registerListener(mSensor, this);
mSensorHelper.registerListener(mProx, mProxListener);
mIsEnabled = true;
} else if (! mMotoActionsSettings.isChopChopGestureEnabled() && mIsEnabled) {
Log.d(TAG, "Disabling");
mSensorHelper.unregisterListener(this);
mSensorHelper.unregisterListener(mProxListener);
mIsEnabled = false;
}
}
@Override
public void onSensorChanged(SensorEvent event) {
Log.d(TAG, "chop chop triggered");
if (mProxIsCovered) {
Log.d(TAG, "proximity sensor covered, ignoring chop-chop");
return;
}
mMotoActionsSettings.chopChopAction();
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
private SensorEventListener mProxListener = new SensorEventListener() {
@Override
public synchronized void onSensorChanged(SensorEvent event) {
mProxIsCovered = event.values[0] < mProx.getMaximumRange();
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
};
}

View File

@@ -1,219 +0,0 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
* Copyright (C) 2017 The LineageOS 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.moto.actions.actions;
import java.util.HashMap;
import java.util.Map;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.util.Log;
import com.moto.actions.util.FileUtils;
public class Constants {
public static final boolean DEBUG = false;
private static final String TAG = "MotoActions";
// FP gestures
public static final int FP_TAP_SCANCODE = 616;
public static final int FP_HOLD_SCANCODE = 617;
public static final int FP_RIGHT_SCANCODE = 620;
public static final int FP_LEFT_SCANCODE = 621;
public static final int[] sSupportedFPGestures = new int[]{
FP_TAP_SCANCODE,
FP_HOLD_SCANCODE,
FP_RIGHT_SCANCODE,
FP_LEFT_SCANCODE
};
// FP actions
public static final int ACTION_HOME = 100;
public static final int ACTION_POWER = 101;
public static final int ACTION_BACK = 102;
public static final int ACTION_RECENTS = 103;
public static final int ACTION_VOLUME_UP = 104;
public static final int ACTION_VOLUME_DOWN = 105;
public static final int ACTION_VOICE_ASSISTANT = 106;
public static final int ACTION_PLAY_PAUSE = 107;
public static final int ACTION_PREVIOUS_TRACK = 108;
public static final int ACTION_NEXT_TRACK = 109;
public static final int ACTION_FLASHLIGHT = 110;
public static final int ACTION_CAMERA = 111;
public static final int ACTION_SCREENSHOT = 112;
public static final int ACTION_BROWSER = 116;
public static final int ACTION_DIALER = 117;
public static final int ACTION_EMAIL = 118;
public static final int ACTION_MESSAGES = 119;
public static final int ACTION_LAST_APP = 121;
public static final int[] sFPSupportedActions = new int[]{
ACTION_HOME,
ACTION_POWER,
ACTION_BACK,
ACTION_RECENTS,
ACTION_VOLUME_UP,
ACTION_VOLUME_DOWN,
ACTION_VOICE_ASSISTANT,
ACTION_PLAY_PAUSE,
ACTION_PREVIOUS_TRACK,
ACTION_NEXT_TRACK,
ACTION_FLASHLIGHT,
ACTION_CAMERA,
ACTION_SCREENSHOT,
ACTION_LAST_APP
};
public static final int[] sFPSupportedActionsScreenOff = new int[]{
ACTION_POWER,
ACTION_VOLUME_UP,
ACTION_VOLUME_DOWN,
ACTION_PLAY_PAUSE,
ACTION_PREVIOUS_TRACK,
ACTION_NEXT_TRACK,
ACTION_FLASHLIGHT,
ACTION_CAMERA
};
// Swap keys
public static final String FP_HOME_KEY = "fp_home";
public static final String FP_HOME_KEY_OFF = "fp_home_scr_off";
// Swap nodes
public static final String FP_HOME_NODE = "/sys/homebutton/enable";
public static final String FP_HOME_OFF_NODE = "/sys/homebutton/enable_off";
// Haptic node
public static final String FP_HAPTIC_NODE = "/sys/homebutton/haptic";
public static final String FP_HAPTIC_KEY = "fp_haptic";
public static final String FP_HAPTIC_SCREENOFF_NODE = "/sys/homebutton/haptic_off";
public static final String FP_HAPTIC_SCREENOFF_KEY = "fp_haptic_scr_off";
// List of keys
public static final String FP_KEYS = "fp_keys";
public static final String FP_KEY_DBLTAP = "fp_key_dbltap";
public static final String FP_KEY_HOLD = "fp_key_hold";
public static final String FP_KEY_LEFT = "fp_key_left";
public static final String FP_KEY_RIGHT = "fp_key_right";
public static final String FP_KEYS_OFF = "fp_keys_off";
public static final String FP_KEY_DBLTAP_OFF = "fp_key_dbltap_off";
public static final String FP_KEY_HOLD_OFF = "fp_key_hold_off";
public static final String FP_KEY_LEFT_OFF = "fp_key_left_off";
public static final String FP_KEY_RIGHT_OFF = "fp_key_right_off";
// Keys nodes
public static final String FP_KEYS_NODE = "/sys/homebutton/key";
public static final String FP_KEY_DBLTAP_NODE = "/sys/homebutton/key_dbltap";
public static final String FP_KEY_HOLD_NODE = "/sys/homebutton/key_hold";
public static final String FP_KEY_LEFT_NODE = "/sys/homebutton/key_left";
public static final String FP_KEY_RIGHT_NODE = "/sys/homebutton/key_right";
public static final String FP_KEYS_SCREENOFF_NODE = "/sys/homebutton/key_screenoff";
public static final String FP_KEY_SCREENOFF_DBLTAP_NODE = "/sys/homebutton/key_screenoff_dbltap";
public static final String FP_KEY_SCREENOFF_HOLD_NODE = "/sys/homebutton/key_screenoff_hold";
public static final String FP_KEY_SCREENOFF_LEFT_NODE = "/sys/homebutton/key_screenoff_left";
public static final String FP_KEY_SCREENOFF_RIGHT_NODE = "/sys/homebutton/key_screenoff_right";
// Screen off gestures haptic
public static final String KEY_GESTURE_ENABLE_HAPTIC_FEEDBACK = "screen_off_gesture_haptic_feedback";
// Holds <preference_key> -> <proc_node> mapping
public static final Map<String, String> sBooleanNodePreferenceMap = new HashMap<>();
// Holds <preference_key> -> <default_values> mapping
public static final Map<String, Object> sNodeDefaultMap = new HashMap<>();
public static final String[] sPrefKeys = {
FP_HOME_KEY,
FP_HOME_KEY_OFF,
FP_HAPTIC_KEY,
FP_HAPTIC_SCREENOFF_KEY,
FP_KEYS,
FP_KEY_DBLTAP,
FP_KEY_HOLD,
FP_KEY_RIGHT,
FP_KEY_LEFT,
FP_KEYS_OFF,
FP_KEY_DBLTAP_OFF,
FP_KEY_HOLD_OFF,
FP_KEY_RIGHT_OFF,
FP_KEY_LEFT_OFF,
FP_HOME_KEY_OFF,
};
static {
sBooleanNodePreferenceMap.put(FP_HOME_KEY, FP_HOME_NODE);
sBooleanNodePreferenceMap.put(FP_HOME_KEY_OFF, FP_HOME_OFF_NODE);
sBooleanNodePreferenceMap.put(FP_HAPTIC_KEY, FP_HAPTIC_NODE);
sBooleanNodePreferenceMap.put(FP_HAPTIC_SCREENOFF_KEY, FP_HAPTIC_SCREENOFF_NODE);
sBooleanNodePreferenceMap.put(FP_KEYS, FP_KEYS_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_DBLTAP, FP_KEY_DBLTAP_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_HOLD, FP_KEY_HOLD_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_LEFT, FP_KEY_LEFT_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_RIGHT, FP_KEY_RIGHT_NODE);
sBooleanNodePreferenceMap.put(FP_KEYS_OFF, FP_KEYS_SCREENOFF_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_DBLTAP_OFF, FP_KEY_SCREENOFF_DBLTAP_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_HOLD_OFF, FP_KEY_SCREENOFF_HOLD_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_LEFT_OFF, FP_KEY_SCREENOFF_LEFT_NODE);
sBooleanNodePreferenceMap.put(FP_KEY_RIGHT_OFF, FP_KEY_SCREENOFF_RIGHT_NODE);
sNodeDefaultMap.put(FP_HOME_KEY, false);
sNodeDefaultMap.put(FP_HOME_KEY_OFF, false);
sNodeDefaultMap.put(FP_HAPTIC_KEY, false);
sNodeDefaultMap.put(FP_HAPTIC_SCREENOFF_KEY, false);
sNodeDefaultMap.put(FP_KEYS, "0");
sNodeDefaultMap.put(FP_KEY_DBLTAP, "0");
sNodeDefaultMap.put(FP_KEY_HOLD, "0");
sNodeDefaultMap.put(FP_KEY_LEFT, "0");
sNodeDefaultMap.put(FP_KEY_RIGHT, "0");
sNodeDefaultMap.put(FP_KEYS_OFF, "0");
sNodeDefaultMap.put(FP_KEY_DBLTAP_OFF, "0");
sNodeDefaultMap.put(FP_KEY_HOLD_OFF, "0");
sNodeDefaultMap.put(FP_KEY_LEFT_OFF, "0");
sNodeDefaultMap.put(FP_KEY_RIGHT_OFF, "0");
}
public static boolean isPreferenceEnabled(Context context, String key) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
return preferences.getBoolean(key, (Boolean) sNodeDefaultMap.get(key));
}
public static String GetPreference(Context context, String key) {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
return preferences.getString(key, (String) sNodeDefaultMap.get(key));
}
public static void writePreference(Context context, String pref) {
String value = "1";
if (!pref.equals(FP_KEYS) && !pref.equals(FP_KEY_DBLTAP) && !pref.equals(FP_KEY_HOLD) && !pref.equals(FP_KEY_LEFT) && !pref.equals(FP_KEY_RIGHT) &&
!pref.equals(FP_KEYS_OFF) && !pref.equals(FP_KEY_DBLTAP_OFF) && !pref.equals(FP_KEY_HOLD_OFF) && !pref.equals(FP_KEY_LEFT_OFF) && !pref.equals(FP_KEY_RIGHT_OFF))
value = isPreferenceEnabled(context, pref) ? "1" : "0";
else
value = GetPreference(context, pref);
String node = sBooleanNodePreferenceMap.get(pref);
if (!FileUtils.writeLine(node, value)) {
Log.w(TAG, "Write " + value + " to node " + node +
"failed while restoring saved preference values");
}
}
}

View File

@@ -1,146 +0,0 @@
/*
* Copyright (c) 2016 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.os.VibrationEffect;
import android.os.Vibrator;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorHelper;
public class FlipToMute implements UpdatedStateNotifier {
private static final String TAG = "MotoActions-FlipToMute";
private final NotificationManager mNotificationManager;
private final MotoActionsSettings mMotoActionsSettings;
private final SensorHelper mSensorHelper;
private final Sensor mFlatDown;
private final Sensor mStow;
private boolean canVibrate = false;
private boolean mIsEnabled;
private boolean mIsFlatDown;
private boolean mIsStowed;
private int mFilter;
private Context mContext;
private Receiver mReceiver;
public FlipToMute(MotoActionsSettings motoActionsSettings, Context context,
SensorHelper sensorHelper) {
mMotoActionsSettings = motoActionsSettings;
mContext = context;
mSensorHelper = sensorHelper;
mFlatDown = sensorHelper.getFlatDownSensor();
mStow = sensorHelper.getStowSensor();
mNotificationManager =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
if (mNotificationManager != null) {
mFilter = mNotificationManager.getCurrentInterruptionFilter();
}
mReceiver = new Receiver();
}
@Override
public void updateState() {
if (mMotoActionsSettings.isFlipToMuteEnabled() && !mIsEnabled) {
Log.d(TAG, "Enabling");
mSensorHelper.registerListener(mFlatDown, mFlatDownListener);
mSensorHelper.registerListener(mStow, mStowListener);
mContext.registerReceiver(mReceiver,
new IntentFilter(NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED));
mIsEnabled = true;
} else if (!mMotoActionsSettings.isFlipToMuteEnabled() && mIsEnabled) {
Log.d(TAG, "Disabling");
mSensorHelper.unregisterListener(mFlatDownListener);
mSensorHelper.unregisterListener(mStowListener);
mContext.unregisterReceiver(mReceiver);
mIsEnabled = false;
}
}
private SensorEventListener mFlatDownListener = new SensorEventListener() {
@Override
public synchronized void onSensorChanged(SensorEvent event) {
mIsFlatDown = (event.values[0] != 0);
sensorChange();
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
};
private SensorEventListener mStowListener = new SensorEventListener() {
@Override
public synchronized void onSensorChanged(SensorEvent event) {
mIsStowed = (event.values[0] != 0);
sensorChange();
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
};
private void sensorChange() {
Log.d(TAG, "event: " + mIsFlatDown + " mIsStowed=" + mIsStowed);
if (mIsFlatDown && mIsStowed) {
vibrate();
canVibrate = true;
mNotificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_PRIORITY);
Log.d(TAG, "Interrupt filter: Allow priority");
} else if (!mIsFlatDown) {
if (canVibrate) {
vibrate();
canVibrate = false;
}
mNotificationManager.setInterruptionFilter(mFilter);
Log.d(TAG, "Interrupt filter: Restore");
}
}
private void vibrate() {
Vibrator vib = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
if (vib == null) return;
VibrationEffect effect = VibrationEffect.createOneShot(250, VibrationEffect.DEFAULT_AMPLITUDE);
vib.vibrate(effect);
}
public class Receiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (!mIsFlatDown && !mIsStowed) {
if (mNotificationManager == null) return;
mFilter = mNotificationManager.getCurrentInterruptionFilter();
Log.d(TAG, "Interrupt filter: Backup");
}
}
}
}

View File

@@ -1,109 +0,0 @@
/*
* Copyright (c) 2016 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.telephony.PhoneStateListener;
import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorHelper;
public class LiftToSilence extends PhoneStateListener implements SensorEventListener, UpdatedStateNotifier {
private static final String TAG = "MotoActions-LiftToSilence";
private final MotoActionsSettings mMotoActionsSettings;
private final SensorHelper mSensorHelper;
private final Sensor mFlatUpSensor;
private final Sensor mStowSensor;
private final TelecomManager mTelecomManager;
private final TelephonyManager mTelephonyManager;
private boolean mIsRinging;
private boolean mIsStowed;
private boolean mLastFlatUp;
public LiftToSilence(MotoActionsSettings motoActionsSettings, Context context,
SensorHelper sensorHelper) {
mMotoActionsSettings = motoActionsSettings;
mSensorHelper = sensorHelper;
mFlatUpSensor = sensorHelper.getFlatUpSensor();
mStowSensor = sensorHelper.getStowSensor();
mTelecomManager = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
}
@Override
public void updateState() {
if (mMotoActionsSettings.isLiftToSilenceEnabled()) {
mTelephonyManager.listen(this, LISTEN_CALL_STATE);
} else {
mTelephonyManager.listen(this, 0);
}
}
@Override
public synchronized void onCallStateChanged(int state, String incomingNumber) {
if (state == TelephonyManager.CALL_STATE_RINGING && !mIsRinging) {
Log.d(TAG, "Ringing started");
mSensorHelper.registerListener(mFlatUpSensor, this);
mSensorHelper.registerListener(mStowSensor, mStowListener);
mIsRinging = true;
} else if (state != TelephonyManager.CALL_STATE_RINGING && mIsRinging) {
Log.d(TAG, "Ringing stopped");
mSensorHelper.unregisterListener(this);
mSensorHelper.unregisterListener(mStowListener);
mIsRinging = false;
}
}
@Override
public synchronized void onSensorChanged(SensorEvent event) {
boolean thisFlatUp = (event.values[0] != 0);
Log.d(TAG, "event: " + thisFlatUp + " mLastFlatUp=" + mLastFlatUp + " mIsStowed=" +
mIsStowed);
if (mLastFlatUp && !thisFlatUp && !mIsStowed) {
mTelecomManager.silenceRinger();
}
mLastFlatUp = thisFlatUp;
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
private SensorEventListener mStowListener = new SensorEventListener() {
@Override
public synchronized void onSensorChanged(SensorEvent event) {
mIsStowed = (event.values[0] != 0);
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
};
}

View File

@@ -1,109 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.telephony.PhoneStateListener;
import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorHelper;
import static android.telephony.TelephonyManager.*;
public class ProximitySilencer extends PhoneStateListener implements SensorEventListener, UpdatedStateNotifier {
private static final String TAG = "MotoActions-ProximitySilencer";
private static final int SILENCE_DELAY_MS = 500;
private final TelecomManager mTelecomManager;
private final TelephonyManager mTelephonyManager;
private final MotoActionsSettings mMotoActionsSettings;
private final SensorHelper mSensorHelper;
private final Sensor mSensor;
private boolean mIsRinging;
private long mRingStartedMs;
private boolean mCoveredRinging;
public ProximitySilencer(MotoActionsSettings motoActionsSettings, Context context,
SensorHelper sensorHelper) {
mTelecomManager = (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
mMotoActionsSettings = motoActionsSettings;
mSensorHelper = sensorHelper;
mSensor = sensorHelper.getProximitySensor();
mCoveredRinging = false;
mIsRinging = false;
}
@Override
public void updateState() {
if (mMotoActionsSettings.isIrSilencerEnabled()) {
mTelephonyManager.listen(this, LISTEN_CALL_STATE);
} else {
mTelephonyManager.listen(this, 0);
}
}
@Override
public synchronized void onSensorChanged(SensorEvent event) {
boolean isNear = event.values[0] < mSensor.getMaximumRange();
long now = System.currentTimeMillis();
if (isNear){
mCoveredRinging = mIsRinging && (now - mRingStartedMs >= SILENCE_DELAY_MS);
return;
}
if (mIsRinging) {
Log.d(TAG, "event: " + event.values[0] + ", " + " covered " + Boolean.toString(mCoveredRinging));
if (mCoveredRinging) {
Log.d(TAG, "Silencing ringer");
mTelecomManager.silenceRinger();
} else {
Log.d(TAG, "Ignoring silence gesture: " + now + " is too close to " +
mRingStartedMs + ", delay=" + SILENCE_DELAY_MS);
}
mCoveredRinging = false;
}
}
@Override
public synchronized void onCallStateChanged(int state, String incomingNumber) {
if (state == CALL_STATE_RINGING && !mIsRinging) {
Log.d(TAG, "Ringing started");
mSensorHelper.registerListener(mSensor, this);
mIsRinging = true;
mRingStartedMs = System.currentTimeMillis();
} else if (state != CALL_STATE_RINGING && mIsRinging) {
Log.d(TAG, "Ringing stopped");
mSensorHelper.unregisterListener(this);
mIsRinging = false;
}
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
}

View File

@@ -1,87 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
import android.content.Context;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraManager;
import android.os.VibrationEffect;
import android.os.Vibrator;
import androidx.annotation.NonNull;
import com.moto.actions.SensorAction;
public class TorchAction implements SensorAction {
private static final String TAG = "MotoActions";
private CameraManager mCameraManager;
private final Vibrator mVibrator;
private String mRearCameraId;
private static boolean mTorchEnabled;
public TorchAction(Context mContext) {
mCameraManager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE);
mCameraManager.registerTorchCallback(new MyTorchCallback(), null);
mVibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
try {
for (final String cameraId : mCameraManager.getCameraIdList()) {
CameraCharacteristics characteristics =
mCameraManager.getCameraCharacteristics(cameraId);
int cOrientation = characteristics.get(CameraCharacteristics.LENS_FACING);
if (cOrientation == CameraCharacteristics.LENS_FACING_BACK) {
mRearCameraId = cameraId;
break;
}
}
} catch (CameraAccessException e) {
// Noop
}
}
@Override
public void action() {
VibrationEffect vibrationEffect = VibrationEffect.createOneShot(250, VibrationEffect.DEFAULT_AMPLITUDE);
mVibrator.vibrate(vibrationEffect);
if (mRearCameraId != null) {
try {
mCameraManager.setTorchMode(mRearCameraId, !mTorchEnabled);
mTorchEnabled = !mTorchEnabled;
} catch (CameraAccessException e) {
// Noop
}
}
}
private class MyTorchCallback extends CameraManager.TorchCallback {
@Override
public void onTorchModeChanged(@NonNull String cameraId, boolean enabled) {
if (!cameraId.equals(mRearCameraId))
return;
mTorchEnabled = enabled;
}
@Override
public void onTorchModeUnavailable(@NonNull String cameraId) {
if (!cameraId.equals(mRearCameraId))
return;
mTorchEnabled = false;
}
}
}

View File

@@ -1,22 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.actions;
public interface UpdatedStateNotifier {
void updateState();
}

View File

@@ -1,66 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.doze;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.moto.actions.SensorAction;
public class DozePulseAction implements SensorAction, ScreenStateNotifier {
private static final String TAG = "MotoActions";
private static final int DELAY_BETWEEN_DOZES_IN_MS = 1500;
private final Context mContext;
private long mLastDoze;
public DozePulseAction(Context context) {
mContext = context;
}
@Override
public void screenTurnedOn() {
}
@Override
public void screenTurnedOff() {
mLastDoze = System.currentTimeMillis();
}
public void action() {
if (mayDoze()) {
Log.d(TAG, "Sending doze.pulse intent");
mContext.sendBroadcast(new Intent("com.android.systemui.doze.pulse"));
}
}
private synchronized boolean mayDoze() {
long now = System.currentTimeMillis();
if (now - mLastDoze > DELAY_BETWEEN_DOZES_IN_MS) {
Log.d(TAG, "Allowing doze");
mLastDoze = now;
return true;
} else {
Log.d(TAG, "Denying doze");
return false;
}
}
}

View File

@@ -1,76 +0,0 @@
/*
* Copyright (c) 2017 The LineageOS 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.moto.actions.doze;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorAction;
import com.moto.actions.SensorHelper;
public class GlanceSensor implements ScreenStateNotifier {
private static final String TAG = "MotoActions-GlanceSensor";
private final MotoActionsSettings mMotoActionsSettings;
private final SensorHelper mSensorHelper;
private final SensorAction mSensorAction;
private final Sensor mSensor;
private boolean mEnabled;
public GlanceSensor(MotoActionsSettings motoActionsSettings, SensorHelper sensorHelper,
SensorAction action) {
mMotoActionsSettings = motoActionsSettings;
mSensorHelper = sensorHelper;
mSensorAction = action;
mSensor = sensorHelper.getGlanceSensor();
}
@Override
public void screenTurnedOn() {
if (mEnabled) {
Log.d(TAG, "Disabling");
mSensorHelper.unregisterListener(mGlanceListener);
mEnabled = false;
}
}
@Override
public void screenTurnedOff() {
if (mMotoActionsSettings.isPickUpEnabled() && !mEnabled) {
Log.d(TAG, "Enabling");
mSensorHelper.registerListener(mSensor, mGlanceListener);
mEnabled = true;
}
}
private SensorEventListener mGlanceListener = new SensorEventListener() {
@Override
public void onSensorChanged(SensorEvent event) {
Log.d(TAG, "triggered");
mSensorAction.action();
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
};
}

View File

@@ -1,81 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.doze;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.util.Log;
import com.moto.actions.MotoActionsSettings;
import com.moto.actions.SensorAction;
import com.moto.actions.SensorHelper;
public class ProximitySensor implements ScreenStateNotifier, SensorEventListener {
private static final String TAG = "MotoActions-ProximitySensor";
private final MotoActionsSettings mMotoActionsSettings;
private final SensorHelper mSensorHelper;
private final SensorAction mSensorAction;
private final Sensor mSensor;
private boolean mEnabled;
private boolean mSawNear = false;
public ProximitySensor(MotoActionsSettings motoActionsSettings, SensorHelper sensorHelper,
SensorAction action) {
mMotoActionsSettings = motoActionsSettings;
mSensorHelper = sensorHelper;
mSensorAction = action;
mSensor = sensorHelper.getProximitySensor();
}
@Override
public void screenTurnedOn() {
if (mEnabled) {
Log.d(TAG, "Disabling");
mSensorHelper.unregisterListener(this);
mEnabled = false;
}
}
@Override
public void screenTurnedOff() {
if (mMotoActionsSettings.isIrWakeupEnabled() && !mEnabled) {
Log.d(TAG, "Enabling");
mSensorHelper.registerListener(mSensor, this);
mEnabled = true;
}
}
@Override
public void onSensorChanged(SensorEvent event) {
boolean isNear = event.values[0] < mSensor.getMaximumRange();
if (mSawNear && !isNear) {
Log.d(TAG, "wave triggered");
mSensorAction.action();
}
mSawNear = isNear;
}
@Override
public void onAccuracyChanged(Sensor mSensor, int accuracy) {
}
}

View File

@@ -1,50 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.doze;
import java.util.List;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.moto.actions.actions.Constants;
public class ScreenReceiver extends BroadcastReceiver {
private final ScreenStateNotifier mNotifier;
public ScreenReceiver(Context context, ScreenStateNotifier notifier) {
mNotifier = notifier;
IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
filter.addAction(Intent.ACTION_SCREEN_OFF);
context.registerReceiver(this, filter);
}
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction() == null) return;
if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
mNotifier.screenTurnedOff();
} else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
mNotifier.screenTurnedOn();
}
}
}

View File

@@ -1,23 +0,0 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS 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.moto.actions.doze;
public interface ScreenStateNotifier {
void screenTurnedOn();
void screenTurnedOff();
}

View File

@@ -1,125 +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 com.moto.actions.util;
import android.util.Log;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public final class FileUtils {
private static final String TAG = "FileUtils";
private FileUtils() {
// This class is not supposed to be instantiated
}
/**
* Reads the first line of text from the given file.
* Reference {@link BufferedReader#readLine()} for clarification on what a line is
*
* @return the read line contents, or null on failure
*/
public static String readOneLine(String fileName) {
String line = "0";
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(fileName), 512);
line = reader.readLine();
} catch (FileNotFoundException e) {
Log.w(TAG, "No such file " + fileName + " for reading", e);
} catch (IOException e) {
Log.e(TAG, "Could not read from file " + fileName, e);
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (IOException e) {
// Ignored, not much we can do anyway
}
}
return line;
}
/**
* Writes the given value into the given file
*
* @return true on success, false on failure
*/
public static boolean writeLine(String fileName, String value) {
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(fileName));
writer.write(value);
} catch (FileNotFoundException e) {
Log.w(TAG, "No such file " + fileName + " for writing", e);
return false;
} catch (IOException e) {
Log.e(TAG, "Could not write to file " + fileName, e);
return false;
} finally {
try {
if (writer != null) {
writer.close();
}
} catch (IOException e) {
// Ignored, not much we can do anyway
}
}
return true;
}
/**
* Checks whether the given file exists
*
* @return true if exists, false if not
*/
public static boolean fileExists(String fileName) {
final File file = new File(fileName);
return file.exists();
}
/**
* Checks whether the given file is readable
*
* @return true if readable, false if not
*/
public static boolean isFileReadable(String fileName) {
final File file = new File(fileName);
return file.exists() && file.canRead();
}
/**
* Checks whether the given file is writable
*
* @return true if writable, false if not
*/
public static boolean isFileWritable(String fileName) {
final File file = new File(fileName);
return file.exists() && file.canWrite();
}
}

View File

@@ -5,4 +5,4 @@ Device configuration for Motorola msm8953 Devices
Supported devices :
Ali, Albus, Sanders
Ali, Albus, Potter, Sanders

19
aosp.dependencies Normal file
View File

@@ -0,0 +1,19 @@
[
{
"remote": "pixel-devices-blobs",
"repository": "vendor_motorola_msm8953-common",
"target_path": "vendor/motorola/msm8953-common",
"branch": "eleven"
},
{
"repository": "kernel_motorola_msm8953",
"target_path": "kernel/motorola/msm8953",
"branch": "eleven"
},
{
"repository" : "hardware_motorola",
"target_path" : "hardware/motorola",
"branch" : "eleven",
"remote" : "pixel"
}
]

View File

@@ -31,8 +31,10 @@ static inline const char* BtmGetDefaultName()
return "Moto G(6)";
if (strstr(product_device, "albus"))
return "Moto Z2 Play";
if (strstr(product_device, "potter"))
return "Moto G(5) Plus";
if (strstr(product_device, "sanders"))
return "Moto G(5)S";
return "Moto G(5S) Plus";
// Fallback to ro.product.model
return "Moto MSM8953";

View File

@@ -1,213 +0,0 @@
#Build FP to be picked by both system and vendor
BUILD_FINGERPRINT := "google/walleye/walleye:8.1.0/OPM1.171019.011/4448085:user/release-keys"
# ART
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.boot-dex2oat-threads=8 \
dalvik.vm.dex2oat-filter=speed \
dalvik.vm.dex2oat-threads=8 \
dalvik.vm.image-dex2oat-filter=speed \
ro.sys.fw.dex2oat_thread_count=8 \
ro.vendor.qti.am.reschedule_service=true
# Audio
PRODUCT_PROPERTY_OVERRIDES += \
af.fast_track_multiplier=2 \
audio.deep_buffer.media=true \
audio.offload.min.duration.secs=30 \
audio.offload.video=true \
persist.vendor.audio.dualmic.config=endfire \
persist.vendor.audio.fluence.voicecall=true \
persist.vendor.audio.fluence.voicecomm=true \
persist.vendor.audio.fluence.voicerec=false \
persist.vendor.audio.fluence.speaker=false \
persist.vendor.audio.hw.binder.size_kbyte=1024 \
persist.vendor.audio.ras.enabled=false \
vendor.persist.speaker.prot.enable=false \
ro.vendor.audio.sdk.ssr=false \
ro.vendor.audio.sdk.fluencetype=none \
ro.qc.sdk.audio.fluencetype=none \
ro.qc.sdk.audio.ssr=false \
vendor.audio_hal.period_size=240 \
vendor.audio.hw.aac.encoder=true \
vendor.audio.offload.buffer.size.kb=64 \
vendor.audio.offload.gapless.enabled=false \
vendor.audio.offload.multiple.enabled=false \
vendor.audio.offload.pcm.16bit.enable=true \
vendor.audio.offload.pcm.24bit.enable=true \
vendor.audio.offload.track.enable=true \
vendor.audio.parser.ip.buffer.size=262144 \
vendor.audio.safx.pbe.enabled=true \
vendor.audio.use.sw.alac.decoder=false \
vendor.audio.use.sw.ape.decoder=false \
vendor.voice.path.for.pcm.voip=false \
vendor.audio.offload.min.duration.secs=30
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
use.voice.path.for.pcm.voip=false
# Bluetooth
PRODUCT_PROPERTY_OVERRIDES += \
bluetooth.hfp.client=1 \
vendor.qcom.bluetooth.soc=smd \
ro.bluetooth.hfp.ver=1.7
# Camera
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.camera.expose.aux=1 \
ro.camera.cfa.packagelist=org.codeaurora.snapcam,com.motorola.camera2 \
vidc.enc.dcvs.extra-buff-count=2 \
vendor.camera.aux.packagelist=com.motorola.camera2
# Codec2 switch
PRODUCT_PROPERTY_OVERRIDES += \
debug.media.codec2=2
# Color Mode
PRODUCT_PROPERTY_OVERRIDES += \
vendor.display.enable_default_color_mode=1
# Display
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.hwc_set_default_colormode=true \
debug.sf.enable_hwc_vds=1 \
debug.sf.hw=1 \
debug.sf.latch_unsignaled=1 \
debug.egl.hw=1 \
persist.hwc.mdpcomp.enable=true \
vendor.gralloc.enable_fb_ubwc=1 \
vendor.display.disable_skip_validate=1 \
vendor.video.disable.ubwc=1 \
dev.pm.dyn_samplingrate=1 \
persist.demo.hdmirotationlock=false \
debug.enable.sglscale=1 \
debug.gralloc.enable_fb_ubwc=1 \
debug.sf.recomputecrop=0 \
ro.opengles.version=196610 \
ro.qualcomm.cabl=0
# Fingerprint
PRODUCT_PROPERTY_OVERRIDES += \
persist.qfp=false
# FM
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.fm.use_audio_session=true
# Media
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
media.stagefright.thumbnail.prefer_hw_codecs=true
# OMX
# Rank OMX SW codecs lower than OMX HW codecs
PRODUCT_PROPERTY_OVERRIDES += \
debug.stagefright.omx_default_rank.sw-audio=1 \
debug.stagefright.omx_default_rank=0
# NITZ
PRODUCT_PROPERTY_OVERRIDES += \
persist.rild.nitz_plmn="" \
persist.rild.nitz_long_ons_0="" \
persist.rild.nitz_long_ons_1="" \
persist.rild.nitz_long_ons_2="" \
persist.rild.nitz_long_ons_3="" \
persist.rild.nitz_short_ons_0="" \
persist.rild.nitz_short_ons_1="" \
persist.rild.nitz_short_ons_2="" \
persist.rild.nitz_short_ons_3=""
# Perf
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.extension_library=libqti-perfd-client.so
# Time daemon
PRODUCT_PROPERTY_OVERRIDES += \
persist.timed.enable=true
# Radio
PRODUCT_PROPERTY_OVERRIDES += \
persist.dbg.volte_avail_ovr=1 \
persist.dbg.vt_avail_ovr=1 \
persist.dbg.wfc_avail_ovr=1 \
persist.vendor.radio.no_wait_for_card=1 \
persist.vendor.radio.dfr_mode_set=1 \
persist.vendor.radio.relay_oprt_change=1 \
persist.vendor.radio.oem_ind_to_both=0 \
persist.vendor.radio.qcril_uim_vcc_feature=1 \
persist.vendor.radio.0x9e_not_callname=1 \
persist.vendor.radio.mt_sms_ack=30 \
persist.vendor.radio.force_get_pref=1 \
persist.vendor.radio.is_wps_enabled=true \
persist.vendor.radio.custom_ecc=1 \
persist.vendor.radio.eri64_as_home=1 \
persist.vendor.radio.data_con_rprt=1 \
persist.vendor.radio.sib16_support=1 \
persist.vendor.radio.rat_on=combine \
persist.vendor.radio.sw_mbn_update=1 \
persist.vendor.radio.jbims=1 \
persist.vendor.radio.msgtunnel.start=true \
persist.vendor.radio.sar_sensor=1 \
persist.vendor.radio.apn_delay=5000 \
persist.vendor.radio.calls.on.ims=true \
persist.vendor.radio.domain.ps=0 \
persist.vendor.radio.fi_supported=1 \
persist.vendor.cne.rat.wlan.chip.oem=WCN \
persist.vendor.sys.cnd.iwlan=1 \
persist.vendor.data.mode=concurrent \
persist.data.netmgrd.qos.enable=true \
persist.radio.aosp_usr_pref_sel=true \
persist.radio.pb.min.match=7 \
persist.radio.fi_supported=1 \
persist.data.qmi.adb_logmask=0 \
persist.radio.adb_log_on=0 \
persist.vendor.radio.apm_sim_not_pwdn=1 \
persist.vendor.radio.procedure_bytes=SKIP \
persist.vendor.radio.aosp_usr_pref_sel=true \
persist.vendor.radio.flexmap_type=none \
persist.vendor.radio.data_con_rprt=true \
persist.vendor.radio.add_power_save=1 \
persist.net.doxlat=true \
persist.vendor.qc.sub.rdump.on=1 \
persist.vendor.qc.sub.rdump.max=3 \
ro.telephony.call_ring.multiple=false \
ro.telephony.default_network=10,10 \
ro.vendor.telephony.default_network=10,10 \
ro.vendor.use_data_netmgrd=true \
ro.telephony.iwlan_operation_mode=legacy \
persist.vendor.ims.dropset_feature=0 \
persist.vendor.ims.disableDebugLogs=0 \
persist.vendor.ims.disableIMSLogs=0 \
persist.vendor.ims.disableDebugDataPathLogs=0 \
persist.vendor.ims.disableADBLogs=0 \
persist.vendor.ims.vt.enableadb=3 \
persist.vendor.ims.disableQXDMLogs=1 \
ro.vendor.build.vendorprefix=/vendor \
vendor.rild.libpath=/vendor/lib64/libril-qc-qmi-1.so \
ro.telephony.use_old_mnc_mcc_format=true
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
persist.sys.fflag.override.settings_network_and_internet_v2=true \
persist.vendor.cne.feature=1 \
persist.vendor.dpm.feature=0 \
DEVICE_PROVISIONED=1 \
ril.subscription.types=NV,RUIM \
telephony.lteOnCdmaDevice=1
# SurfaceFlinger
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.surface_flinger.force_hwc_copy_for_virtual_displays=true \
ro.surface_flinger.max_virtual_display_dimension=4096 \
ro.surface_flinger.protected_contents=true \
ro.surface_flinger.vsync_event_phase_offset_ns=2000000 \
ro.surface_flinger.vsync_sf_event_phase_offset_ns=6000000 \
ro.surface_flinger.use_color_management=true
PRODUCT_PROPERTY_OVERRIDES += \
debug.sf.early_phase_offset_ns=1500000 \
debug.sf.early_app_phase_offset_ns=1500000 \
debug.sf.early_gl_phase_offset_ns=3000000 \
debug.sf.early_gl_app_phase_offset_ns=15000000
# Wifi
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0

View File

@@ -1,16 +0,0 @@
#
# FPC1020 Touch sensor driver
#
# Copyright (c) 2013,2014 Fingerprint Cards AB <tech@fingerprints.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License Version 2
# as published by the Free Software Foundation.
#
device.internal = 1
keyboard.layout = uinput-fpc
keyboard.builtIn = 1
keyboard.orientationAware = 0

View File

@@ -1,31 +0,0 @@
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 158 BACK
key 139 APP_SWITCH
key 172 HOME
key 217 SEARCH

View File

@@ -1,32 +0,0 @@
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 115 VOLUME_UP
key 114 VOLUME_DOWN
key 102 HOME WAKE
key 528 FOCUS
key 766 CAMERA

View File

@@ -1,31 +0,0 @@
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 158 BACK
key 139 APP_SWITCH
key 172 HOME
key 217 SEARCH

View File

@@ -1,31 +0,0 @@
# Copyright (c) 2014,2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 158 BACK
key 139 APP_SWITCH
key 172 HOME
key 217 SEARCH

View File

@@ -1,31 +0,0 @@
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 158 BACK
key 139 APP_SWITCH
key 172 HOME
key 217 SEARCH

View File

@@ -1,15 +0,0 @@
#
# FPC1020 Touch sensor driver
#
# Copyright (c) 2013,2014 Fingerprint Cards AB <tech@fingerprints.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License Version 2
# as published by the Free Software Foundation.
#
# fpc1020 "finger present"
key 616 HOME VIRTUAL
key 617 VOICE_ASSIST VIRTUAL
key 620 APP_SWITCH VIRTUAL
key 621 BACK VIRTUAL

View File

@@ -77,11 +77,6 @@ It allows additional grants on top of privapp-permissions-platform.xml
<permission name="android.permission.REBOOT"/>
</privapp-permissions>
<privapp-permissions package="com.qualcomm.wfd.service">
<permission name="android.permission.READ_FRAME_BUFFER"/>
<permission name="android.permission.WRITE_MEDIA_STORAGE"/>
</privapp-permissions>
<privapp-permissions package="com.android.mms">
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
<permission name="android.permission.WRITE_APN_SETTINGS"/>

View File

@@ -0,0 +1,13 @@
libqti-perfd-client.so
libadsprpc.so
libcdsprpc.so
libsdsprpc.so
libfastcvopt.so
liblistenjni.so
liblistensoundmodel2.so
libOpenCL.so
libnpu.so
libhta_hexagon_runtime.so
unnhal-acc-hta.so
libprotobuf-cpp-full.so
libprotobuf-cpp-lite.so

View File

@@ -110,8 +110,6 @@
<hidden-api-whitelisted-app package="org.codeaurora.bluetooth" />
<hidden-api-whitelisted-app package="com.qualcomm.qti.qmmi" />
<hidden-api-whitelisted-app package="com.qualcomm.qti.perfdump" />
<hidden-api-whitelisted-app package="com.qualcomm.wfd.client" />
<hidden-api-whitelisted-app package="com.qualcomm.wfd.service" />
<hidden-api-whitelisted-app package="com.qualcomm.qti.server.wigigapp" />
<hidden-api-whitelisted-app package="com.qti.service.colorservice" />
</config>

View File

@@ -274,6 +274,8 @@
18:4294967295:1001:3004
/* Allow RCS service to communicate to IMS QMI Priv Svc*/
77:4294967295:1001:3003
/* Allow RCS service to access QMI-IMSS service */
18:4294967295:1001:3003
/* Allow SSGQMIGD to communicate to SSGCCS service*/
76:4294967295:1001
/* Allow cnd to accquire netbind */

View File

@@ -5,3 +5,4 @@ wowlan_triggers=magic_pkt
interworking=1
hs20=1
auto_interworking=0
driver_param=use_p2p_group_interface=1

View File

@@ -1,54 +1,41 @@
#!/bin/bash
#
# Copyright (C) 2020 Pixel Experience
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2020 The LineageOS 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.
# SPDX-License-Identifier: Apache-2.0
#
set -e
DEVICE_COMMON=msm8953-common
VENDOR=motorola
# Load extract_utils and do some sanity checks
COMMON_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$COMMON_DIR" ]]; then COMMON_DIR="$PWD"; fi
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
if [[ -z "$DEVICE_DIR" ]]; then
DEVICE_DIR="${COMMON_DIR}/../${DEVICE}"
fi
ANDROID_ROOT="${MY_DIR}/../../.."
ROOT="$COMMON_DIR"/../../..
HELPER="$ROOT"/vendor/aosp/build/tools/extract_utils.sh
if [ ! -f "$HELPER" ]; then
echo "Unable to find helper script at $HELPER"
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
. "$HELPER"
source "${HELPER}"
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true
ONLY_COMMON=false
ONLY_DEVICE=false
ONLY_COMMON=
ONLY_TARGET=
KANG=
SECTION=
while [ "${#}" -gt 0 ]; do
case "${1}" in
-o | --only-common )
--only-common )
ONLY_COMMON=true
;;
-d | --only-device )
ONLY_DEVICE=true
--only-target )
ONLY_TARGET=true
;;
-n | --no-cleanup )
CLEAN_VENDOR=false
@@ -67,48 +54,58 @@ while [ "${#}" -gt 0 ]; do
shift
done
if [ -z "$SRC" ]; then
SRC=adb
if [ -z "${SRC}" ]; then
SRC="adb"
fi
function blob_fixup() {
case "${1}" in
# Fix xml version
product/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml | product/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml)
sed -i 's/xml version="2.0"/xml version="1.0"/' "${2}"
;;
# Fix xml version
product/etc/permissions/vendor.qti.hardware.data.connection-V1.0-java.xml | product/etc/permissions/vendor.qti.hardware.data.connection-V1.1-java.xml)
sed -i 's/xml version="2.0"/xml version="1.0"/' "${2}"
;;
# Fix fingerprint UHID
vendor/etc/init/android.hardware.biometrics.fingerprint@2.1-service.rc)
sed -i 's/group system input 9015/group system uhid input 9015/' "${2}"
;;
# Fix fingerprint UHID
vendor/etc/init/android.hardware.biometrics.fingerprint@2.1-service.rc)
sed -i 's/group system input 9015/group system uhid input 9015/' "${2}"
;;
# qsap shim
vendor/lib64/libmdmcutback.so)
patchelf --add-needed libqsap_shim.so "${2}"
;;
# memset shim
vendor/bin/charge_only_mode)
"${PATCHELF}" --add-needed libmemset_shim.so "${2}"
;;
vendor/lib/libmot_gpu_mapper.so)
sed -i "s/libgui/libwui/" "${2}"
;;
# qsap shim
vendor/lib64/libmdmcutback.so)
"${PATCHELF}" --add-needed libqsap_shim.so "${2}"
;;
vendor/lib/libmot_gpu_mapper.so)
sed -i "s/libgui/libwui/" "${2}"
;;
# Fix missing symbols
vendor/lib64/libril-qc-hal-qmi.so)
"${PATCHELF}" --add-needed "libcutils_shim.so" "${2}"
;;
esac
}
# Initialize the common helper
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$ROOT" true $CLEAN_VENDOR
if [ -z "${ONLY_TARGET}" ]; then
# Initialize the helper for common device
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
if [[ "$ONLY_DEVICE" = "false" ]] && [[ -s "${COMMON_DIR}"/proprietary-files.txt ]]; then
extract "$COMMON_DIR"/proprietary-files.txt "$SRC" "${KANG}" --section "${SECTION}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
fi
if [[ "$ONLY_COMMON" = "false" ]] && [[ -s "${DEVICE_DIR}"/proprietary-files.txt ]]; then
if [[ ! "$IS_COMMON" = "true" ]]; then
IS_COMMON=false
fi
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
# Reinitialize the helper for device
setup_vendor "$DEVICE" "$VENDOR" "$ROOT" "$IS_COMMON" "$CLEAN_VENDOR"
extract "${DEVICE_DIR}"/proprietary-files.txt "$SRC" "${KANG}" --section "${SECTION}"
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
fi
"$COMMON_DIR"/setup-makefiles.sh
"${MY_DIR}/setup-makefiles.sh"

View File

@@ -1,5 +1,5 @@
//
// Copyright (C) 2019 The LineageOS Project
// Copyright (C) 2019-2020 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -21,5 +21,8 @@ cc_library_static {
include_dirs: [
"system/core/base/include",
"system/core/init"
],
shared_libs: [
"libbase",
]
}

View File

@@ -1,6 +1,6 @@
/*
Copyright (c) 2016, The CyanogenMod Project
Copyright (c) 2019, The LineageOS Project
Copyright (c) 2019-2020, The LineageOS Project
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -42,7 +42,6 @@
#include "property_service.h"
using android::base::GetProperty;
using android::init::property_set;
char const *heapstartsize;
char const *heapgrowthlimit;
@@ -51,17 +50,6 @@ char const *heapminfree;
char const *heapmaxfree;
char const *heaptargetutilization;
void property_override(char const prop[], char const value[], bool add = true)
{
prop_info *pi;
pi = (prop_info*) __system_property_find(prop);
if (pi)
__system_property_update(pi, value, strlen(value));
else if (add)
__system_property_add(prop, strlen(prop), value, strlen(value));
}
void check_device()
{
struct sysinfo sys;
@@ -95,16 +83,27 @@ void check_device()
}
}
void property_override(char const prop[], char const value[], bool add = true)
{
auto pi = (prop_info *) __system_property_find(prop);
if (pi != nullptr) {
__system_property_update(pi, value, strlen(value));
} else if (add) {
__system_property_add(prop, strlen(prop), value, strlen(value));
}
}
void vendor_load_properties()
{
check_device();
property_set("dalvik.vm.heapstartsize", heapstartsize);
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
property_set("dalvik.vm.heapsize", heapsize);
property_set("dalvik.vm.heaptargetutilization", heaptargetutilization);
property_set("dalvik.vm.heapminfree", heapminfree);
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
property_override("dalvik.vm.heapstartsize", heapstartsize);
property_override("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
property_override("dalvik.vm.heapsize", heapsize);
property_override("dalvik.vm.heaptargetutilization", heaptargetutilization);
property_override("dalvik.vm.heapminfree", heapminfree);
property_override("dalvik.vm.heapmaxfree", heapmaxfree);
// Setting carrier prop
std::string carrier = GetProperty("ro.boot.carrier", "unknown");

4
interfaces/Android.bp Normal file
View File

@@ -0,0 +1,4 @@
hidl_package_root {
name: "com.fingerprints",
path: "device/motorola/msm8953-common/interfaces",
}

View File

@@ -0,0 +1,11 @@
hidl_interface {
name: "com.fingerprints.extension@1.0",
root: "com.fingerprints",
srcs: [
"IFingerprintNavigation.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
gen_java: false,
}

View File

@@ -0,0 +1,6 @@
package com.fingerprints.extension@1.0;
interface IFingerprintNavigation {
setNavigation(bool enabled);
isEnabled() generates (bool isEnabled);
};

View File

@@ -14,7 +14,7 @@
# limitations under the License.
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := libhidltransport
LOCAL_SHARED_LIBRARIES := libhidlbase
LOCAL_MODULE := android.hidl.base@1.0
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
@@ -22,14 +22,14 @@ LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := libhidltransport
LOCAL_SHARED_LIBRARIES := libhidlbase
LOCAL_MODULE := android.hidl.manager@1.0
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := libhidltransport
LOCAL_SHARED_LIBRARIES := libhidlbase
LOCAL_MODULE := android.hidl.base@1.0_system
LOCAL_INSTALLED_MODULE_STEM := android.hidl.base@1.0.so
LOCAL_MODULE_TAGS := optional

18
libshims/Android.bp Normal file
View File

@@ -0,0 +1,18 @@
cc_library {
name: "libmemset_shim",
vendor: true,
target: {
android_arm: {
srcs: ["memset32.S"],
sanitize: {
misc_undefined: ["integer"],
},
},
android_arm64: {
srcs: ["android_memset.S"],
sanitize: {
misc_undefined: ["integer"],
},
},
},
}

View File

@@ -31,3 +31,11 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := strdup16to8.cpp
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MODULE := libcutils_shim
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)

211
libshims/android_memset.S Normal file
View File

@@ -0,0 +1,211 @@
/* Copyright (c) 2012, Linaro Limited
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Linaro nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Assumptions:
*
* ARMv8-a, AArch64
* Unaligned accesses
*
*/
/* By default we assume that the DC instruction can be used to zero
data blocks more efficiently. In some circumstances this might be
unsafe, for example in an asymmetric multiprocessor environment with
different DC clear lengths (neither the upper nor lower lengths are
safe to use). */
#define dst x0
#define count x2
#define tmp1 x3
#define tmp1w w3
#define tmp2 x4
#define tmp2w w4
#define zva_len_x x5
#define zva_len w5
#define zva_bits_x x6
#define A_l x1
#define A_lw w1
#define tmp3w w9
#define ENTRY(f) \
.text; \
.globl f; \
.align 0; \
.type f, %function; \
f: \
.cfi_startproc \
#define END(f) \
.cfi_endproc; \
.size f, .-f; \
ENTRY(android_memset16)
ands A_lw, A_lw, #0xffff
b.eq .Lzero_mem
orr A_lw, A_lw, A_lw, lsl #16
b .Lexpand_to_64
END(android_memset16)
ENTRY(android_memset32)
cmp A_lw, #0
b.eq .Lzero_mem
.Lexpand_to_64:
orr A_l, A_l, A_l, lsl #32
.Ltail_maybe_long:
cmp count, #64
b.ge .Lnot_short
.Ltail_maybe_tiny:
cmp count, #15
b.le .Ltail15tiny
.Ltail63:
ands tmp1, count, #0x30
b.eq .Ltail15
add dst, dst, tmp1
cmp tmp1w, #0x20
b.eq 1f
b.lt 2f
stp A_l, A_l, [dst, #-48]
1:
stp A_l, A_l, [dst, #-32]
2:
stp A_l, A_l, [dst, #-16]
.Ltail15:
and count, count, #15
add dst, dst, count
stp A_l, A_l, [dst, #-16] /* Repeat some/all of last store. */
ret
.Ltail15tiny:
/* Set up to 15 bytes. Does not assume earlier memory
being set. */
tbz count, #3, 1f
str A_l, [dst], #8
1:
tbz count, #2, 1f
str A_lw, [dst], #4
1:
tbz count, #1, 1f
strh A_lw, [dst], #2
1:
ret
/* Critical loop. Start at a new cache line boundary. Assuming
* 64 bytes per line, this ensures the entire loop is in one line. */
.p2align 6
.Lnot_short:
neg tmp2, dst
ands tmp2, tmp2, #15
b.eq 2f
/* Bring DST to 128-bit (16-byte) alignment. We know that there's
* more than that to set, so we simply store 16 bytes and advance by
* the amount required to reach alignment. */
sub count, count, tmp2
stp A_l, A_l, [dst]
add dst, dst, tmp2
/* There may be less than 63 bytes to go now. */
cmp count, #63
b.le .Ltail63
2:
sub dst, dst, #16 /* Pre-bias. */
sub count, count, #64
1:
stp A_l, A_l, [dst, #16]
stp A_l, A_l, [dst, #32]
stp A_l, A_l, [dst, #48]
stp A_l, A_l, [dst, #64]!
subs count, count, #64
b.ge 1b
tst count, #0x3f
add dst, dst, #16
b.ne .Ltail63
ret
/* For zeroing memory, check to see if we can use the ZVA feature to
* zero entire 'cache' lines. */
.Lzero_mem:
mov A_l, #0
cmp count, #63
b.le .Ltail_maybe_tiny
neg tmp2, dst
ands tmp2, tmp2, #15
b.eq 1f
sub count, count, tmp2
stp A_l, A_l, [dst]
add dst, dst, tmp2
cmp count, #63
b.le .Ltail63
1:
/* For zeroing small amounts of memory, it's not worth setting up
* the line-clear code. */
cmp count, #128
b.lt .Lnot_short
mrs tmp1, dczid_el0
tbnz tmp1, #4, .Lnot_short
mov tmp3w, #4
and zva_len, tmp1w, #15 /* Safety: other bits reserved. */
lsl zva_len, tmp3w, zva_len
.Lzero_by_line:
/* Compute how far we need to go to become suitably aligned. We're
* already at quad-word alignment. */
cmp count, zva_len_x
b.lt .Lnot_short /* Not enough to reach alignment. */
sub zva_bits_x, zva_len_x, #1
neg tmp2, dst
ands tmp2, tmp2, zva_bits_x
b.eq 1f /* Already aligned. */
/* Not aligned, check that there's enough to copy after alignment. */
sub tmp1, count, tmp2
cmp tmp1, #64
ccmp tmp1, zva_len_x, #8, ge /* NZCV=0b1000 */
b.lt .Lnot_short
/* We know that there's at least 64 bytes to zero and that it's safe
* to overrun by 64 bytes. */
mov count, tmp1
2:
stp A_l, A_l, [dst]
stp A_l, A_l, [dst, #16]
stp A_l, A_l, [dst, #32]
subs tmp2, tmp2, #64
stp A_l, A_l, [dst, #48]
add dst, dst, #64
b.ge 2b
/* We've overrun a bit, so adjust dst downwards. */
add dst, dst, tmp2
1:
sub count, count, zva_len_x
3:
dc zva, dst
add dst, dst, zva_len_x
subs count, count, zva_len_x
b.ge 3b
ands count, count, zva_bits_x
b.ne .Ltail_maybe_long
ret
END(android_memset32)

View File

@@ -1,6 +1,5 @@
/*
* Copyright (c) 2015 The CyanogenMod Project
* Copyright (c) 2017 The LineageOS Project
* Copyright (C) 2006 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.
@@ -15,8 +14,24 @@
* limitations under the License.
*/
package com.moto.actions;
#pragma once
public interface SensorAction {
void action();
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#if __STDC_VERSION__ < 201112L && __cplusplus < 201103L
typedef uint16_t char16_t;
#endif
// otherwise char16_t is a keyword with the right semantics
extern char * strndup16to8 (const char16_t* s, size_t n);
extern size_t strnlen16to8 (const char16_t* s, size_t n);
extern char * strncpy16to8 (char *dest, const char16_t*s, size_t n);
#ifdef __cplusplus
}
#endif

View File

@@ -8,6 +8,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/wireless.h>
#include <string.h>
#include "log/log.h"
@@ -69,7 +70,7 @@ s32 wifi_qsap_set_tx_power(s32 tx_power)
close(sock);
if (ret) {
ALOGE("%s :IOCTL set tx power failed: %ld\n", __func__, ret);
ALOGE("%s :IOCTL set tx power failed: %d\n", __func__, ret);
ret = eERR_SET_TX_POWER;
} else {
ALOGD("%s :IOCTL set tx power issued\n", __func__);

Some files were not shown because too many files have changed in this diff Show More