org.tamanegi.wallpaper.multipicture.plugin
クラス LazyPickService.LazyPicker

java.lang.Object
  上位を拡張 org.tamanegi.wallpaper.multipicture.plugin.LazyPickService.LazyPicker
含まれているクラス:
LazyPickService

public abstract static class LazyPickService.LazyPicker
extends Object

The main implementation of plugin.

LazyPicker Lifecycle

Following methods will be called from same thread, and the thread is separated for each LazyPicker instance.


コンストラクタの概要
LazyPickService.LazyPicker()
           
 
メソッドの概要
 void finish()
          Notify to live wallpaper that the lazy picker is no longer need to work.
abstract  PictureContentInfo getNext()
          Should be implemented to return a picture content to show as wallpaper.
 void notifyChanged()
          Notify to live wallpaper about picture content is changed.
protected  void onStart(String key, ScreenInfo hint)
          Called when lazy picker is starting.
protected  void onStop()
          Called when lazy picker is stopping.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

LazyPickService.LazyPicker

public LazyPickService.LazyPicker()
メソッドの詳細

getNext

public abstract PictureContentInfo getNext()
Should be implemented to return a picture content to show as wallpaper.
The URI of content should be one of following schemes:

戻り値:
The picture content for wallpaper.
If returns not null, content's URI will be used.
If returns null, previously returned content will be used.
関連項目:
ContentResolver.openInputStream(Uri)

onStart

protected void onStart(String key,
                       ScreenInfo hint)
Called when lazy picker is starting.
The plugin can initialize in this method. key parameter is unique for each settings, and its value is same as PictureSourceContract.EXTRA_KEY extra value when setting activity called. The plugin can use this key for SharedPreferences's key.

パラメータ:
key - The configuration specific key.
hint - The screen specific hint.

onStop

protected void onStop()
Called when lazy picker is stopping.
The plugin should release all resources related to picker.


notifyChanged

public final void notifyChanged()
Notify to live wallpaper about picture content is changed. getNext() will be called later if plugin calls notifyChanged().
NOTE: notifyChanged() and getNext() may or may not paired. For example, when calling notifyChanged() twice, getNext() will be called once, twice or more. Because getNext() is only called when reloading, and reloading is caused only when wallpaper is visible. The reloading is also caused by user operation.


finish

public final void finish()
Notify to live wallpaper that the lazy picker is no longer need to work. onStop() will be called later.