Skip to content
Permalink
Browse files

Make our FlipTile Universal

Remove all the garbage we don't need, Add the stuff we actually need.
  • Loading branch information
mallardduck authored and Nick0703 committed May 13, 2014
1 parent 0263b95 commit 307971e21f338f0e92feaf86a4bdd08c043623cd
Showing with 3 additions and 61 deletions.
  1. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/AirplaneModeTile.java
  2. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/AutoRotateTile.java
  3. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/BluetoothTile.java
  4. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/GPSTile.java
  5. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/LteTile.java
  6. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/MobileNetworkTile.java
  7. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/MobileNetworkTypeTile.java
  8. +0 −4 packages/SystemUI/src/com/android/systemui/quicksettings/NetworkAdbTile.java
  9. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/NfcTile.java
  10. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/PerformanceProfileTile.java
  11. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/ProfileTile.java
  12. +3 −0 packages/SystemUI/src/com/android/systemui/quicksettings/QuickSettingsTile.java
  13. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/QuietHoursTile.java
  14. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/RingerModeTile.java
  15. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/ScreenTimeoutTile.java
  16. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/SleepScreenTile.java
  17. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/SyncTile.java
  18. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/ToggleLockscreenTile.java
  19. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/TorchTile.java
  20. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/UsbTetherTile.java
  21. +0 −3 packages/SystemUI/src/com/android/systemui/quicksettings/WifiAPTile.java
@@ -34,9 +34,6 @@ public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
intent.putExtra("state", !enabled);
mContext.sendBroadcast(intent);
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};
mOnLongClick = new OnLongClickListener() {
@@ -24,9 +24,6 @@ public AutoRotateTile(Context context, QuickSettingsController qsc, Handler hand
@Override
public void onClick(View v) {
RotationPolicy.setRotationLock(mContext, getAutoRotation());
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -38,9 +38,6 @@ public void onClick(View v) {
} else {
mBluetoothAdapter.enable();
}
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -34,9 +34,6 @@ public GPSTile(Context context, QuickSettingsController qsc, LocationController
@Override
public void onClick(View v) {
changeLocationMode();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -31,9 +31,6 @@ public LteTile(Context context, QuickSettingsController qsc) {
public void onClick(View v) {
toggleLteState();
updateResources();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -50,9 +50,6 @@ public void onClick(View v) {
updateOverlayImage(DISABLED_OVERLAY);
mCm.setMobileDataEnabled(false);
}
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -91,9 +91,6 @@ public void onClick(View v) {
mMode = NETWORK_MODE_UNKNOWN;
mContext.sendBroadcast(intent);

if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -30,10 +30,6 @@ public NetworkAdbTile(Context context, QuickSettingsController qsc) {
public void onClick(View v) {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ADB_PORT, !getEnabled() ? 5555 : -1);

if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -25,9 +25,6 @@ public NfcTile(Context context,
public void onClick(View v) {
toggleState();
updateResources();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -63,9 +63,6 @@ public PerformanceProfileTile(Context context, QuickSettingsController qsc) {
@Override
public void onClick(View v) {
changeToNextProfile();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};
}
@@ -51,9 +51,6 @@ public ProfileTile(Context context,
@Override
public void onClick(View v) {
createProfileDialog();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};
mOnLongClick = new View.OnLongClickListener() {
@@ -202,6 +202,9 @@ public void onClick(View v) {
if (mOnClick != null) {
mOnClick.onClick(v);
}
if (isFlipTilesEnabled()) {
flipTile(0);
}

ContentResolver resolver = mContext.getContentResolver();
boolean shouldCollapse = Settings.System.getIntForUser(resolver,
@@ -36,9 +36,6 @@ public QuietHoursTile(Context context, QuickSettingsController qsc) {
@Override
public void onClick(View v) {
toggleState();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};
mOnLongClick = new View.OnLongClickListener() {
@@ -45,9 +45,6 @@ public RingerModeTile(Context context, QuickSettingsController qsc) {
public void onClick(View v) {
toggleState();
updateResources();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -37,9 +37,6 @@ public ScreenTimeoutTile(Context context, QuickSettingsController qsc) {
public void onClick(View v) {
toggleState();
updateResources();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -23,9 +23,6 @@ public SleepScreenTile(Context context, QuickSettingsController qsc) {
@Override
public void onClick(View v) {
pm.goToSleep(SystemClock.uptimeMillis());
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};
mOnLongClick = new OnLongClickListener() {
@@ -24,9 +24,6 @@ public SyncTile(Context context, QuickSettingsController qsc) {
public void onClick(View v) {
toggleState();
updateResources();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -34,9 +34,6 @@ public void onClick(View v) {
sDisabledLockscreen = !sDisabledLockscreen;
mPrefs.edit().putBoolean(KEY_DISABLED, sDisabledLockscreen).apply();
updateLockscreenState();
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -27,9 +27,6 @@ public TorchTile(Context context,
public void onClick(View v) {
Intent i = new Intent(TorchConstants.ACTION_TOGGLE_STATE);
mContext.sendBroadcast(i);
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};

@@ -28,9 +28,6 @@ public UsbTetherTile(Context context, QuickSettingsController qsc) {
public void onClick(View v) {
if (mUsbConnected) {
setUsbTethering(!mUsbTethered);
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
}
};
@@ -35,9 +35,6 @@ public void onClick(View v) {
setSoftapEnabled(true);
break;
}
if (isFlipTilesEnabled()) {
flipTile(0);
}
}
};
mOnLongClick = new View.OnLongClickListener() {

0 comments on commit 307971e

Please sign in to comment.
You can’t perform that action at this time.