Remove unnecessary Semicolons

This commit is contained in:
Finn M Glas 2020-05-14 22:56:43 +02:00
parent 9040056c67
commit 88079de6bc
2 changed files with 12 additions and 13 deletions

View file

@ -27,7 +27,7 @@ class ChooseActivity : AppCompatActivity() {
if (app.flags and ApplicationInfo.FLAG_UPDATED_SYSTEM_APP != 0) { if (app.flags and ApplicationInfo.FLAG_UPDATED_SYSTEM_APP != 0) {
//checks for flags; if flagged, check if updated system app //checks for flags; if flagged, check if updated system app
installedApps.add(app); installedApps.add(app)
} else if (app.flags and ApplicationInfo.FLAG_SYSTEM != 0) { } else if (app.flags and ApplicationInfo.FLAG_SYSTEM != 0) {
//it's a system app, not interested //it's a system app, not interested
} else { } else {
@ -45,7 +45,7 @@ class ChooseActivity : AppCompatActivity() {
val tvdynamic = TextView(this) val tvdynamic = TextView(this)
tvdynamic.textSize = 20f tvdynamic.textSize = 20f
tvdynamic.text = app.loadLabel(pm).toString() tvdynamic.text = app.loadLabel(pm).toString()
tvdynamic.setTextColor(Color.parseColor("#cccccc")); tvdynamic.setTextColor(Color.parseColor("#cccccc"))
tvdynamic.setOnClickListener { startActivity(pm.getLaunchIntentForPackage(app.packageName)) } tvdynamic.setOnClickListener { startActivity(pm.getLaunchIntentForPackage(app.packageName)) }
@ -57,7 +57,7 @@ class ChooseActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
setContentView(R.layout.activity_choose) setContentView(R.layout.activity_choose)

View file

@ -33,17 +33,17 @@ class MainActivity : AppCompatActivity() {
} }
private fun launchApp(packageName: String, fallback: String = "") { private fun launchApp(packageName: String, fallback: String = "") {
val intent1 = getIntent(packageName); val intent1 = getIntent(packageName)
if(intent1!=null){ if(intent1!=null){
applicationContext.startActivity(intent1) applicationContext.startActivity(intent1)
overridePendingTransition(0,0); overridePendingTransition(0,0)
} else { } else {
val intent2 = getIntent(fallback); val intent2 = getIntent(fallback)
if(intent2!=null){ if(intent2!=null){
applicationContext.startActivity(intent2) applicationContext.startActivity(intent2)
overridePendingTransition(0,0); overridePendingTransition(0,0)
} else { } else {
Toast.makeText(this, "Package '$packageName' not found.", Toast.LENGTH_SHORT).show() Toast.makeText(this, "Package '$packageName' not found.", Toast.LENGTH_SHORT).show()
} }
@ -63,10 +63,10 @@ class MainActivity : AppCompatActivity() {
fun launchDownApp() { launchFinder(container) } fun launchDownApp() { launchFinder(container) }
fun lauchLeftApp() { launchCalendar(container) } fun lauchLeftApp() { launchCalendar(container) }
fun lauchRightApp() { launchMail(container) } fun lauchRightApp() { launchMail(container) }
fun lauchVolumeUpApp() { } fun lauchVolumeUpApp() { }
fun lauchVolumeDownApp() { fun lauchVolumeDownApp() {
val intent = Intent(this, ChooseActivity::class.java); val intent = Intent(this, ChooseActivity::class.java)
startActivity(intent) startActivity(intent)
} }
@ -92,8 +92,8 @@ class MainActivity : AppCompatActivity() {
val width = displayMetrics.widthPixels val width = displayMetrics.widthPixels
val height = displayMetrics.heightPixels val height = displayMetrics.heightPixels
val diffX = touchX - event.x; val diffX = touchX - event.x
val diffY = touchY - event.y; val diffY = touchY - event.y
val strictness = 4 // of direction val strictness = 4 // of direction
@ -139,10 +139,9 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
val timeFormat = SimpleDateFormat("HH:mm:ss", Locale.getDefault()) val timeFormat = SimpleDateFormat("HH:mm:ss", Locale.getDefault())