Skip to content

Commit

Permalink
UPDATE: Minor tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
oasisfeng committed May 2, 2020
1 parent 3aa3376 commit a9b231e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</intent-filter>
</receiver>

<receiver android:name="com.oasisfeng.island.settings.IslandSettingsActivity$Enabler"> <!-- Enable SettingsActivity then disable self -->
<receiver android:name="com.oasisfeng.island.settings.IslandSettingsActivity$Enabler"> <!-- Enable IslandSettingsActivity then disable self -->
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package com.oasisfeng.island.settings

import android.Manifest.permission.*
Expand Down Expand Up @@ -39,7 +41,7 @@ import com.oasisfeng.island.util.Users
*
* Created by Oasis on 2019-10-12.
*/
class IslandSettingsFragment: @Suppress("DEPRECATION") android.preference.PreferenceFragment() {
class IslandSettingsFragment: android.preference.PreferenceFragment() {

override fun onResume() {
super.onResume()
Expand Down Expand Up @@ -150,7 +152,7 @@ class IslandSettingsActivity: Activity() {
setContentView(R.layout.activity_main)
title = intent?.getStringExtra(Intent.EXTRA_TITLE)
?: getString(R.string.tab_island).let { if (Users.current() == Users.profile) it else "$it (${Users.toId(Users.current())})"}
@Suppress("DEPRECATION") fragmentManager.beginTransaction().replace(android.R.id.content, IslandSettingsFragment()).commit()
fragmentManager.beginTransaction().replace(android.R.id.content, IslandSettingsFragment()).commit()
}

class Enabler: BroadcastReceiver() { // One-time enabler for
Expand Down
4 changes: 0 additions & 4 deletions open/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ android {
dependencies {
implementation project(':shared')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.core:core-ktx:1.0.2"
}
repositories {
mavenCentral()
}

0 comments on commit a9b231e

Please sign in to comment.