OPlusExtras: Adapt to Lineage
Change paths required for touch gesture functionality according to LineageOS Source
This commit is contained in:
@@ -23,6 +23,8 @@ android_app {
|
||||
static_libs: [
|
||||
"androidx.core_core",
|
||||
"androidx.preference_preference",
|
||||
"org.lineageos.platform.internal",
|
||||
"org.lineageos.settings.resources",
|
||||
"particles",
|
||||
],
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ import android.view.KeyEvent;
|
||||
|
||||
import com.android.internal.os.DeviceKeyHandler;
|
||||
|
||||
import lineageos.providers.LineageSettings;
|
||||
|
||||
public class KeyHandler implements DeviceKeyHandler {
|
||||
|
||||
private static final String TAG = KeyHandler.class.getSimpleName();
|
||||
@@ -229,7 +231,7 @@ public class KeyHandler implements DeviceKeyHandler {
|
||||
|
||||
private void launchCamera() {
|
||||
mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
|
||||
final Intent intent = new Intent(android.content.Intent.ACTION_SCREEN_CAMERA_GESTURE);
|
||||
final Intent intent = new Intent(lineageos.content.Intent.ACTION_SCREEN_CAMERA_GESTURE);
|
||||
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT,
|
||||
Manifest.permission.STATUS_BAR_SERVICE);
|
||||
doHapticFeedback();
|
||||
@@ -317,10 +319,13 @@ public class KeyHandler implements DeviceKeyHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean enabled = Settings.System.getInt(mContext.getContentResolver(),
|
||||
Settings.System.TOUCHSCREEN_GESTURE_HAPTIC_FEEDBACK, 1) != 0;
|
||||
if (enabled) {
|
||||
mVibrator.vibrate(VibrationEffect.get(VibrationEffect.EFFECT_CLICK));
|
||||
if (mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_SILENT) {
|
||||
final boolean enabled = LineageSettings.System.getInt(mContext.getContentResolver(),
|
||||
LineageSettings.System.TOUCHSCREEN_GESTURE_HAPTIC_FEEDBACK, 1) != 0;
|
||||
if (enabled) {
|
||||
mVibrator.vibrate(VibrationEffect.createOneShot(50,
|
||||
VibrationEffect.DEFAULT_AMPLITUDE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragment;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.android.internal.aospextended.hardware.LineageHardwareManager;
|
||||
import com.android.internal.aospextended.hardware.TouchscreenGesture;
|
||||
import lineageos.hardware.LineageHardwareManager;
|
||||
import lineageos.hardware.TouchscreenGesture;
|
||||
|
||||
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user