Gain adb root
.
$ adb shell am start -n com.android.engineeringmode/.qualcomm.DiagEnabled --es "code" "angela"
Download Magisk-v14.0 and extract it somewhere. Download MagiskManager.
/** | |
* Hides the system bars and makes the Activity "fullscreen". If this should be the default | |
* state it should be called from [Activity.onWindowFocusChanged] if hasFocus is true. | |
* It is also recommended to take care of cutout areas. The default behavior is that the app shows | |
* in the cutout area in portrait mode if not in fullscreen mode. This can cause "jumping" if the | |
* user swipes a system bar to show it. It is recommended to set [WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER], | |
* call [showBelowCutout] from [Activity.onCreate] | |
* (see [Android Developers article about cutouts](https://developer.android.com/guide/topics/display-cutout#never_render_content_in_the_display_cutout_area)). | |
* @see showSystemUI | |
* @see addSystemUIVisibilityListener |
/** | |
* Navigates only if this is safely possible; when this Fragment is still the current destination. | |
*/ | |
fun Fragment.navigateSafe( | |
@IdRes resId: Int, | |
args: Bundle? = null, | |
navOptions: NavOptions? = null, | |
navigatorExtras: Navigator.Extras? = null | |
) { | |
if (mayNavigate()) findNavController().navigate( |
package com.pixite.pigment.testing | |
import android.app.Activity | |
import android.app.Instrumentation | |
import android.content.Context | |
import android.content.Intent | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.FragmentActivity | |
import androidx.fragment.app.FragmentManager | |
import androidx.lifecycle.Lifecycle |
/* Copyright 2019 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.test.TestCoroutineDispatcher | |
import kotlinx.coroutines.test.TestCoroutineScope | |
import kotlinx.coroutines.test.resetMain | |
import kotlinx.coroutines.test.setMain | |
import org.junit.jupiter.api.extension.AfterAllCallback | |
import org.junit.jupiter.api.extension.AfterEachCallback | |
import org.junit.jupiter.api.extension.BeforeAllCallback | |
import org.junit.jupiter.api.extension.ExtendWith | |
import org.junit.jupiter.api.extension.ExtensionContext |
import com.android.tools.lint.client.api.UElementHandler | |
import com.android.tools.lint.detector.api.* | |
import org.jetbrains.uast.UElement | |
import org.jetbrains.uast.UPostfixExpression | |
class NonNullAssertionDetector : Detector(), Detector.UastScanner { | |
override fun getApplicableUastTypes(): List<Class<out UElement>>? { | |
return listOf(UPostfixExpression::class.java) | |
} |
package com.nezspencer.test | |
import android.os.Bundle | |
import android.support.annotation.NonNull | |
import android.support.v7.app.AppCompatActivity | |
import android.text.Editable | |
import android.text.TextUtils | |
import android.text.TextWatcher | |
import android.widget.EditText | |
import java.text.NumberFormat |
package com.test.android.helpers; | |
import android.os.Build; | |
import android.webkit.WebResourceResponse; | |
import com.google.gson.Gson; | |
import com.google.gson.reflect.TypeToken; | |
import com.test.android.Application; | |
import org.apache.commons.collections.CollectionUtils; |
Gain adb root
.
$ adb shell am start -n com.android.engineeringmode/.qualcomm.DiagEnabled --es "code" "angela"
Download Magisk-v14.0 and extract it somewhere. Download MagiskManager.
import java.util.concurrent.TimeUnit; | |
import io.reactivex.Observable; | |
import io.reactivex.ObservableSource; | |
import io.reactivex.ObservableTransformer; | |
import io.reactivex.Observer; | |
import io.reactivex.functions.Consumer; | |
public static class CacheObservable<T> implements ObservableTransformer<T, T> { | |
private final long timeout; |