Merge "Adds a content-intent-launching-activity flag to WearableExtender" into nyc-dev
am: a5ec16e
* commit 'a5ec16e367637ba0638f906615cbfef6f4d85d13':
Adds a content-intent-launching-activity flag to WearableExtender
Change-Id: I7af69f8e647d055a2ee9e0ac66aec7d9ee140f0b
This commit is contained in:
@@ -5026,11 +5026,13 @@ package android.app {
|
||||
method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
|
||||
method public java.lang.CharSequence getCancelLabel();
|
||||
method public java.lang.CharSequence getConfirmLabel();
|
||||
method public boolean getHintContentIntentLaunchesActivity();
|
||||
method public java.lang.CharSequence getInProgressLabel();
|
||||
method public boolean isAvailableOffline();
|
||||
method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
|
||||
method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
|
||||
method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
|
||||
method public android.app.Notification.Action.WearableExtender setHintContentIntentLaunchesActivity(boolean);
|
||||
method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
|
||||
}
|
||||
|
||||
@@ -5207,6 +5209,7 @@ package android.app {
|
||||
method public android.app.PendingIntent getDisplayIntent();
|
||||
method public int getGravity();
|
||||
method public boolean getHintAvoidBackgroundClipping();
|
||||
method public boolean getHintContentIntentLaunchesActivity();
|
||||
method public boolean getHintHideIcon();
|
||||
method public int getHintScreenTimeout();
|
||||
method public boolean getHintShowBackgroundOnly();
|
||||
@@ -5222,6 +5225,7 @@ package android.app {
|
||||
method public android.app.Notification.WearableExtender setDisplayIntent(android.app.PendingIntent);
|
||||
method public android.app.Notification.WearableExtender setGravity(int);
|
||||
method public android.app.Notification.WearableExtender setHintAvoidBackgroundClipping(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintContentIntentLaunchesActivity(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintHideIcon(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintScreenTimeout(int);
|
||||
method public android.app.Notification.WearableExtender setHintShowBackgroundOnly(boolean);
|
||||
|
||||
@@ -5159,11 +5159,13 @@ package android.app {
|
||||
method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
|
||||
method public java.lang.CharSequence getCancelLabel();
|
||||
method public java.lang.CharSequence getConfirmLabel();
|
||||
method public boolean getHintContentIntentLaunchesActivity();
|
||||
method public java.lang.CharSequence getInProgressLabel();
|
||||
method public boolean isAvailableOffline();
|
||||
method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
|
||||
method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
|
||||
method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
|
||||
method public android.app.Notification.Action.WearableExtender setHintContentIntentLaunchesActivity(boolean);
|
||||
method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
|
||||
}
|
||||
|
||||
@@ -5340,6 +5342,7 @@ package android.app {
|
||||
method public android.app.PendingIntent getDisplayIntent();
|
||||
method public int getGravity();
|
||||
method public boolean getHintAvoidBackgroundClipping();
|
||||
method public boolean getHintContentIntentLaunchesActivity();
|
||||
method public boolean getHintHideIcon();
|
||||
method public int getHintScreenTimeout();
|
||||
method public boolean getHintShowBackgroundOnly();
|
||||
@@ -5355,6 +5358,7 @@ package android.app {
|
||||
method public android.app.Notification.WearableExtender setDisplayIntent(android.app.PendingIntent);
|
||||
method public android.app.Notification.WearableExtender setGravity(int);
|
||||
method public android.app.Notification.WearableExtender setHintAvoidBackgroundClipping(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintContentIntentLaunchesActivity(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintHideIcon(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintScreenTimeout(int);
|
||||
method public android.app.Notification.WearableExtender setHintShowBackgroundOnly(boolean);
|
||||
|
||||
@@ -5026,11 +5026,13 @@ package android.app {
|
||||
method public android.app.Notification.Action.Builder extend(android.app.Notification.Action.Builder);
|
||||
method public java.lang.CharSequence getCancelLabel();
|
||||
method public java.lang.CharSequence getConfirmLabel();
|
||||
method public boolean getHintContentIntentLaunchesActivity();
|
||||
method public java.lang.CharSequence getInProgressLabel();
|
||||
method public boolean isAvailableOffline();
|
||||
method public android.app.Notification.Action.WearableExtender setAvailableOffline(boolean);
|
||||
method public android.app.Notification.Action.WearableExtender setCancelLabel(java.lang.CharSequence);
|
||||
method public android.app.Notification.Action.WearableExtender setConfirmLabel(java.lang.CharSequence);
|
||||
method public android.app.Notification.Action.WearableExtender setHintContentIntentLaunchesActivity(boolean);
|
||||
method public android.app.Notification.Action.WearableExtender setInProgressLabel(java.lang.CharSequence);
|
||||
}
|
||||
|
||||
@@ -5207,6 +5209,7 @@ package android.app {
|
||||
method public android.app.PendingIntent getDisplayIntent();
|
||||
method public int getGravity();
|
||||
method public boolean getHintAvoidBackgroundClipping();
|
||||
method public boolean getHintContentIntentLaunchesActivity();
|
||||
method public boolean getHintHideIcon();
|
||||
method public int getHintScreenTimeout();
|
||||
method public boolean getHintShowBackgroundOnly();
|
||||
@@ -5222,6 +5225,7 @@ package android.app {
|
||||
method public android.app.Notification.WearableExtender setDisplayIntent(android.app.PendingIntent);
|
||||
method public android.app.Notification.WearableExtender setGravity(int);
|
||||
method public android.app.Notification.WearableExtender setHintAvoidBackgroundClipping(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintContentIntentLaunchesActivity(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintHideIcon(boolean);
|
||||
method public android.app.Notification.WearableExtender setHintScreenTimeout(int);
|
||||
method public android.app.Notification.WearableExtender setHintShowBackgroundOnly(boolean);
|
||||
|
||||
@@ -1210,6 +1210,7 @@ public class Notification implements Parcelable
|
||||
|
||||
// Flags bitwise-ored to mFlags
|
||||
private static final int FLAG_AVAILABLE_OFFLINE = 0x1;
|
||||
private static final int FLAG_HINT_LAUNCHES_ACTIVITY = 1 << 1;
|
||||
|
||||
// Default value for flags integer
|
||||
private static final int DEFAULT_FLAGS = FLAG_AVAILABLE_OFFLINE;
|
||||
@@ -1372,6 +1373,30 @@ public class Notification implements Parcelable
|
||||
public CharSequence getCancelLabel() {
|
||||
return mCancelLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a hint that this Action will launch an {@link Activity} directly, telling the
|
||||
* platform that it can generate the appropriate transitions.
|
||||
* @param hintLaunchesActivity {@code true} if the content intent will launch
|
||||
* an activity and transitions should be generated, false otherwise.
|
||||
* @return this object for method chaining
|
||||
*/
|
||||
public WearableExtender setHintContentIntentLaunchesActivity(
|
||||
boolean hintLaunchesActivity) {
|
||||
setFlag(FLAG_HINT_LAUNCHES_ACTIVITY, hintLaunchesActivity);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a hint that this Action will launch an {@link Activity} directly, telling the
|
||||
* platform that it can generate the appropriate transitions
|
||||
* @return {@code true} if the content intent will launch an activity and transitions
|
||||
* should be generated, false otherwise. The default value is {@code false} if this was
|
||||
* never set.
|
||||
*/
|
||||
public boolean getHintContentIntentLaunchesActivity() {
|
||||
return (mFlags & FLAG_HINT_LAUNCHES_ACTIVITY) != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4869,6 +4894,7 @@ public class Notification implements Parcelable
|
||||
private static final int FLAG_HINT_SHOW_BACKGROUND_ONLY = 1 << 2;
|
||||
private static final int FLAG_START_SCROLL_BOTTOM = 1 << 3;
|
||||
private static final int FLAG_HINT_AVOID_BACKGROUND_CLIPPING = 1 << 4;
|
||||
private static final int FLAG_HINT_CONTENT_INTENT_LAUNCHES_ACTIVITY = 1 << 6;
|
||||
|
||||
// Default value for flags integer
|
||||
private static final int DEFAULT_FLAGS = FLAG_CONTENT_INTENT_AVAILABLE_OFFLINE;
|
||||
@@ -5435,6 +5461,29 @@ public class Notification implements Parcelable
|
||||
return mHintScreenTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a hint that this notification's content intent will launch an {@link Activity}
|
||||
* directly, telling the platform that it can generate the appropriate transitions.
|
||||
* @param hintContentIntentLaunchesActivity {@code true} if the content intent will launch
|
||||
* an activity and transitions should be generated, false otherwise.
|
||||
* @return this object for method chaining
|
||||
*/
|
||||
public WearableExtender setHintContentIntentLaunchesActivity(
|
||||
boolean hintContentIntentLaunchesActivity) {
|
||||
setFlag(FLAG_HINT_CONTENT_INTENT_LAUNCHES_ACTIVITY, hintContentIntentLaunchesActivity);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a hint that this notification's content intent will launch an {@link Activity}
|
||||
* directly, telling the platform that it can generate the appropriate transitions
|
||||
* @return {@code true} if the content intent will launch an activity and transitions should
|
||||
* be generated, false otherwise. The default value is {@code false} if this was never set.
|
||||
*/
|
||||
public boolean getHintContentIntentLaunchesActivity() {
|
||||
return (mFlags & FLAG_HINT_CONTENT_INTENT_LAUNCHES_ACTIVITY) != 0;
|
||||
}
|
||||
|
||||
private void setFlag(int mask, boolean value) {
|
||||
if (value) {
|
||||
mFlags |= mask;
|
||||
|
||||
Reference in New Issue
Block a user