Fix code style issues

This commit is contained in:
Mygod
2018-02-04 15:07:38 -08:00
parent 9fb180956f
commit a755b669c8
30 changed files with 145 additions and 178 deletions
@@ -70,8 +70,8 @@ abstract class NativePluginProvider : ContentProvider() {
/**
* Returns executable entry absolute path. This is used if plugin is sharing UID with the host.
*
* Default behavior is throwing UnsupportedOperationException. If you don't wish to use this feature, use the default
* behavior.
* Default behavior is throwing UnsupportedOperationException. If you don't wish to use this feature, use the
* default behavior.
*
* @return Absolute path for executable entry.
*/
@@ -29,13 +29,11 @@ import android.widget.Toast
* Activity that's capable of getting EXTRA_OPTIONS input.
*/
abstract class OptionsCapableActivity : AppCompatActivity() {
protected fun pluginOptions(intent: Intent = this.intent): PluginOptions {
return try {
PluginOptions(intent.getStringExtra(PluginContract.EXTRA_OPTIONS))
} catch (exc: IllegalArgumentException) {
Toast.makeText(this, exc.message, Toast.LENGTH_SHORT).show()
PluginOptions()
}
protected fun pluginOptions(intent: Intent = this.intent) = try {
PluginOptions(intent.getStringExtra(PluginContract.EXTRA_OPTIONS))
} catch (exc: IllegalArgumentException) {
Toast.makeText(this, exc.message, Toast.LENGTH_SHORT).show()
PluginOptions()
}
/**