Merge "Add LauncherCallbacks for requesting permissions on MNC" into ub-launcher3-almonte

This commit is contained in:
Dave Hawkey 2015-06-26 16:48:31 +00:00 committed by Android (Google) Code Review
commit 79f25bedd2
3 changed files with 16 additions and 0 deletions

View File

@ -883,6 +883,15 @@ public class Launcher extends Activity
}
}
/** @Override for MNC */
protected void onRequestPermissionsResult(int requestCode, String[] permissions,
int[] grantResults) {
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onRequestPermissionsResult(requestCode, permissions,
grantResults);
}
}
private PendingAddArguments preparePendingAddArgs(int requestCode, Intent data, int
appWidgetId, ItemInfo info) {
PendingAddArguments args = new PendingAddArguments();

View File

@ -37,6 +37,8 @@ public interface LauncherCallbacks {
public void onPostCreate(Bundle savedInstanceState);
public void onNewIntent(Intent intent);
public void onActivityResult(int requestCode, int resultCode, Intent data);
public void onRequestPermissionsResult(int requestCode, String[] permissions,
int[] grantResults);
public void onWindowFocusChanged(boolean hasFocus);
public boolean onPrepareOptionsMenu(Menu menu);
public void dump(String prefix, FileDescriptor fd, PrintWriter w, String[] args);

View File

@ -81,6 +81,11 @@ public class LauncherExtension extends Launcher {
public void onActivityResult(int requestCode, int resultCode, Intent data) {
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions,
int[] grantResults) {
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
}