Loading api/current.txt +44 −0 Original line number Diff line number Diff line Loading @@ -19927,6 +19927,50 @@ package android.security { } package android.service.dreams { public class Dream extends android.app.Service implements android.view.Window.Callback { ctor public Dream(); method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public boolean dispatchGenericMotionEvent(android.view.MotionEvent); method public boolean dispatchKeyEvent(android.view.KeyEvent); method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent); method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public boolean dispatchTouchEvent(android.view.MotionEvent); method public boolean dispatchTrackballEvent(android.view.MotionEvent); method public android.view.View findViewById(int); method public void finish(); method public android.view.Window getWindow(); method public android.view.WindowManager getWindowManager(); method public boolean isInteractive(); method protected void lightsOut(); method public void onActionModeFinished(android.view.ActionMode); method public void onActionModeStarted(android.view.ActionMode); method public void onAttachedToWindow(); method public final android.os.IBinder onBind(android.content.Intent); method public void onContentChanged(); method public boolean onCreatePanelMenu(int, android.view.Menu); method public android.view.View onCreatePanelView(int); method public void onDetachedFromWindow(); method public boolean onMenuItemSelected(int, android.view.MenuItem); method public boolean onMenuOpened(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onSearchRequested(); method public void onStart(); method public final int onStartCommand(android.content.Intent, int, int); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public void onWindowFocusChanged(boolean); method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); method public void setContentView(int); method public void setContentView(android.view.View); method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public void setInteractive(boolean); field public static final java.lang.String SERVICE_INTERFACE = "android.service.dreams.Dream"; } } package android.service.textservice { public abstract class SpellCheckerService extends android.app.Service { core/java/android/service/dreams/Dream.java +28 −25 Original line number Diff line number Diff line /** * Copyright (C) 2012 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 * * http://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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.service.dreams; import com.android.internal.policy.PolicyManager; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.graphics.drawable.ColorDrawable; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.util.Slog; import android.view.ActionMode; import android.view.IWindowManager; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; Loading @@ -28,14 +33,14 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.accessibility.AccessibilityEvent; import android.view.WindowManager; import android.view.WindowManagerImpl; import com.android.internal.policy.PolicyManager; /** * @hide * * Extend this class to implement a custom screensaver. */ public class Dream extends Service implements Window.Callback { private final static boolean DEBUG = true; Loading Loading @@ -212,15 +217,10 @@ public class Dream extends Service implements Window.Callback { } /** * Called when this Dream is started. Place your initialization here. * * Subclasses must call through to the superclass implementation. * * XXX(dsandler) Might want to make this final and have a different method for clients to override * Called when this Dream is started. */ @Override public int onStartCommand(Intent intent, int flags, int startId) { return super.onStartCommand(intent, flags, startId); public void onStart() { // hook for subclasses } /** Loading Loading @@ -353,6 +353,9 @@ public class Dream extends Service implements Window.Callback { if (DEBUG) Slog.v(TAG, "Dream window added on thread " + Thread.currentThread().getId()); getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes()); // start it up onStart(); }}); } Loading core/java/android/service/dreams/DreamManagerService.java +13 −7 Original line number Diff line number Diff line Loading @@ -114,11 +114,19 @@ public class DreamManagerService if (DEBUG) Slog.v(TAG, "awaken()"); synchronized (mLock) { if (mCurrentDream != null) { if (DEBUG) Slog.v(TAG, "disconnecting: " + mCurrentDreamComponent + " service: " + mCurrentDream); mContext.unbindService(this); mCurrentDream = null; mCurrentDreamToken = null; } } } // IDreamManager method public boolean isDreaming() { return mCurrentDream != null; } public void bindDreamComponentL(ComponentName componentName, boolean test) { if (DEBUG) Slog.v(TAG, "bindDreamComponent: componentName=" + componentName + " pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()); Loading @@ -130,10 +138,6 @@ public class DreamManagerService ) .putExtra("android.dreams.TEST", test); if (!mContext.bindService(intent, this, Context.BIND_AUTO_CREATE)) { Slog.w(TAG, "unable to bind service: " + componentName); return; } mCurrentDreamComponent = componentName; mCurrentDreamToken = new Binder(); try { Loading @@ -145,6 +149,9 @@ public class DreamManagerService Slog.w(TAG, "Unable to add window token. Proceed at your own risk."); } if (!mContext.bindService(intent, this, Context.BIND_AUTO_CREATE)) { Slog.w(TAG, "unable to bind service: " + componentName); } } @Override Loading @@ -163,8 +170,7 @@ public class DreamManagerService @Override public void onServiceDisconnected(ComponentName name) { if (DEBUG) Slog.v(TAG, "disconnected: " + name + " service: " + mCurrentDream); mCurrentDream = null; mCurrentDreamToken = null; // Only happens in exceptional circumstances } @Override Loading core/java/android/service/dreams/IDreamManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -27,4 +27,5 @@ interface IDreamManager { void setDreamComponent(in ComponentName componentName); ComponentName getDreamComponent(); void testDream(in ComponentName componentName); boolean isDreaming(); } No newline at end of file core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -852,7 +852,7 @@ <string name="config_wimaxStateTrackerClassname" translatable="false"></string> <!-- enable screen saver feature --> <bool name="config_enableDreams">false</bool> <bool name="config_enableDreams">true</bool> <!-- Name of screensaver components to look for if none has been chosen by the user --> <string name="config_defaultDreamComponent" translatable="false">com.google.android.deskclock/com.android.deskclock.Screensaver</string> Loading Loading
api/current.txt +44 −0 Original line number Diff line number Diff line Loading @@ -19927,6 +19927,50 @@ package android.security { } package android.service.dreams { public class Dream extends android.app.Service implements android.view.Window.Callback { ctor public Dream(); method public void addContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public boolean dispatchGenericMotionEvent(android.view.MotionEvent); method public boolean dispatchKeyEvent(android.view.KeyEvent); method public boolean dispatchKeyShortcutEvent(android.view.KeyEvent); method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public boolean dispatchTouchEvent(android.view.MotionEvent); method public boolean dispatchTrackballEvent(android.view.MotionEvent); method public android.view.View findViewById(int); method public void finish(); method public android.view.Window getWindow(); method public android.view.WindowManager getWindowManager(); method public boolean isInteractive(); method protected void lightsOut(); method public void onActionModeFinished(android.view.ActionMode); method public void onActionModeStarted(android.view.ActionMode); method public void onAttachedToWindow(); method public final android.os.IBinder onBind(android.content.Intent); method public void onContentChanged(); method public boolean onCreatePanelMenu(int, android.view.Menu); method public android.view.View onCreatePanelView(int); method public void onDetachedFromWindow(); method public boolean onMenuItemSelected(int, android.view.MenuItem); method public boolean onMenuOpened(int, android.view.Menu); method public void onPanelClosed(int, android.view.Menu); method public boolean onPreparePanel(int, android.view.View, android.view.Menu); method public boolean onSearchRequested(); method public void onStart(); method public final int onStartCommand(android.content.Intent, int, int); method public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams); method public void onWindowFocusChanged(boolean); method public android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode.Callback); method public void setContentView(int); method public void setContentView(android.view.View); method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams); method public void setInteractive(boolean); field public static final java.lang.String SERVICE_INTERFACE = "android.service.dreams.Dream"; } } package android.service.textservice { public abstract class SpellCheckerService extends android.app.Service {
core/java/android/service/dreams/Dream.java +28 −25 Original line number Diff line number Diff line /** * Copyright (C) 2012 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 * * http://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, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.service.dreams; import com.android.internal.policy.PolicyManager; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.graphics.drawable.ColorDrawable; import android.os.Binder; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.util.Slog; import android.view.ActionMode; import android.view.IWindowManager; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; Loading @@ -28,14 +33,14 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.accessibility.AccessibilityEvent; import android.view.WindowManager; import android.view.WindowManagerImpl; import com.android.internal.policy.PolicyManager; /** * @hide * * Extend this class to implement a custom screensaver. */ public class Dream extends Service implements Window.Callback { private final static boolean DEBUG = true; Loading Loading @@ -212,15 +217,10 @@ public class Dream extends Service implements Window.Callback { } /** * Called when this Dream is started. Place your initialization here. * * Subclasses must call through to the superclass implementation. * * XXX(dsandler) Might want to make this final and have a different method for clients to override * Called when this Dream is started. */ @Override public int onStartCommand(Intent intent, int flags, int startId) { return super.onStartCommand(intent, flags, startId); public void onStart() { // hook for subclasses } /** Loading Loading @@ -353,6 +353,9 @@ public class Dream extends Service implements Window.Callback { if (DEBUG) Slog.v(TAG, "Dream window added on thread " + Thread.currentThread().getId()); getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes()); // start it up onStart(); }}); } Loading
core/java/android/service/dreams/DreamManagerService.java +13 −7 Original line number Diff line number Diff line Loading @@ -114,11 +114,19 @@ public class DreamManagerService if (DEBUG) Slog.v(TAG, "awaken()"); synchronized (mLock) { if (mCurrentDream != null) { if (DEBUG) Slog.v(TAG, "disconnecting: " + mCurrentDreamComponent + " service: " + mCurrentDream); mContext.unbindService(this); mCurrentDream = null; mCurrentDreamToken = null; } } } // IDreamManager method public boolean isDreaming() { return mCurrentDream != null; } public void bindDreamComponentL(ComponentName componentName, boolean test) { if (DEBUG) Slog.v(TAG, "bindDreamComponent: componentName=" + componentName + " pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()); Loading @@ -130,10 +138,6 @@ public class DreamManagerService ) .putExtra("android.dreams.TEST", test); if (!mContext.bindService(intent, this, Context.BIND_AUTO_CREATE)) { Slog.w(TAG, "unable to bind service: " + componentName); return; } mCurrentDreamComponent = componentName; mCurrentDreamToken = new Binder(); try { Loading @@ -145,6 +149,9 @@ public class DreamManagerService Slog.w(TAG, "Unable to add window token. Proceed at your own risk."); } if (!mContext.bindService(intent, this, Context.BIND_AUTO_CREATE)) { Slog.w(TAG, "unable to bind service: " + componentName); } } @Override Loading @@ -163,8 +170,7 @@ public class DreamManagerService @Override public void onServiceDisconnected(ComponentName name) { if (DEBUG) Slog.v(TAG, "disconnected: " + name + " service: " + mCurrentDream); mCurrentDream = null; mCurrentDreamToken = null; // Only happens in exceptional circumstances } @Override Loading
core/java/android/service/dreams/IDreamManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -27,4 +27,5 @@ interface IDreamManager { void setDreamComponent(in ComponentName componentName); ComponentName getDreamComponent(); void testDream(in ComponentName componentName); boolean isDreaming(); } No newline at end of file
core/res/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -852,7 +852,7 @@ <string name="config_wimaxStateTrackerClassname" translatable="false"></string> <!-- enable screen saver feature --> <bool name="config_enableDreams">false</bool> <bool name="config_enableDreams">true</bool> <!-- Name of screensaver components to look for if none has been chosen by the user --> <string name="config_defaultDreamComponent" translatable="false">com.google.android.deskclock/com.android.deskclock.Screensaver</string> Loading