1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
| package com.perqin.copyshare;
import android.content.ClipboardManager.OnPrimaryClipChangedListener; import kotlin.Metadata; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Intrinsics;
@Metadata( mv = {1, 1, 6}, bv = {1, 0, 1}, k = 3 ) final class CopyListenerServiceKt$sam$OnPrimaryClipChangedListener$15d0add3 implements OnPrimaryClipChangedListener { private final Function0 function;
CopyListenerServiceKt$sam$OnPrimaryClipChangedListener$15d0add3(Function0 var1) { this.function = var1; }
public final void onPrimaryClipChanged() { Intrinsics.checkExpressionValueIsNotNull(this.function.invoke(), "invoke(...)"); } }
package com.perqin.copyshare;
import android.app.Service; import android.content.ClipboardManager; import android.content.Intent; import android.content.ClipboardManager.OnPrimaryClipChangedListener; import android.os.IBinder; import android.util.Log; import kotlin.Lazy; import kotlin.LazyKt; import kotlin.Metadata; import kotlin.TypeCastException; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.PropertyReference1Impl; import kotlin.jvm.internal.Reflection; import kotlin.reflect.KProperty; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable;
@Metadata( mv = {1, 1, 6}, bv = {1, 0, 1}, k = 1, d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0005\u0018\u0000 \u00182\u00020\u0001:\u0001\u0018B\u0005¢\u0006\u0002\u0010\u0002J\u0014\u0010\u000e\u001a\u0004\u0018\u00010\u000f2\b\u0010\u0010\u001a\u0004\u0018\u00010\u0011H\u0016J\b\u0010\u0012\u001a\u00020\u000bH\u0016J\"\u0010\u0013\u001a\u00020\u00142\b\u0010\u0015\u001a\u0004\u0018\u00010\u00112\u0006\u0010\u0016\u001a\u00020\u00142\u0006\u0010\u0017\u001a\u00020\u0014H\u0016R\u001b\u0010\u0003\u001a\u00020\u00048FX\u0086\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\u0005\u0010\u0006R\u0017\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u000b0\n¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\r¨\u0006\u0019"}, d2 = {"Lcom/perqin/copyshare/CopyListenerService;", "Landroid/app/Service;", "()V", "clipboardManager", "Landroid/content/ClipboardManager;", "getClipboardManager", "()Landroid/content/ClipboardManager;", "clipboardManager$delegate", "Lkotlin/Lazy;", "onPrimaryClipChangedListener", "Lkotlin/Function0;", "", "getOnPrimaryClipChangedListener", "()Lkotlin/jvm/functions/Function0;", "onBind", "Landroid/os/IBinder;", "p0", "Landroid/content/Intent;", "onDestroy", "onStartCommand", "", "intent", "flags", "startId", "Companion", "production sources for module app"} ) public final class CopyListenerService extends Service { @NotNull private final Lazy clipboardManager$delegate = LazyKt.lazy((Function0)(new Function0() { public Object invoke() { return this.invoke(); }
@NotNull public final ClipboardManager invoke() { Object var10000 = CopyListenerService.this.getSystemService("clipboard"); if(var10000 == null) { throw new TypeCastException("null cannot be cast to non-null type android.content.ClipboardManager"); } else { return (ClipboardManager)var10000; } } })); @NotNull private final Function0 onPrimaryClipChangedListener = (Function0)(new Function0() { public Object invoke() { this.invoke(); return Unit.INSTANCE; }
public final void invoke() { Log.d(CopyListenerService.Companion.getTAG(), "Clip Item count: " + CopyListenerService.this.getClipboardManager().getPrimaryClip().getItemCount()); } }); @NotNull private static final String TAG = "CopyListenerService"; static final KProperty[] $$delegatedProperties = new KProperty[]{(KProperty)Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(CopyListenerService.class), "clipboardManager", "getClipboardManager()Landroid/content/ClipboardManager;"))}; public static final CopyListenerService.Companion Companion = new CopyListenerService.Companion((DefaultConstructorMarker)null);
@Nullable public IBinder onBind(@Nullable Intent p0) { return null; }
public int onStartCommand(@Nullable Intent intent, int flags, int startId) { ClipboardManager var10000 = this.getClipboardManager(); CopyListenerServiceKt$sam$OnPrimaryClipChangedListener$15d0add3 var10001 = new CopyListenerServiceKt$sam$OnPrimaryClipChangedListener$15d0add3; Function0 var10003 = this.onPrimaryClipChangedListener; if(this.onPrimaryClipChangedListener == null) { Object var10002 = null; } else { var10001.<init>(var10003); }
var10000.addPrimaryClipChangedListener((OnPrimaryClipChangedListener)var10001); return 1; }
public void onDestroy() { super.onDestroy(); ClipboardManager var10000 = this.getClipboardManager(); CopyListenerServiceKt$sam$OnPrimaryClipChangedListener$15d0add3 var10001 = new CopyListenerServiceKt$sam$OnPrimaryClipChangedListener$15d0add3; Function0 var10003 = this.onPrimaryClipChangedListener; if(this.onPrimaryClipChangedListener == null) { Object var10002 = null; } else { var10001.<init>(var10003); }
var10000.removePrimaryClipChangedListener((OnPrimaryClipChangedListener)var10001); }
@NotNull public final ClipboardManager getClipboardManager() { Lazy var1 = this.clipboardManager$delegate; KProperty var3 = $$delegatedProperties[0]; return (ClipboardManager)var1.getValue(); }
@NotNull public final Function0 getOnPrimaryClipChangedListener() { return this.onPrimaryClipChangedListener; }
@Metadata( mv = {1, 1, 6}, bv = {1, 0, 1}, k = 1, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0014\u0010\u0003\u001a\u00020\u0004X\u0086D¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lcom/perqin/copyshare/CopyListenerService$Companion;", "", "()V", "TAG", "", "getTAG", "()Ljava/lang/String;", "production sources for module app"} ) public static final class Companion { @NotNull public final String getTAG() { return CopyListenerService.TAG; }
private Companion() { }
public Companion(DefaultConstructorMarker $constructor_marker) { this(); } } }
|