mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 19:15:58 +00:00
Optimize code
Pop a toast instead of crash when creating user failed Add popToast function Update READMEs
This commit is contained in:
@@ -10,7 +10,6 @@ import android.os.Build.VERSION
|
||||
import android.os.PersistableBundle
|
||||
import android.os.UserHandle
|
||||
import android.os.UserManager
|
||||
import android.widget.Toast
|
||||
import androidx.core.app.NotificationCompat
|
||||
import com.bintianqi.owndroid.dpm.handleNetworkLogs
|
||||
import com.bintianqi.owndroid.dpm.handlePrivilegeChange
|
||||
@@ -48,7 +47,7 @@ class Receiver : DeviceAdminReceiver() {
|
||||
|
||||
override fun onProfileProvisioningComplete(context: Context, intent: Intent) {
|
||||
super.onProfileProvisioningComplete(context, intent)
|
||||
Toast.makeText(context, R.string.create_work_profile_success, Toast.LENGTH_SHORT).show()
|
||||
context.popToast(R.string.create_work_profile_success)
|
||||
}
|
||||
|
||||
override fun onNetworkLogsAvailable(context: Context, intent: Intent, batchToken: Long, networkLogsCount: Int) {
|
||||
|
||||
Reference in New Issue
Block a user