This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import imghdr | |
from pathlib import Path | |
import shutil | |
import uuid | |
from PIL import Image | |
from shutil import copyfile | |
def create_folder_if_not_exist(target_path: Path): | |
if (target_path.exists()): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean hasNotificationAccess() | |
{ | |
ContentResolver contentResolver = this.getContentResolver(); | |
String enabledNotificationListeners = Settings.Secure.getString(contentResolver, "enabled_notification_listeners"); | |
String packageName = this.getPackageName(); | |
// check to see if the enabledNotificationListeners String contains our package name | |
return !(enabledNotificationListeners == null || !enabledNotificationListeners.contains(packageName)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |