mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 11:05:59 +00:00
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -72,12 +72,6 @@ jobs:
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Download telegram-bot-api
|
||||
run: |
|
||||
mkdir ./binaries
|
||||
wget "https://github.com/jakbin/telegram-bot-api-binary/releases/download/latest/telegram-bot-api" -O ./binaries/telegram-bot-api
|
||||
chmod +x ./binaries/telegram-bot-api
|
||||
|
||||
- name: Start API Server & Upload
|
||||
env:
|
||||
COMMIT_MESSAGE: |+
|
||||
@@ -91,8 +85,7 @@ jobs:
|
||||
mv ./$RELEASE_TEST_PWD/app-release.apk ./$RELEASE_TEST_PWD.apk && rm -rf ./$RELEASE_TEST_PWD
|
||||
export RELEASE_SIGNED_PWD=$(find . -name "*release-signed*")
|
||||
mv ./$RELEASE_SIGNED_PWD/app-release.apk ./$RELEASE_SIGNED_PWD.apk && rm -rf ./$RELEASE_SIGNED_PWD
|
||||
../binaries/telegram-bot-api --api-id=${{ secrets.TELEGRAM_API_APP_ID }} --api-hash=${{ secrets.TELEGRAM_API_HASH }} --local 2>&1 > /dev/null &
|
||||
export token=${{ secrets.TELEGRAM_BOT_KEY }}
|
||||
curl -v "http://127.0.0.1:8081/bot$token/sendMediaGroup?chat_id=-1002203528169&media=%5B%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2FreleaseTest%22%7D%2C%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2FreleaseSigned%22%2C%22parse_mode%22%3A%22HTML%22%2C%22caption%22%3A${ESCAPED}%7D%5D" \
|
||||
curl -v "http://api.telegram.org/bot$token/sendMediaGroup?chat_id=-1002203528169&media=%5B%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2FreleaseTest%22%7D%2C%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2FreleaseSigned%22%2C%22parse_mode%22%3A%22HTML%22%2C%22caption%22%3A${ESCAPED}%7D%5D" \
|
||||
-F releaseTest="@$RELEASE_TEST_PWD.apk" \
|
||||
-F releaseSigned="@$RELEASE_SIGNED_PWD.apk"
|
||||
|
||||
@@ -689,16 +689,16 @@ class MyViewModel(application: Application): AndroidViewModel(application) {
|
||||
statusBarDisabled = if (VERSION.SDK_INT >= 34 &&
|
||||
privilege.run { device || (profile && affiliated) })
|
||||
DPM.isStatusBarDisabled else false,
|
||||
autoTimeEnabled = if (VERSION.SDK_INT >= 30 && privilege.run { device || org })
|
||||
autoTimeEnabled = if (VERSION.SDK_INT >= 30 && (privilege.device || privilege.org))
|
||||
DPM.getAutoTimeEnabled(DAR) else false,
|
||||
autoTimeZoneEnabled = if (VERSION.SDK_INT >= 30 && privilege.run { device || org })
|
||||
autoTimeZoneEnabled = if (VERSION.SDK_INT >= 30 && (privilege.device || privilege.org))
|
||||
DPM.getAutoTimeZoneEnabled(DAR) else false,
|
||||
autoTimeRequired = if (VERSION.SDK_INT < 30) DPM.autoTimeRequired else false,
|
||||
masterVolumeMuted = DPM.isMasterVolumeMuted(DAR),
|
||||
backupServiceEnabled = if (VERSION.SDK_INT >= 26) DPM.isBackupServiceEnabled(DAR) else false,
|
||||
btContactSharingDisabled = if (privilege.work)
|
||||
DPM.getBluetoothContactSharingDisabled(DAR) else false,
|
||||
commonCriteriaMode = if (VERSION.SDK_INT >= 30 && privilege.run { device || org })
|
||||
commonCriteriaMode = if (VERSION.SDK_INT >= 30 && (privilege.device || privilege.org))
|
||||
DPM.isCommonCriteriaModeEnabled(DAR) else false,
|
||||
usbSignalEnabled = if (VERSION.SDK_INT >= 31) DPM.isUsbDataSignalingEnabled else false,
|
||||
canDisableUsbSignal = if (VERSION.SDK_INT >= 31) DPM.canUsbDataSignalingBeDisabled() else false
|
||||
@@ -1346,15 +1346,17 @@ class MyViewModel(application: Application): AndroidViewModel(application) {
|
||||
DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
|
||||
MyAdminComponent
|
||||
)
|
||||
intent.putExtra(
|
||||
DevicePolicyManager.EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE,
|
||||
Account(options.accountName, options.accountType)
|
||||
)
|
||||
if (VERSION.SDK_INT >= 26) {
|
||||
if (options.migrateAccount) {
|
||||
intent.putExtra(
|
||||
DevicePolicyManager.EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION,
|
||||
options.keepAccount
|
||||
DevicePolicyManager.EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE,
|
||||
Account(options.accountName, options.accountType)
|
||||
)
|
||||
if (VERSION.SDK_INT >= 26) {
|
||||
intent.putExtra(
|
||||
DevicePolicyManager.EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION,
|
||||
options.keepAccount
|
||||
)
|
||||
}
|
||||
}
|
||||
if (VERSION.SDK_INT >= 24) {
|
||||
intent.putExtra(
|
||||
@@ -1927,7 +1929,12 @@ class MyViewModel(application: Application): AndroidViewModel(application) {
|
||||
}
|
||||
@RequiresApi(26)
|
||||
fun setRpToken(token: String): Boolean {
|
||||
return DPM.setResetPasswordToken(DAR, token.encodeToByteArray())
|
||||
return try {
|
||||
DPM.setResetPasswordToken(DAR, token.encodeToByteArray())
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
false
|
||||
}
|
||||
}
|
||||
@RequiresApi(26)
|
||||
fun clearRpToken(): Boolean {
|
||||
|
||||
@@ -242,7 +242,7 @@ fun AppChooserScreen(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.combinedClickable(onLongClick = {
|
||||
if (params.multiSelect) {
|
||||
if (params.multiSelect && it !in selectedPackages) {
|
||||
selectedPackages += it
|
||||
hf.performHapticFeedback(HapticFeedbackType.LongPress)
|
||||
}
|
||||
|
||||
@@ -97,7 +97,9 @@ fun PasswordScreen(vm: MyViewModel,onNavigateUp: () -> Unit, onNavigate: (Any) -
|
||||
if(privilege.device) {
|
||||
FunctionItem(R.string.max_time_to_lock, icon = R.drawable.schedule_fill0) { dialog = 1 }
|
||||
FunctionItem(R.string.pwd_expiration_timeout, icon = R.drawable.lock_clock_fill0) { dialog = 3 }
|
||||
FunctionItem(R.string.max_pwd_fail, icon = R.drawable.no_encryption_fill0) { dialog = 4 }
|
||||
if (SP.displayDangerousFeatures) {
|
||||
FunctionItem(R.string.max_pwd_fail, icon = R.drawable.no_encryption_fill0) { dialog = 4 }
|
||||
}
|
||||
}
|
||||
if(VERSION.SDK_INT >= 26) {
|
||||
FunctionItem(R.string.required_strong_auth_timeout, icon = R.drawable.fingerprint_off_fill0) { dialog = 2 }
|
||||
|
||||
Reference in New Issue
Block a user