mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-07 10:02:01 +00:00
![Tad](/assets/img/avatar_default.png)
- 16.0: drop wallpaper optimization patch, questionable source - deblobber: don't remove libmmparser_lite.so, potentially used by camera - 17.1: pick Q_asb_2021-12, excluding a broken patch - clark 17.1: some camera denial fixes - alioth: unmark broken - 17.1: switch to upstream glibc fix - 17.1/18.1: disable per app sensors permission patchset, potential camera issues Signed-off-by: Tad <tad@spotco.us>
93 lines
3.6 KiB
Diff
93 lines
3.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tad <tad@spotco.us>
|
|
Date: Sun, 26 Sep 2021 14:10:53 -0400
|
|
Subject: [PATCH] Remove the Sensors Off tile
|
|
|
|
Signed-off-by: Tad <tad@spotco.us>
|
|
Change-Id: Ic1dce1c0fffc3c3f6459c4c85e0a64d480d3315a
|
|
---
|
|
AndroidManifest.xml | 11 -----
|
|
.../development/qstile/DevelopmentTiles.java | 42 -------------------
|
|
2 files changed, 53 deletions(-)
|
|
|
|
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
|
index c7c55d381e..fd6f4178bd 100644
|
|
--- a/AndroidManifest.xml
|
|
+++ b/AndroidManifest.xml
|
|
@@ -3080,17 +3080,6 @@
|
|
</intent-filter>
|
|
</service>
|
|
|
|
- <service
|
|
- android:name=".development.qstile.DevelopmentTiles$SensorsOff"
|
|
- android:label="@string/sensors_off_quick_settings_title"
|
|
- android:icon="@drawable/tile_icon_sensors_off"
|
|
- android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
|
|
- android:enabled="false">
|
|
- <intent-filter>
|
|
- <action android:name="android.service.quicksettings.action.QS_TILE" />
|
|
- </intent-filter>
|
|
- </service>
|
|
-
|
|
<activity
|
|
android:name=".HelpTrampoline"
|
|
android:exported="true"
|
|
diff --git a/src/com/android/settings/development/qstile/DevelopmentTiles.java b/src/com/android/settings/development/qstile/DevelopmentTiles.java
|
|
index bb791abef8..2fdb410150 100644
|
|
--- a/src/com/android/settings/development/qstile/DevelopmentTiles.java
|
|
+++ b/src/com/android/settings/development/qstile/DevelopmentTiles.java
|
|
@@ -20,7 +20,6 @@ import android.app.settings.SettingsEnums;
|
|
import android.content.ComponentName;
|
|
import android.content.Context;
|
|
import android.content.pm.PackageManager;
|
|
-import android.hardware.SensorPrivacyManager;
|
|
import android.app.KeyguardManager;
|
|
import android.os.IBinder;
|
|
import android.os.Parcel;
|
|
@@ -278,45 +277,4 @@ public abstract class DevelopmentTiles extends TileService {
|
|
}
|
|
}
|
|
}
|
|
-
|
|
- /**
|
|
- * Tile to toggle sensors off to control camera, mic, and sensors managed by the SensorManager.
|
|
- */
|
|
- public static class SensorsOff extends DevelopmentTiles {
|
|
- private Context mContext;
|
|
- private SensorPrivacyManager mSensorPrivacyManager;
|
|
- private KeyguardManager mKeyguardManager;
|
|
- private MetricsFeatureProvider mMetricsFeatureProvider;
|
|
- private boolean mIsEnabled;
|
|
-
|
|
- @Override
|
|
- public void onCreate() {
|
|
- super.onCreate();
|
|
- mContext = getApplicationContext();
|
|
- mSensorPrivacyManager = (SensorPrivacyManager) mContext.getSystemService(
|
|
- Context.SENSOR_PRIVACY_SERVICE);
|
|
- mIsEnabled = mSensorPrivacyManager.isSensorPrivacyEnabled();
|
|
- mMetricsFeatureProvider = FeatureFactory.getFactory(
|
|
- mContext).getMetricsFeatureProvider();
|
|
- mKeyguardManager = (KeyguardManager) mContext.getSystemService(
|
|
- Context.KEYGUARD_SERVICE);
|
|
- }
|
|
-
|
|
- @Override
|
|
- protected boolean isEnabled() {
|
|
- return mIsEnabled;
|
|
- }
|
|
-
|
|
- @Override
|
|
- public void setIsEnabled(boolean isEnabled) {
|
|
- // Don't allow sensors to be reenabled from the lock screen.
|
|
- if (mIsEnabled && mKeyguardManager.isKeyguardLocked()) {
|
|
- return;
|
|
- }
|
|
- mMetricsFeatureProvider.action(getApplicationContext(), SettingsEnums.QS_SENSOR_PRIVACY,
|
|
- isEnabled);
|
|
- mIsEnabled = isEnabled;
|
|
- mSensorPrivacyManager.setSensorPrivacy(isEnabled);
|
|
- }
|
|
- }
|
|
}
|