Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1a34e154da
@ -1,5 +1,6 @@
|
|||||||
package io.neoterm.ui.term
|
package io.neoterm.ui.term
|
||||||
|
|
||||||
|
import android.Manifest
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.content.*
|
import android.content.*
|
||||||
@ -8,6 +9,7 @@ import android.content.res.Configuration
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
|
import android.support.v4.app.ActivityCompat
|
||||||
import android.support.v4.content.ContextCompat
|
import android.support.v4.content.ContextCompat
|
||||||
import android.support.v4.view.OnApplyWindowInsetsListener
|
import android.support.v4.view.OnApplyWindowInsetsListener
|
||||||
import android.support.v4.view.ViewCompat
|
import android.support.v4.view.ViewCompat
|
||||||
@ -72,6 +74,19 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN)
|
WindowManager.LayoutParams.FLAG_FULLSCREEN)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val SDCARD_PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 1
|
||||||
|
if (ContextCompat.checkSelfPermission(
|
||||||
|
this,
|
||||||
|
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||||
|
) != PackageManager.PERMISSION_GRANTED
|
||||||
|
) {
|
||||||
|
ActivityCompat.requestPermissions(
|
||||||
|
this,
|
||||||
|
arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE),
|
||||||
|
SDCARD_PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
setContentView(R.layout.ui_main)
|
setContentView(R.layout.ui_main)
|
||||||
|
|
||||||
toolbar = findViewById(R.id.terminal_toolbar)
|
toolbar = findViewById(R.id.terminal_toolbar)
|
||||||
|
Loading…
Reference in New Issue
Block a user