import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
-import android.os.Handler;
import android.os.UserManager;
import android.preference.Preference;
import android.preference.PreferenceActivity;
Intent intent2 = new Intent(Intent.ACTION_DELETE, Uri.parse("package:" + packageName));
intent2.putExtra(Intent.EXTRA_USER, userManager.getUserForSerialNumber(userId));
- new Handler().post(() -> {
- try {
- startActivity(intent2);
- } catch (ActivityNotFoundException | IllegalArgumentException e) { /* Gracefully fail */ }
- });
+ try {
+ startActivity(intent2);
+ } catch (ActivityNotFoundException | IllegalArgumentException e) { /* Gracefully fail */ }
}
showStartMenu = false;