forked from jens/Automation
ActivityDetection permission fixed
This commit is contained in:
@ -456,7 +456,8 @@ public class ActivityPermissions extends Activity
|
||||
{
|
||||
case activityDetection:
|
||||
addToArrayListUnique(permissionNameGoogleActivityDetection, requiredPermissions);
|
||||
addToArrayListUnique(Manifest.permission.ACTIVITY_RECOGNITION, requiredPermissions);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
addToArrayListUnique(Manifest.permission.ACTIVITY_RECOGNITION, requiredPermissions);
|
||||
break;
|
||||
case airplaneMode:
|
||||
addToArrayListUnique(Manifest.permission.ACCESS_NETWORK_STATE, requiredPermissions);
|
||||
|
@ -395,7 +395,7 @@ public class ReceiverCoordinator
|
||||
{
|
||||
if(!HeadphoneJackListener.isHeadphoneJackListenerActive())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "LocationProvider", "Starting HeadphoneJackListener because used in a new/changed rule.", 4);
|
||||
Miscellaneous.logEvent("i", "HeadphoneJackListener", "Starting HeadphoneJackListener because used in a new/changed rule.", 4);
|
||||
if(HeadphoneJackListener.getInstance().haveAllPermission())
|
||||
HeadphoneJackListener.getInstance().startListener(AutomationService.getInstance());
|
||||
}
|
||||
@ -404,7 +404,7 @@ public class ReceiverCoordinator
|
||||
{
|
||||
if(HeadphoneJackListener.isHeadphoneJackListenerActive())
|
||||
{
|
||||
Miscellaneous.logEvent("i", "LocationProvider", "Shutting down HeadphoneJackListener because not used in any rule.", 4);
|
||||
Miscellaneous.logEvent("i", "HeadphoneJackListener", "Shutting down HeadphoneJackListener because not used in any rule.", 4);
|
||||
HeadphoneJackListener.getInstance().stopListener(AutomationService.getInstance());
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
|
||||
private static boolean headsetConnected = false;
|
||||
private static int headphoneType = -1;
|
||||
|
||||
protected static boolean headphoneJackListenerActive=false;
|
||||
protected static boolean headphoneJackListenerActive = false;
|
||||
protected static IntentFilter headphoneJackListenerIntentFilter = null;
|
||||
protected static HeadphoneJackListener instance;
|
||||
|
||||
@ -108,7 +108,7 @@ public class HeadphoneJackListener extends BroadcastReceiver implements Automati
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Miscellaneous.logEvent("e", "ActivityDetectionReceiver", "Error starting HeadsetJackListener: " + Log.getStackTraceString(ex), 3);
|
||||
Miscellaneous.logEvent("e", "HeadsetJackListener", "Error starting HeadsetJackListener: " + Log.getStackTraceString(ex), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user