summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2013-10-14 17:21:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-14 17:21:33 +0000
commit774e8ad88331f82994e38d721418da556ce9edea (patch)
treec2843e94f7d19ff2ff5c7fd382b2082649ae4be7 /core/java/android
parentedbab7b58227e66c2cc4e868bba314020ef52080 (diff)
parentf1a36648ca099d7ffa8a19e403673820d4b8417a (diff)
downloadframeworks_base-774e8ad88331f82994e38d721418da556ce9edea.zip
frameworks_base-774e8ad88331f82994e38d721418da556ce9edea.tar.gz
frameworks_base-774e8ad88331f82994e38d721418da556ce9edea.tar.bz2
Merge "Implement new SYSTEM_UI_FLAG_IMMERSIVE_STICKY." into klp-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/provider/Settings.java2
-rw-r--r--core/java/android/widget/Toast.java69
2 files changed, 3 insertions, 68 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 6f1c6ba..7f24539 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4379,7 +4379,7 @@ public final class Settings {
public static final String BAR_SERVICE_COMPONENT = "bar_service_component";
/** @hide */
- public static final String TRANSIENT_NAV_CONFIRMATIONS = "transient_nav_confirmations";
+ public static final String IMMERSIVE_MODE_CONFIRMATIONS = "immersive_mode_confirmations";
/**
* This is the query URI for finding a print service to install.
diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java
index 4b71e36..e38dfa7 100644
--- a/core/java/android/widget/Toast.java
+++ b/core/java/android/widget/Toast.java
@@ -75,9 +75,6 @@ public class Toast {
*/
public static final int LENGTH_LONG = 1;
- /** @hide */
- public static final int LENGTH_INFINITE = 2;
-
final Context mContext;
final TN mTN;
int mDuration;
@@ -294,61 +291,6 @@ public class Toast {
tv.setText(s);
}
- /** @hide */
- public static Toast makeBar(Context context, int resId, int duration) {
- return makeBar(context, context.getResources().getText(resId), duration);
- }
-
- /** @hide */
- public static Toast makeBar(Context context, CharSequence text, int duration) {
- Toast result = new Toast(context);
-
- LayoutInflater inflate = (LayoutInflater)
- context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- View v = inflate.inflate(com.android.internal.R.layout.toast_bar, null);
- ((TextView)v.findViewById(android.R.id.message)).setText(text);
- v.findViewById(android.R.id.button1).setVisibility(View.GONE);
-
- result.mNextView = v;
- result.mDuration = duration;
- result.mTN.mParams.alpha = 0.9f;
- result.mTN.mParams.windowAnimations = com.android.internal.R.style.Animation_ToastBar;
-
- return result;
- }
-
- /** @hide */
- public Toast setAction(int resId, Runnable action) {
- return setAction(mContext.getResources().getText(resId), action);
- }
-
- /** @hide */
- public Toast setAction(CharSequence actionText, final Runnable action) {
- if (mNextView != null) {
- TextView text1 = (TextView)mNextView.findViewById(android.R.id.text1);
- View button1 = mNextView.findViewById(android.R.id.button1);
- if (text1 != null && button1 != null) {
- text1.setText(actionText);
- button1.setVisibility(View.VISIBLE);
- button1.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- if (action != null) {
- action.run();
- }
- }});
- return setInteractive(true);
- }
- }
- throw new RuntimeException("This Toast was not created with Toast.makeBar()");
- }
-
- /** @hide */
- public Toast setInteractive(boolean interactive) {
- mTN.setInteractive(interactive);
- return this;
- }
-
// =======================================================================================
// All the gunk below is the interaction with the Notification Service, which handles
// the proper ordering of these system-wide.
@@ -405,16 +347,9 @@ public class Toast {
params.windowAnimations = com.android.internal.R.style.Animation_Toast;
params.type = WindowManager.LayoutParams.TYPE_TOAST;
params.setTitle("Toast");
- setInteractive(false);
- }
-
- private void setInteractive(boolean interactive) {
- mParams.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
+ params.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
- | (interactive
- ? (WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
- | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH)
- : WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
+ | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
}
/**