@Override public char charAt (int index) { Log.d("Editable", "charAt"); return 0; }
@Override public int length () { Log.d("Editable", "length"); return 0; }
@Override public int getSpanEnd (Object tag) { Log.d("Editable", "getSpanEnd"); return 0; }
@Override public Editable append (CharSequence text, int start, int end) { Log.d("Editable", "append: " + text); return this; }
@Override public InputFilter[] getFilters () { Log.d("Editable", "getFilters"); return new InputFilter[0]; }
@Override public Editable replace (int st, int en, CharSequence text) { Log.d("Editable", "replace: " + text); return this; }
@Override public Editable replace (int st, int en, CharSequence source, int start, int end) { Log.d("Editable", "replace: " + source); return this; }
@Override public void debug (String tag, String message, Throwable exception) { Log.d(tag, message, exception); } }
@Override public Editable append (CharSequence text) { Log.d("Editable", "append: " + text); return this; }
@Override public void setFilters (InputFilter[] filters) { Log.d("Editable", "setFilters"); } }
@Override public void debug (String tag, String message, Throwable exception) { if (logLevel >= LOG_DEBUG) { Log.d(tag, message, exception); } }
@Override public int getSpanStart (Object tag) { Log.d("Editable", "getSpanStart"); return 0; }
@Override public int nextSpanTransition (int start, int limit, Class type) { Log.d("Editable", "nextSpanTransition"); return 0; }
@Override public Editable append (char text) { Log.d("Editable", "append: " + text); return this; }
@Override public void debug (String tag, String message, Throwable exception) { if (logLevel >= LOG_DEBUG) { Log.d(tag, message, exception); } }
/** Service is starting, libGDX application is shutdown now */ @Override public void onCreate () { if (DEBUG) Log.d(TAG, " > AndroidLiveWallpaperService - onCreate() " + hashCode()); Log.i(TAG, "service created"); super.onCreate(); }
@Override public boolean onKeyDown (int keyCode, KeyEvent event) { Log.d("Test", "down keycode: " + event.getKeyCode()); return super.onKeyDown(keyCode, event); }
/** One of wallpaper engines is starting. Do not override this method, service manages them internally. */ @Override public Engine onCreateEngine () { if (DEBUG) Log.d(TAG, " > AndroidLiveWallpaperService - onCreateEngine()"); Log.i(TAG, "engine created"); return new AndroidWallpaperEngine(); }
/** Called when the last engine is ending its live, it can occur when: 1. service is dying 2. service is switching from one * engine to another 3. [only my assumption] when wallpaper is not visible and system is going to restore some memory for * foreground processing by disposing not used wallpaper engine We can't destroy app there, because: 1. in won't work - gl * context is disposed right now and after app.onDestroy() app would stuck somewhere in gl thread synchronizing code 2. we * don't know if service create more engines, app is shared between them and should stay initialized waiting for new engines */ public void onDeepPauseApplication () { if (DEBUG) Log.d(TAG, " > AndroidLiveWallpaperService - onDeepPauseApplication()"); // free native resources consuming runtime memory, note that it can cause some lag when resuming wallpaper if (app != null) { app.graphics.clearManagedCaches(); } }
@Override public void onCreate (final SurfaceHolder surfaceHolder) { if (DEBUG) Log.d(TAG, " > AndroidWallpaperEngine - onCreate() " + hashCode() + " running: " + engines + ", linked: " + (linkedEngine == this) + ", thread: " + Thread.currentThread().toString()); super.onCreate(surfaceHolder); }