This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static PendingIntent getAlarmIntent(Context context) | |
{ | |
return PendingIntent.getService(context, 0, new AlarmIntent(context, GeoLocationService.class).putExtra(KEY_INTENT_FLAG, VALUE_START), PendingIntent.FLAG_UPDATE_CURRENT); | |
} | |
private static void cancelAlarm(Context context) | |
{ | |
PendingIntent pendingIntent = getAlarmIntent(context); | |
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); | |
alarmManager.cancel(pendingIntent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name=".MainActivity" | |
android:showOnLockScreen="true"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.arellomobile.wagamamamvp; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.graphics.PixelFormat; | |
import android.os.Handler; | |
import android.os.IBinder; | |
import android.support.annotation.Nullable; | |
import android.util.Log; | |
import android.view.LayoutInflater; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onDestroy() { | |
super.onDestroy(); | |
boolean anyParentIsRemoving = false; | |
for (Fragment parent = this.getParentFragment(); !anyParentIsRemoving && parent != null; | |
parent = parent.getParentFragment()) { | |
anyParentIsRemoving = parent.isRemoving(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onDestroy() { | |
super.onDestroy(); | |
boolean anyParentIsRemoving = false; | |
for (Fragment parent = this.getParentFragment(); !anyParentIsRemoving && parent != null; | |
parent = parent.getParentFragment()) { | |
anyParentIsRemoving = parent.isRemoving(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_address_search_manual) | |
val address = intent.getSerializableExtra(KEY_BUNDLE_ADDRESS) as Address? | |
getPresenter().init(address, intent.getBooleanExtra(KEY_BUNDLE_WAITING_FOR_RESULT, false)) | |
initViews() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_address_search_manual) | |
val address = intent.getSerializableExtra(KEY_BUNDLE_ADDRESS) as Address? | |
getPresenter().init(address, intent.getBooleanExtra(KEY_BUNDLE_WAITING_FOR_RESULT, false)) | |
initViews() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App : Application() { | |
override fun onCreate() { | |
super.onCreate() | |
MvpFacade.init() | |
DI.init(this) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.hashset | |
import org.junit.Assert.assertFalse | |
import org.junit.Assert.assertTrue | |
import org.junit.Test | |
class HashSetUnitTest { | |
class Some(var a: Int, var b: Int) { | |
override fun equals(other: Any?): Boolean { |
OlderNewer