mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
Remove unnecessary Semicolons
This commit is contained in:
parent
9040056c67
commit
88079de6bc
2 changed files with 12 additions and 13 deletions
|
@ -27,7 +27,7 @@ class ChooseActivity : AppCompatActivity() {
|
|||
|
||||
if (app.flags and ApplicationInfo.FLAG_UPDATED_SYSTEM_APP != 0) {
|
||||
//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) {
|
||||
//it's a system app, not interested
|
||||
} else {
|
||||
|
@ -45,7 +45,7 @@ class ChooseActivity : AppCompatActivity() {
|
|||
val tvdynamic = TextView(this)
|
||||
tvdynamic.textSize = 20f
|
||||
tvdynamic.text = app.loadLabel(pm).toString()
|
||||
tvdynamic.setTextColor(Color.parseColor("#cccccc"));
|
||||
tvdynamic.setTextColor(Color.parseColor("#cccccc"))
|
||||
|
||||
tvdynamic.setOnClickListener { startActivity(pm.getLaunchIntentForPackage(app.packageName)) }
|
||||
|
||||
|
@ -57,7 +57,7 @@ class ChooseActivity : AppCompatActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
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)
|
||||
|
||||
setContentView(R.layout.activity_choose)
|
||||
|
|
|
@ -33,17 +33,17 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun launchApp(packageName: String, fallback: String = "") {
|
||||
val intent1 = getIntent(packageName);
|
||||
val intent1 = getIntent(packageName)
|
||||
|
||||
if(intent1!=null){
|
||||
applicationContext.startActivity(intent1)
|
||||
overridePendingTransition(0,0);
|
||||
overridePendingTransition(0,0)
|
||||
} else {
|
||||
val intent2 = getIntent(fallback);
|
||||
val intent2 = getIntent(fallback)
|
||||
|
||||
if(intent2!=null){
|
||||
applicationContext.startActivity(intent2)
|
||||
overridePendingTransition(0,0);
|
||||
overridePendingTransition(0,0)
|
||||
} else {
|
||||
Toast.makeText(this, "Package '$packageName' not found.", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
fun lauchVolumeUpApp() { }
|
||||
fun lauchVolumeDownApp() {
|
||||
val intent = Intent(this, ChooseActivity::class.java);
|
||||
val intent = Intent(this, ChooseActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,8 @@ class MainActivity : AppCompatActivity() {
|
|||
val width = displayMetrics.widthPixels
|
||||
val height = displayMetrics.heightPixels
|
||||
|
||||
val diffX = touchX - event.x;
|
||||
val diffY = touchY - event.y;
|
||||
val diffX = touchX - event.x
|
||||
val diffY = touchY - event.y
|
||||
|
||||
val strictness = 4 // of direction
|
||||
|
||||
|
@ -139,10 +139,9 @@ class MainActivity : AppCompatActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
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)
|
||||
|
||||
|
||||
val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
|
||||
val timeFormat = SimpleDateFormat("HH:mm:ss", Locale.getDefault())
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue